MySQL Union Query not returning expected result, -


mysql query returns second select results in union , have no idea why...can plz help?

$query  = "select name "; $query .= "from nutrients "; $query .= "where name '%{$sqlsafe_query}%' "; $query .= "limit 30 "; $query .= "union "; $query  = "select name "; $query .= "from supplements "; $query .= "where name '%{$sqlsafe_query}%' "; $query .= "limit 30"; 

$query  = "select name "; 

are lack of . before =?


Comments

Popular posts from this blog

javascript - IndexedDB error: Uncaught DataCloneError: Failed to execute 'put' on 'IDBObjectStore': An object could not be cloned -

java - Unable to make sub reports with Jasper -

sql - The object name contains more than the maximum number of prefixes. The maximum is 2 -