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

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.