General Programming Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingGeneral Programming Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old September 23rd, 2002, 06:30 PM
nindespin nindespin is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Sep 2002
Posts: 4 nindespin User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question shopping cart

Hello,

I'm having trouble with the shopping cart; I get the message:
"Warning: Supplied argument is not a valid MySQL result resource in /home/sites/site9/web/w_go.php on line 44."

Line 44 is:
while($row = mysql_fetch_array($result)) {

What is going on? I've looked at the manuals for php and MySql online and I don't see were the problem is. Any help would be appreciated greatly.

Reply With Quote
  #2  
Old September 23rd, 2002, 07:16 PM
Malignant Malignant is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Sep 2002
Location: Hastings, UK
Posts: 9 Malignant User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
When I get that error it's normally a number of reasons. Below is what I look for:
  1. Have I remembered to turn my MySQL server on
  2. Have I logged into the MySQL server using my php code
  3. Have I told the MySQL server what database I want it to look in


The points I've mentioned above are the normal reasons (in my short experience) as to why I would have an error like that. When testing my code I do have a nasty habbit of forgetting to turn my MySQL server on. I then check to see if I have logged into the server using my php code...

PHP Code:
 mysql_connect("localhost","root","password"); 


Then I check whether I told the server what database I want it to look in...

PHP Code:
 mysql_select_db("mydatabase"); 


If your code is still not working then try looking at the other lines of your code which may be the source of your problem. The error message says there is a problem with line 44 but sometimes the error can be in 43 or 45.

Reply With Quote
  #3  
Old September 23rd, 2002, 07:24 PM
Ben Rowe
Guest
Dev Articles Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
check your actually query, usually when this happens it means that there is something wrong with your query

Reply With Quote
  #4  
Old September 26th, 2002, 07:30 PM
nindespin nindespin is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Sep 2002
Posts: 4 nindespin User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Talking

Thanks for the replies; there was something wrong with my query. It works great now!

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingGeneral Programming Help > shopping cart


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway