Re: [PHP-DB] Help With An UPDATE Query Please

2004-02-10 Thread Ignatius Reilly
UPDATE table SET column = CONCAT( MID( column, 2, LENGTH( column ) - 1 ), MID( column, 1, 1 ) ) WHERE column LIKE 'M%' HTH Ignatius _ - Original Message - From: "Shaun" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, February 10, 2004 14:15 Subjec

Re: [PHP-DB] Help with an UPDATE query please

2004-02-05 Thread John W. Holmes
> > I have (among others) two DATE columns in a table; Booking_Date and > > Booking_Completion_Date. How can I run a query that updates > > Booking_Completion_Date to be 2 days after Booking_Date where > > Booking_Completion_Date is NULL? UPDATE table SET Booking_Completion_Date = Booking_Date + I

[Fwd: Re: [PHP-DB] Help with an UPDATE query please]

2004-02-05 Thread Stuart Gilbert
[Forwarded for Paxson Jr. because this was only sent to me.] you can also easily use the mysql date functions http://www.mysql.com/doc/en/Date_and_time_functions.html On 05. Feb 2004, at 11:23 Uhr, Stuart Gilbert wrote: Presuming you have the date in your PHP code you could simply add 172800 (

Re: [PHP-DB] Help with an UPDATE query please

2004-02-05 Thread Stuart Gilbert
Presuming you have the date in your PHP code you could simply add 172800 (seconds in 2 days) to the current value and insert it in the same way as you are doing with your current dates. If you post how you're inserting your dates, what format you're using and stuff like that then you'll probabl