Alexa Kirk wrote:
I am trying to make a query based on the user input, for a search page.$query = "select PUB_ID, AUTHOR, TITLE, YEAR from * where
So, I have the initial query set up like:
USER.USER_ID=$user and USER.USER_ID=USER_PUB.USER_ID";
if ($author != null){ //append this string to the $query already stated $query .= " and JOURNAL_ARTICLE.AUTHOR=$author"; } if ($title != null){ //append this string also $query .= " and JOURNAL_ARTICLE.TITLE=$title"; }
How do you do this concatenation?
Thanks,
Alexa
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php