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:
You eat, breathe and sleep innovation. Build your mobile intelligence with BlackBerry® experts this July. Register Today!
  #1  
Old August 25th, 2002, 04:48 PM
fab fab is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2002
Location: Hamburg, Germany
Posts: 2 fab User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Shopsystem

Hello Forum,

I'am trying to run this very practical shop-script, written by Mitchell Harper. I have to say, that I'am new with shopscripts, but not with PHP in generall.
The description is very good, I understood quite a lot (but not everything yet)

My Problem:
The script causes an error as the following:
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in ...shop/cart.php on line 45

The relevant paragraph (it seems like):

$result = mysql_query("select count(*) from cart where cookieId = '" . GetCartId() . "' and itemId = $itemId");
$row = mysql_fetch_row($result);

Even when I use the downloaded comlete file "cart.php" this error occurs.

Does anyone have an idea why this happens, or might it be the settings on my server? in this case: what do I have to change/set?

Thanks for help
Fabian Klein

Reply With Quote
  #2  
Old August 25th, 2002, 06:32 PM
Ben Rowe
Guest
Dev Articles Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
something is actually wrong with this line:

$result = mysql_query("select count(*) from cart where cookieId = '" . GetCartId() . "' and itemId = $itemId");

could you please show the database structure, and also, try this:

echo GetCartId() . '<br>\n';
echo $itemId . '<br>\n';

Before $result, just make sure that these are outputting something

Reply With Quote
  #3  
Old August 26th, 2002, 02:41 AM
fab fab is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2002
Location: Hamburg, Germany
Posts: 2 fab User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Hello Ben,

thank you for your help. I found the reason for this error message. In my database-table "items" I had a field named itemID instead of itemId. So the case-sensitivity made the trouble.
I'am quite happy that this nice script is runnung now.

Nice greetings from Hamburg, Germany
Fabian Klein

Reply With Quote
  #4  
Old August 26th, 2002, 03:56 AM
Ben Rowe
Guest
Dev Articles Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
All it catches us all out sometime or another!

Oh well

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingGeneral Programming Help > Shopsystem


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 | 
  
 

Iron Speed




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