Mark,

Earlier joke rebounds - pardon me whilst I wipe the comedic egg from my
face...

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


If you want EVERY row in the table to be updated then leave out the
WHERE clause.
BUT this is a risky technique to employ!

If job_number='$job_number' is not the correct criteria what is the
selection method you want to apply - a design question not a SQL
problem. eg WHERE LEFT(job_number, 2) = "AA". (see manual for string
functions, if it is working again)

Regards,
=dn


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