[RESOLVED] change from number to title
i would like to search by title on my web page and not numbers.
how can i do this
im using below to search by numbers
PHP Code:
$id = "%".$_GET["search"]."%";
$result = mysql_query( "SELECT vidnumber, titleid, hd, year,starring1,videotitle,starring2, directedby, filmplot1,dirid,starrid1,starrid2, trilogy,age, Runningtime FROM videolist WHERE vidnumber LIKE '".mysql_real_escape_string($id)."'")
or die(mysql_error());
while($row = mysql_fetch_array($result)){
echo $row['videotitle'];
Re: change from number to title
change the WHERE clause in your SQL statement to look in the title field instead of the 'vidnumber' field, more specifically in this piece of code:
Code:
WHERE vidnumber LIKE '".mysql_real_escape_string($id)."'"
Re: change from number to title
thanks kows.. missed that.
been learning vs2010 .net aswell