Connecting Tech Pros Worldwide Help | Site Map

MySQL Query not working

 
LinkBack Thread Tools Search this Thread
  #1  
Old July 17th, 2005, 12:16 PM
behindspace
Guest
 
Posts: n/a
Default MySQL Query not working

I'm all sorts of confused on this one...

// My Query:

$result = mysql_query("SELECT * FROM pricehistory WHERE partno partno =
\"".$part."\" ORDER BY partno ASC, year DESC, month DESC limit 1");

// My results:
$numrows = mysql_num_rows($result);

// The error that I'm getting:
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result
resource in /***/***/***/***/***/***/searchHist2.php on line 28

Any guesses? I know I'm missing something, I just can't figure out what...


  #2  
Old July 17th, 2005, 12:16 PM
behindspace
Guest
 
Posts: n/a
Default Re: MySQL Query not working

forget it, I figured it out.

$result = mysql_query("SELECT * FROM pricehistory WHERE partno =
'".$part."' ORDER BY partno ASC, year DESC, month DESC limit 1");

 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.