|
-
May 27th, 2010, 12:14 PM
#1
Thread Starter
Hyperactive Member
[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'];
programming pc: laptop. running xp pro and vb.net..
media centre xp pc: dual core 6000,4gb memory, 1tb harddrive
mainserver: server 2008, 8gb memory, amd e-350 dual core, 6tb harddrive and local web host
atomvault 1: server 2008, atom 330 with 4 gb memory, 35TB hardrive space for videos and music..
backup pc : xp, 4gb, atom 330, 10tb harddrive(web, pictures, music, databases)
2 x video backup: atom 330, 2gb, 18tb harddrive
everything on remote login..
check out my builds http://AtomVaults.yolasite.com
learning vb.net and php + mysql   - got most of the basics now.
I WISH THERE WAS MORE TIME IN THE DAY  
-
May 27th, 2010, 12:37 PM
#2
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)."'"
-
May 27th, 2010, 12:50 PM
#3
Thread Starter
Hyperactive Member
Re: change from number to title
thanks kows.. missed that.
been learning vs2010 .net aswell
programming pc: laptop. running xp pro and vb.net..
media centre xp pc: dual core 6000,4gb memory, 1tb harddrive
mainserver: server 2008, 8gb memory, amd e-350 dual core, 6tb harddrive and local web host
atomvault 1: server 2008, atom 330 with 4 gb memory, 35TB hardrive space for videos and music..
backup pc : xp, 4gb, atom 330, 10tb harddrive(web, pictures, music, databases)
2 x video backup: atom 330, 2gb, 18tb harddrive
everything on remote login..
check out my builds http://AtomVaults.yolasite.com
learning vb.net and php + mysql   - got most of the basics now.
I WISH THERE WAS MORE TIME IN THE DAY  
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|