Jump to content


MySQL Database Error, Screen Shots Included

  • Please log in to reply
2 replies to this topic

#1 akirahz

  • New Members
  • Pip
  • Newbie
  • 5 posts

Posted 19 September 2006 - 05:53 AM

Well heres my dilemma, i have a script that contains a pre_checkout.php file for credit card orders, people can order different packages from my website, from 19.99 too 39.99.. anyway, when i was testing my site i recieve an error when i try to order a package

heres a screen shot of what the error looks like
in internet explorer:

Posted Image

also: here is a picture of my database tables concerning this area, "TransactionsMembership" in phpMyAdmin

Posted Image

am i missing some fields? i dont see the state field anywhere, if i am missing fields, what would i have to query too create them?

any and all help is appreciated, im fairly certain it is a database problem and nothing wrong with the actual php script.

thanks guys, ive been tryin to fix this for about 4 days now and cant seem to figure it out

if theres anymore info needed by anyone to help me solve this, im more then happy to try and get it and tell you

#2 akirahz

  • New Members
  • Pip
  • Newbie
  • 5 posts

Posted 19 September 2006 - 05:58 AM

also the script emails me the error

Unknown column 'State' in 'field list'
Query: 'INSERT INTO `TransactionsMembership` (ID, Sum, State ) VALUES ( 1158643712931, 19.99, '0' );'

#3 fenway

  • Staff Alumni
  • MySQL Si-Fu / PHP Resident Alien
  • 16,199 posts
  • LocationToronto, ON

Posted 20 September 2006 - 09:50 AM

Well, yes, you will need to add the state field (use the Add button from PHPMyAdmin)... and I'm not sure that you can use "sum" as a column name, since it's a function as well.  You may need to escape it with backticks.  Also, you really shouldn't use a CHAR column as your PK.
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users