I have the following query
SELECT @var:= meta_value, @no:=post_id FROM tbl WHERE `meta_key` ="_wpbdp[fields][10]"
now this gets around 500 results..
I want to run another INSERT query for each value of @var and @no variable.
Example::
INSERT INTO tbl ('value','id') VALUES (@var,@no);
How do i get this in a LOOP??
INSERT...SELECTwork?