This is a discussion on Re: Problems with UPDATE within the alt.comp.lang.php forums, part of the PHP Programming Forums category; Those pesky comma's... Norm -- Avatar hosting at www.easyavatar.com "Ian" <ian@spamfree.com> wrote ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Those pesky comma's...
Norm -- Avatar hosting at www.easyavatar.com "Ian" <ian@spamfree.com> wrote in message news:b58vr0tgtovadjeracbufaps9tnr9j2def@4ax.com... > Please ignore, now fixed. :-) > > > > On Tue, 14 Dec 2004 23:23:41 GMT, Ian <ian@spamfree.com> wrote: > > >Another beginner's question here. > > > >I'm trying to write a record update routine for a database which I've > >created and everything seems fine except that the record changes aren't > >being written. There are no error messages though and everything seems > >to have worked except the record remains the same. > > > >An initial screen asks for a record number (the primary key) which then > >retrieves the record in question and displays it in a form on screen > >allowing for any fields to be changed. This then calls a php script > >which retrieves the values of the fields as follows: > > > ><?php > > > >$rec_no=$_POST['rec_no']; > >$piece_no=$_POST['piece_no']; > >$folio=$_POST['folio']; > >$reg_dist=$_POST['reg_dist']; > >$enum_dist=$_POST['enum_dist']; > >$house=$_POST['house']; > >$address=$_POST['address']; > >$forename=$_POST['forename']; > >$surname=$_POST['surname']; > >$age=$_POST['age']; > >$user=$_POST['user']; > >$date=$_POST['date']; > >$time=$_POST['time']; > > > > > >I know this bit is working because I got the php script to display the > >values before attempting the update. > > > >Then I am calling the UPDATE as follows: > > > >mysql_query(" UPDATE census_recs > > > >SET rec_no='$rec_no', piece_no='$piece_no', folio='$folio', > >reg_dist='$reg_dist', enum_dist='$enum_dist', house='$house', > >address='$address', forename='$forename', surname='$surname', > >age='$age', user='$user', date='$date', time='$time', WHERE > >rec_no='$rec_no'"); > > > > > >This generates no errors but also does not update the record. > > > >Can anyone suggest what might be wrong or is there anything I can do to > >get the update routine to provide error messages? > > > >Thanks in advance. > > > >Ian > > > |