web2000 Posted May 13, 2007 Share Posted May 13, 2007 Hello, I have a query which is $query = "SELECT * FROM music"; but i want to add another 2 parameters in there eg, $user = "r0385"; $query = "SELECT * FROM music" ."WHERE" .$user ."= username" Now i know it was something like ."" but i really cant remember any help would be great. Thanks Quote Link to comment https://forums.phpfreaks.com/topic/51201-linking-together/ Share on other sites More sharing options...
paul2463 Posted May 13, 2007 Share Posted May 13, 2007 $user = "r0385"; $query = "SELECT * FROM music WHERE username = '$user'"; and if you want to add more $user = "r0385"; $first = "John"; $query = "SELECT * FROM music WHERE username = '$user' AND firstName = '$first'"; Quote Link to comment https://forums.phpfreaks.com/topic/51201-linking-together/#findComment-252117 Share on other sites More sharing options...
web2000 Posted May 13, 2007 Author Share Posted May 13, 2007 paul2463 you are a legend, thank you very much solved my problem! Quote Link to comment https://forums.phpfreaks.com/topic/51201-linking-together/#findComment-252122 Share on other sites More sharing options...
paul2463 Posted May 13, 2007 Share Posted May 13, 2007 please click the solved button if it works for you and you are happy Quote Link to comment https://forums.phpfreaks.com/topic/51201-linking-together/#findComment-252123 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.