How to insert data into existing row
Posted: Sat Oct 23, 2010 4:44 am
Hi there,
Suppose I have a mysql table like this
Table:multiple
================================
id | date | colA | colB | colC | colD |
================================
Now, I have two cron job setted. cronA.php will have to insert data like this way:
INSERT into MULTIPLE (date, colA, colB) Values(23-09-10,2305,2306)
while a second cron job will execute the cronB.php at later, I want to add data somethin like this:
INSERT into MULTIPLE(colC,colD)Values(2407,208) WHERE date="23-09-10"
i.e I want to add values for colA & ColB at one time and values for colC and colD at later time for the same row (suppose, row id is 10 in both cases)
is it possible? If yes,then please mention the php syntax for this type of job.
Regards.
Suppose I have a mysql table like this
Table:multiple
================================
id | date | colA | colB | colC | colD |
================================
Now, I have two cron job setted. cronA.php will have to insert data like this way:
INSERT into MULTIPLE (date, colA, colB) Values(23-09-10,2305,2306)
while a second cron job will execute the cronB.php at later, I want to add data somethin like this:
INSERT into MULTIPLE(colC,colD)Values(2407,208) WHERE date="23-09-10"
i.e I want to add values for colA & ColB at one time and values for colC and colD at later time for the same row (suppose, row id is 10 in both cases)
is it possible? If yes,then please mention the php syntax for this type of job.
Regards.