PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
the following code will search different collums in my table ok, but if i search for 'joe bloggs' it will return no result as joe is in collum1 and bloggs in collum2. any ideas how i would code it to find it?
<?php
$result = mysql_query("SELECT * FROM profileu WHERE email = '$qry' or firstname LIKE '%$qry%' or lastname LIKE '%$qry%'");
while($row = mysql_fetch_object($result)) {
print "$row->firstname";
print "<br>";
}
?>
$result = mysql_query("SELECT * FROM profileu WHERE email = '$qry' or firstname LIKE '%$qry%' or lastname LIKE '%$qry%'
OR CONCAT_WS(' ', firstname, lastname) LIKE '%$qry%'");
mysql_function(): WARNING: This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQLextension should be used. See also MySQL: choosing an API guide and related FAQ for more information.