Re: Problems with UPDATE

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 ...


Go Back   Usenet Forums > PHP Programming Forums > alt.comp.lang.php

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 12-15-2004
Norman Peelman
 
Posts: n/a
Default Re: Problems with UPDATE

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
> >

>



Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 05:11 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0