I'm with a little sintax problem...
The question is that i have two search fields (titulotxt and cdstxt) and i
want to create an mysql condition... i trying:

 $sql1=($titulotxt) ? "titulo like '%".$titulotxt."%'":"";
 $sql2=($cdstxt) ? "cds like '$cdstxt'":"";
 $sql="SELECT * FROM divx WHERE" .$sql1 " && " .$sql2 " ORDER BY titulo";

but the bastard is giving me a sintax error on the 3 line... Can anyone
teach me how i must do to validate the mysql condition and make it work?

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to