I need to create a temp table from php and populate it with the result of a query,
Once populated I need to access the temporary table from another
function that sums up some (not all ) rows.
( I tried
$q="CREATE TEMPORARY TABLE jobswowork
SELECT job.name, ...
...WHERE work.job IS NULL";
and get Table 'user.jobswowork' doesn't exist )
I have a feeling the connection is closed before I query
the tmp tbl
1) I need to understand the syntax of creating a tmp or real table with a select statement.
2) what is the simplest way to populate a temp table,