View Full Version : PHP Error
actiontraining
June 2nd, 2003, 06:14 PM
This cart is getting worse and worse.... A new error has come up...
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /usr/home/actiontraining/public_html/shop/squirrelcart/functions/get_records.func on line 17
How do we fix this one ?
actiontraining
June 3rd, 2003, 12:22 PM
where is this support :mad:
please give me an answer
Jamie
June 3rd, 2003, 01:51 PM
Support is not 24/7. We do our best to answer requests as soon as possible, in the order that they are received. You submitted this post after 5pm EST, and it is now 12:49pm. You should allow at least 24 to 48 hours for a response, before re posting.
That error could be caused by a number of things. The function get_records is used in many places, to obtain records from the DB. If the query is invalid, you will get that error. This could be due to missing tables or records in your database.
I would suggest you follow the instructions in this post, to make that function generate more useful output on error.
http://www.ldev.com/forums/showthread.php?s=&threadid=750&highlight=getrecords
Then let us know what the new error is, and we should be able to better determine what the problem is. Please also provide the context in which this error is occuring, for example, does it appear all the time on the cart page, on the admin page, etc.....or only when you perform a certain action?
Thanks,
Jamie
actiontraining
June 3rd, 2003, 07:57 PM
ok followed that, i am getting this.....
MySQL error: You have an error in your SQL syntax near '' at line 1
Query was: SELECT Tax FROM Sales_Tax WHERE State =
Jamie
June 4th, 2003, 10:57 AM
Hi,
It sounds like you are logged in with an account that does not have a state specified, and that you have sales tax enabled. This could happen if you are using the built in admin account, or another account created in the back end, and have not set a value in the State field.
The cart prevents users from creating an account without a state specified, but there is no such requirement in the back end.
Let's assume the record number for the state that a user is in is 15....then that query line should read:
SELECT Tax FROM Sales_Tax WHERE State = 15
Yours is missing the value for the State field, which led me to the above conlusion.
After you login, click "Account Details" and see if the state is missing. I would make sure you then fill out all the required fields, and see if the error goes away.
Thanks,
Jamie
njuwdaij
March 16th, 2005, 07:16 AM
I have the same problem.
When I log in as admin and check out, everything works fine. But when I use a fake customer I get the following error:
MySQL error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
Query was: SELECT Tax FROM Sales_Tax WHERE State =
Because I am in the Netherlands I do not use the State item.
How do I make this work? :confused: Can I remove the state line alltogether? Will that make it work?
State is not a requested field to fill in the Address Form Settings.
Powered by vBulletin™ Version 4.1.2 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.