Dynadot .com transfer sale, only $10.12 with coupon code DYNA12, available while supplies last, ends October 31, 2026.

MySql Update problem?

Namecheap AuctionsNamecheap Auctions
Namecheap AuctionsNamecheap Auctions
SpaceshipSpaceship
Watch

iNod

Eating PieVIP Member
Impact
66
Hello,

PHP:
        $getorder = "SELECT * FROM form_fields WHERE fid='".$fid."'";
        $go = $db->fetch($db->query($getorder));
        $neworder = $go['order']-1;

		$update_query = "UPDATE form_fields SET order='".$neworder."' WHERE fid='".$fid."'";
		$data = $db->query($update_query);
		print '<p>Field has been successfully moved.</p><br />';

That is the code and I get

Code:
UPDATE form_fields SET order='9' WHERE fid='270'
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 'order='9' WHERE fid='270'' at line 1

What could be the problem?

Thanks,
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
PHP:
$update_query = "UPDATE form_fields SET order = '$neworder' WHERE fid = '$fid'";
 
0
•••
Nice try Axilant but it doesn't work :(

I have tried everything..
 
0
•••
0
•••
CatchedCatched

We're social

Escrow.com
Spaceship
Escrowly
CryptoExchange.com
Domain Recover

NamePros updates

New in Parking: updated way to act on many domains or inquiries at once
Your domain list and inquiry list now have a bar above and below the list. Check the items you want, then choose an action in the bar...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back