|
Posted by Tony on 06/29/05 06:42
frizzle wrote:
> Wow thanks for all the replies!!!!
> I used Andy Hassall's way, and it works really good!
> There is a maximum of 10 results, so i don't
> expect any heavy calculations in this ...
>
> Now there is another thing i cant figure out:
> i need to update multiple rows, in 1 query.
>
> It has to have this effect:
>
> UPDATE pictures SET comment = 'this comment is really funny' WHERE id
> = '$id1' LIMIT 1
> UPDATE pictures SET comment = 'this comment is also funny' WHERE id =
> '$id2' LIMIT 1
Are you updating all of them to read the same?
UPDATE pictures SET comment='this comment is not funny' WHERE 1=1
Are you updating SOME of them to read the same?
UPDATE pictures SET comment='this comment is stupid' WHERE id='$id1' OR
id='$id2' OR id='$id3'...
Or, as it appears from above, you are updating them to read differently?
If the latter, then, sorry, but you'll have to run them one at a time.
> Somehow it keeps giving me an error.
( BTW - what gives you an error? )
--
Tony Garcia
Web Right! Development
Navigation:
[Reply to this message]
|