That the thing see, the form(using GET instead of POST) sends data with
the new dates like this:-

id=1&name=Mark&job_number=AA1&job_date=2002-5-19
        &id=2&name=Mark&job_number=AA2&job_date=2002-5-21
                &id=3&name=Mark&job_number=AA3&job_date=2002-5-25

and the UPDATE query like this:-

>   $sql = "UPDATE mytable set job_date='$job_date' where job_number
>   ='$job_number'";
>   $result = @mysql_query($sql, $connection) or die.....;

just updates the last record.

Can the query be written so that it updates each of the three records?

cheers

Mark

On Mon, 15 Apr 2002, Joseph Jude wrote:

> Are you sure job_number in your script equals to all the three records and not just 
>one record?
>
>
> -----------------------------------------
> Joseph Jude
>   ----- Original Message -----
>   From: Mark Dale
>   To: [EMAIL PROTECTED]
>   Sent: Monday, April 15, 2002 6:33 AM
>   Subject: Multiple updates
>
>
>
>   I'm now trying to UPDATE the three records with one query.
>
>   Once the data is INSERTED into the db with this -
>
>   insert into mytable (id,name,job_number,job_date) values
>   ('1','Mark','AA1','2002-04-15'),
>   ('2','Mark','AA2','2002-04-16'),
>   ('3','Mark','AA3','2002-04-17');
>
>   a form page is displayed where all the job_dates can be changed (updated).
>
>   I'm using this to update -
>
>   $sql = "UPDATE mytable set job_date='$job_date' where job_number
>   ='$job_number'";
>   $result = @mysql_query($sql, $connection) or die.....;
>
>   and it only changes the last record. Could someone kindly tell me what I'm
>   doing wrong.
>
>   cheers
>
>   Mark
>
>
>    --------------------------------------
>       Mark Dale
>
>       phone/fax: 02  6247.6731
>          mobile:     0403.831748
>      email: [EMAIL PROTECTED]
>
>    --------------------------------------
>
>
>   ---------------------------------------------------------------------
>   Before posting, please check:
>      http://www.mysql.com/manual.php   (the manual)
>      http://lists.mysql.com/           (the list archive)
>
>   To request this thread, e-mail <[EMAIL PROTECTED]>
>   To unsubscribe, e-mail <[EMAIL PROTECTED]>
>   Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>
>
>
>


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to