Results 1 to 3 of 3

Thread: [RESOLVED] change from number to title

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2007
    Posts
    261

    Resolved [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

  2. #2
    PowerPoster
    Join Date
    Sep 2003
    Location
    Edmonton, AB, Canada
    Posts
    2,629

    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)."'"

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2007
    Posts
    261

    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
  •  



Click Here to Expand Forum to Full Width