killerbud99 Posted October 14, 2006 Share Posted October 14, 2006 Hello all,I have a question I have a script that is giving me errors.Basicly the script allows a user to Purchase a spot on a myspace train.When the user clicks on Purchase they are directed to a page that allows them to choose there spat and a price.When the user chooses it should call the database and collect the users info and then direct them to the paypal payment page.The error I get is.Error: Can not perform query select count(*) as count from whore_purchase where user_id = 2 and myspace_id = '35453393' and train_id = 21 and train_position = 20 and round = 5 and transaction_status = 'requested'. Unknown column 'user_id' in 'where clause'I have created a demo account [url=http://www.gamehost-online.com/train/login.php]http://www.gamehost-online.com/train/login.php[/url]The user name is demo and the password is 012345 these are all numbers.You can check the purchase script here [url=http://www.gamehost-online.com/train/buy.php?train_id=21&position=20]http://www.gamehost-online.com/train/buy.php?train_id=21&position=20[/url]The script was obtained from here [url=http://www.smarterscripts.com/myspace-whore-train/]http://www.smarterscripts.com/myspace-whore-train/[/url]Please let me know if you need more info and I will provide.Thanks in advance for your support. Quote Link to comment https://forums.phpfreaks.com/topic/23938-sql-error/ Share on other sites More sharing options...
AndyB Posted October 14, 2006 Share Posted October 14, 2006 [quote]Unknown column 'user_id'[/quote]That's pretty specific. The database table you're looking in doesn't have a column (field) named user_id. Perhaps it's User_ID, or userid, or something similar. Check closely. Quote Link to comment https://forums.phpfreaks.com/topic/23938-sql-error/#findComment-108804 Share on other sites More sharing options...
killerbud99 Posted October 14, 2006 Author Share Posted October 14, 2006 Thanks Andy for your quick and correct reply :)The field was set to id insted of user_id I changed this and it now works.Thanks again for your help Quote Link to comment https://forums.phpfreaks.com/topic/23938-sql-error/#findComment-108814 Share on other sites More sharing options...
opioq Posted November 23, 2006 Share Posted November 23, 2006 I am having this error when trying to purchase a spot on the trainError: Can not perform query select count(*) as count from whore_purchase where user_id = 5 and myspace_id = '1342355' and train_id = 7 and train_position = 1 and round = 141 and transaction_status = 'requested'. Unknown column 'user_id' in 'where clause' Server busy. Try laterHow did you fix your error? Where is the field that you chaned? Quote Link to comment https://forums.phpfreaks.com/topic/23938-sql-error/#findComment-129271 Share on other sites More sharing options...
killerbud99 Posted November 23, 2006 Author Share Posted November 23, 2006 [quote author=opioq link=topic=111488.msg472767#msg472767 date=1164316619]I am having this error when trying to purchase a spot on the trainError: Can not perform query select count(*) as count from whore_purchase where user_id = 5 and myspace_id = '1342355' and train_id = 7 and train_position = 1 and round = 141 and transaction_status = 'requested'. Unknown column 'user_id' in 'where clause' Server busy. Try laterHow did you fix your error? Where is the field that you chaned?[/quote]In your sql Table: whore_purchase I changed The field from id to user_id and this corrected the problem Quote Link to comment https://forums.phpfreaks.com/topic/23938-sql-error/#findComment-129304 Share on other sites More sharing options...
opioq Posted November 24, 2006 Share Posted November 24, 2006 i appreciate it so much. Quote Link to comment https://forums.phpfreaks.com/topic/23938-sql-error/#findComment-129504 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.