I have a problem where I do not have direct access to the database and need to generate some SQL queries for the client to copy paste directly into the SQL query box in phpMyAdmin.
What I am trying to achieve is: (this syntax does not work)
SET @var1 = Select id FROM Table1 WHERE another_id = 'UNIQUEID';
INSERT INTO Table2 ('v1', 'v2') VALUES (@var1 , 'blahblah');
@var1 will always be a single string.
How can i go about doing this using only sql statements?
Ok figured it out, waited 1 hour, and only 5 views and no replies.