Php SQL Syntax error by a database alignment (?)! -


If im just blind, but that does not make sense, because I always write it like this and I see Anything wrong with it, besides I used several SQL solution bits in syntax ...

Here is my PHP code:

  $ sql1 = "Select Table 1.File_Name, Table 2 with table 1. AS T1 Left job table 2 as T2 on T1.File_Name = T2.Today where T. Carrie Or T Lkfail_nam & lt; & gt; T 2kfail_nam or t1.file_name & lt; & gt; T 2kpath "; $ Sql2 = "Include table 3 (file_name) values ​​(". $ Sql1. ")"; Shopware () - & gt; DB () - & gt; Query ($ sql2);   

My error message:

  SQLSTATE [42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; Zend \ Db \ statement \ Pdo.php on 'Select Table 1.File_name, Table 2' on line 1. To use 'Before (2 letters before 1 table)', check the manual related to your MySQL server version for the correct syntax. Line 234   

has been written as:

 < Code> INSERT ... select ... from ... ...   

not as INSERT ... VALUES (SELECT ... FROM ...); .

Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -