ed
Member
Registered: 10th Sep 03
User status: Offline
|
Right, got a simple query which selects the first five records from a database like so:
SELECT Public_ID,User_ID,Full_URL,Description FROM jbs_images WHERE Accepted=1 && YT_ID='wait' ORDER BY Last_Update LIMIT 0,5
Is it possible to update a value while doing a select? I'd like to set YT_ID to 'queued' somehow, could do a second query I suppose.
|
Ian
Site Administrator
Registered: 28th Aug 99
Location: Liverpool
User status: Offline
|
No, update and select are separate.
Although the where clause will be the same to select the same records you want to affect.
|
ed
Member
Registered: 10th Sep 03
User status: Offline
|
Two queries it is then - thanks
|
Baskey
Member
Registered: 31st May 06
User status: Offline
|
You wouldn't be updating it but you could use a case statement to display 'queued' instead of wait in the results
|