MySQL Forums
Forum List  »  PHP

Re: Issue on Loading MySQL Temporary Table From Two Table Without Using Join
Posted by: Rick James
Date: July 11, 2014 04:34PM

> What specifically is not working?

In particular, check for errors after _every_ mysql statement and display them.

Your last experiment is missing UNION ALL between the two parenthesized SELECTs.

When doing a UNION like this, you might want to add an extra field in the SELECT to say which row has which values:

CREATE ... 
    AS (
        ( SELECT 'ecolo-cu-yes', ... FROM `ecolo-cu-yes` ... )
        UNION ALL 
        ( SELECT 'econo',        ... FROM `econo`        ... )
       )

Options: ReplyQuote


Subject
Written By
Posted
Re: Issue on Loading MySQL Temporary Table From Two Table Without Using Join
July 11, 2014 04:34PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.