help with update failure
Posted by:
J Kahn
Date: August 15, 2005 09:55AM
This is my first database application and I'm using php and phpmyadmin to keep track of attributes of jobs as they are completed. The table has 58 colums and the types are int, varchar, and text. Data is entered in two phases, and it's the second one that is giving me trouble.
$query="INSERT INTO data (date, customer, status, descr, dept, duedate, critical, notes, sperson, history) VALUES ('$date', '$customer', '$status', '$descr', '$dept', '$dueStamp', '$critical', '$notes', '$initials', '$history')";
mysql_query($query);
The insert statement works.
$query = "UPDATE data SET status='0', notes='$notes', history='$history', billname='$billname', billst='$billst', billPO='$billPO', billcity='$billcity', billstate='$billstate', billzip='$billzip', billphone='$billphone', orderedby='$orderedby', email='$email', billfax='$billfax', contact='$contact', sendtype='$sendtype', jobst='$jobst',jobcity='$jobcity', jobstate='$jobstate', jobzip='$jobzip', jobphone='$jobphone', height='$height', width='$width', depth='$depth', count='$count', sms='$sms', type='$type', hookup='$hookup', bgmat='$bgmat', colors='$colors', frame='$frame', ftype='$ftype', fother='$fother', corner='$corner', cother='$cother', mount='$mount', mother='$mother', msurface='$msurface', hardware='$hardware', htype='$htype', posts='$posts', ptype='$ptype', typestyle='$typestyle', capheight='$capheight', copycolors='$copycolors', case='$case', copyloc='$copyloc', margins='$margins', vcut='$vcut', vmat='$vmat', lappr='$lappr' WHERE jobnum='$jobnum'";
mysql_query($query);
The update does not return any errors, but does not add any information to the database. I have another update statement on another page that also doesn't add anything.
$query = "UPDATE data SET customer='$customer', status='$status', descr='$descr', dept='$dept', duedate='$duedate', critical='$critical', notes='$notes', history='$history', billname='$billname', billst='$billst', billPO='$billPO', billcity='$billcity', billstate='$billstate', billzip='$billzip', billphone='$billphone', orderedby='$orderedby', email='$email', billfax='$billfax', contact='$contact', sendtype='$sendtype', jobst='$jobst',jobcity='$jobcity', jobstate='$jobstate', jobzip='$jobzip', jobphone='$jobphone', height='$height', width='$width', depth='$depth', count='$count', sms='$sms', type='$type', hookup='$hookup', bgmat='$bgmat', colors='$colors', frame='$frame', ftype='$ftype', fother='$fother', corner='$corner', cother='$cother', mount='$mount', mother='$mother', msurface='$msurface', hardware='$hardware', htype='$htype', posts='$posts', ptype='$ptype', typestyle='$typestyle', capheight='$capheight', copycolors='$copycolors', case='$case', copyloc='$copyloc', margins='$margins', vcut='$vcut', vmat='$vmat', lappr='$lappr' WHERE jobnum='$jobnum'";
mysql_query($query);
Anyone know what to do?