0

Hi everyone,

I have PHPAuction XL V3.1, please may someone help me. I have managed to create the auctions but i cannot bid on them, the following error comes up: update PHPAUCTIONXL_auctions set current_bid=20, starts=2009-05-01 18:21:29,ends=2009-05-02 18:21:29 where id="1336eca400908b7a04133d27be69e27e"
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 '18:21:29,ends=2009-05-02 18:21:29 where id="1336eca400908b7a04133d27be69e27e"' at line 1

I do not know the file it is talking about or anything like that... I am quite new to PHP and SQL so i would really appreciate any help.

Kind regards
Dustin Ellse

2
Contributors
1
Reply
2
Views
8 Years
Discussion Span
Last Post by blocblue
0

You should put your values in speech marks. And it is a good idea to use the PHP sprinf() function for security too.

$strSql = sprinf( "update `PHPACUTIONXL_auctions` set `current_bid` = '%d', `start` = '%s', `ends` = '%s' where `id`= '%s'",
'20', '2009-05-01 18:21:29', '2009-05-02 18:21:29', '1336eca400908b7a04133d27be69e27e' );

Does this make sense?

R

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.