medj Posted September 15, 2006 Share Posted September 15, 2006 by default, my script request MYSQL information from a database. The line I need help with is:LIKE '$c'I have a number of categories on my site that use the variable $cIn this mysql line, i dont want to grab info from the database with variable $c but with the variable $c + the word 'media' on the end of it.I've tried doing LIKE '$cmedia' doesnt work obviously since $cmedia is a whole new variable entirely.I've tried LIKE '$c+media' doesnt workPlease anyone? Quote Link to comment Share on other sites More sharing options...
btherl Posted September 15, 2006 Share Posted September 15, 2006 Here are two options:[code]" LIKE '$c" . "media" . "'"" LIKE '{$c}media'"[/code]You can even do complex stuff like "{$arr['fortytwo'][5]}media'". Those {} symbols are very handy :) Quote Link to comment Share on other sites More sharing options...
medj Posted September 15, 2006 Author Share Posted September 15, 2006 Thanks so Much ;DYou just saved me tons of time. Maybe you can tell me what you think of my site:http://blankevolution.com Quote Link to comment Share on other sites More sharing options...
btherl Posted September 15, 2006 Share Posted September 15, 2006 Nice colours and layout.. I'm at work so I'm not going to look any closer :) Quote Link to comment 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.