Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => General

PHP AJAX SQL update not working after adding extra record

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

PHP AJAX SQL update not working after adding extra record

Postby underlink » Tue Jul 30, 2013 5:56 am

I am building an asset managment system, utilizing some code I found on the net which does live record updates using AJAX, the code is great if I rememeber the link I will post it.

However the example code only contains database fields and I need about 14ish, so with my little understanding of the code i started adding more fields. for some reason every time I try to insert the "condition" field the live update stops working for all fields. you can type in new data but does not save back to the database.

It happends when i change the code from this:



$sql = "update fullnames set AssetID='$AssetID',SerialNumber='$SerialNumber',Type='$Type',Model='$Model' ,Location='$Location' ,Make='$Make' where id='$id'";
mysql_query($sql);



to this

$sql = "update fullnames set AssetID='$AssetID',SerialNumber='$SerialNumber',Type='$Type',Model='$Model' ,Location='$Location' ,Condition='$Condition' ,Make='$Make' where id='$id'";
mysql_query($sql);





the full code is attached. I would really like any help
Attachments
code.7z
(2.38 KiB) Downloaded 20 times
underlink
New php-forum User
New php-forum User
 
Posts: 1
Joined: Tue Jul 30, 2013 5:49 am

Re: PHP AJAX SQL update not working after adding extra recor

Postby johnj » Tue Jul 30, 2013 6:26 am

are you sure if the table called fullnames has a field called "Condition"?
johnj
php-forum Super User
php-forum Super User
 
Posts: 1805
Joined: Thu Mar 10, 2011 5:07 pm


Return to PHP coding => General

Who is online

Users browsing this forum: No registered users and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.