Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8
  1. #1
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    2,778
    Thanks
    19
    Thanked 155 Times in 146 Posts

    invalid result source

    Another SQL query issue, probably easy to solve?
    PHP Code:
    $search_term99 $_POST['search_term99'];


    $dbcon mysql_connect("localhost","username","password");

    mysql_select_db("MyDatabase",$dbcon);


    $search_term99 trim($search_term99);


    $query "SELECT * WHERE name LIKE '%"$search_term99."%' OR date LIKE '%"$search_term99."%' OR billing_address LIKE '%"$search_term99."%' OR shipping_address LIKE '%"$search_term99."%' OR pick_up LIKE '%"$search_term99."%' OR email LIKE '%"$search_term99."%' OR phone LIKE '%"$search_term99."%' OR order_info LIKE '%"$search_term99."%' OR invoice_no LIKE '%"$search_term99."%' OR order_completed LIKE '%"$search_term99."%'";
    $result mysql_query($query);


    $limit mysql_num_rows($result);
    echo 
    $limit;
    die(); 
    This code gives me the following error:

    Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/httpd/vhosts/mediamogulsweb.com/httpdocs/customer_dbase_search_results.php on line 409
    Can't figure out what is wrong with the result source....Can you? If you need more information, i can provide it...

    Thanks.
    Regards, R.J.

    ---------------------------------------------------------

    Help spread the word! Like my YouTube-to-Mp3 Conversion Script on Facebook !! :)
    [Related videos and tutorials are also available at my YouTube channel and on Dailymotion]
    Get free updates about new software version releases, features, and bug fixes!

  • #2
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    2,778
    Thanks
    19
    Thanked 155 Times in 146 Posts
    jesus, I see the error now...I didn;t specify the name of the database... ....nevermind
    Regards, R.J.

    ---------------------------------------------------------

    Help spread the word! Like my YouTube-to-Mp3 Conversion Script on Facebook !! :)
    [Related videos and tutorials are also available at my YouTube channel and on Dailymotion]
    Get free updates about new software version releases, features, and bug fixes!

  • #3
    Senior Coder
    Join Date
    Aug 2003
    Location
    One step ahead of you.
    Posts
    2,815
    Thanks
    0
    Thanked 3 Times in 3 Posts
    You did.
    Code:
    mysql_select_db("MyDatabase",$dbcon);
    I'm not sure if this was any help, but I hope it didn't make you stupider.

    Experience is something you get just after you really need it.
    PHP Installation Guide Feedback welcome.

  • #4
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    2,778
    Thanks
    19
    Thanked 155 Times in 146 Posts
    You're right, it was a typo.....I meant I didn't specify the name of the table:

    PHP Code:
    $query "SELECT * WHERE name LIKE '%"....... 
    should be

    PHP Code:
    $query "SELECT * FROM table WHERE name LIKE '%"....... 
    Last edited by chump2877; 06-27-2005 at 11:37 PM.
    Regards, R.J.

    ---------------------------------------------------------

    Help spread the word! Like my YouTube-to-Mp3 Conversion Script on Facebook !! :)
    [Related videos and tutorials are also available at my YouTube channel and on Dailymotion]
    Get free updates about new software version releases, features, and bug fixes!

  • #5
    Senior Coder
    Join Date
    Aug 2003
    Location
    One step ahead of you.
    Posts
    2,815
    Thanks
    0
    Thanked 3 Times in 3 Posts
    That's a table name. You're selecting data from a table.
    I'm not sure if this was any help, but I hope it didn't make you stupider.

    Experience is something you get just after you really need it.
    PHP Installation Guide Feedback welcome.

  • #6
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    2,778
    Thanks
    19
    Thanked 155 Times in 146 Posts
    Yeah i just edited my message to change that, but you're too damn quick on the draw...LOL....
    Regards, R.J.

    ---------------------------------------------------------

    Help spread the word! Like my YouTube-to-Mp3 Conversion Script on Facebook !! :)
    [Related videos and tutorials are also available at my YouTube channel and on Dailymotion]
    Get free updates about new software version releases, features, and bug fixes!

  • #7
    Senior Coder
    Join Date
    Aug 2003
    Location
    One step ahead of you.
    Posts
    2,815
    Thanks
    0
    Thanked 3 Times in 3 Posts
    FPS (First Person Shooter) do teach you something
    Last edited by marek_mar; 06-28-2005 at 12:20 AM.
    I'm not sure if this was any help, but I hope it didn't make you stupider.

    Experience is something you get just after you really need it.
    PHP Installation Guide Feedback welcome.

  • #8
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    2,778
    Thanks
    19
    Thanked 155 Times in 146 Posts
    Fps??
    Regards, R.J.

    ---------------------------------------------------------

    Help spread the word! Like my YouTube-to-Mp3 Conversion Script on Facebook !! :)
    [Related videos and tutorials are also available at my YouTube channel and on Dailymotion]
    Get free updates about new software version releases, features, and bug fixes!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •