mysql - sql syntax error with ( possibly ) null entries -


Sorry to troubles you with such basic questions. I'm getting an error "There is an error in your SQL syntax; Manual which is related to your MySQL SQL Server version, with the correct syntax for using the" line line "for the correct line." Thanks in advance

  & lt ;? Php $ con = mysql_connect ("localhost", "......", "......"); $ Database = "......"; $ Fine = mysql_select_db ($ database, $ conn); Mysql_set_charset ("UTF8", $ Conn); $ Us1 = $ _POST ['username1']; $ Sp1 = $ _POST ['startup1']; $ FP1 = $ _POST ['Last Last 1']; $ W1 = $ _POST ['Weight 1']; $ Dd1 = $ _POST ['depDate1']; $ DT1 = $ _POST ['Dupay 1']; $ Sql ​​= mysql_query ("Select 'Username 1`,` Starter 1`, `Last Revolving 1`,` Weight 1`,' Deputy 1`, 'Deputy 1`,' Tilephone 1 'by Customer, Registration 1 Where ('SP1' is zero or customer, startupply 1 = 'Sp1') and ('FP1' is zero or customer), Finplp 1 = 'FP1') and ('w1' is zero or customer weight 1 = 'W1') and ('DD1' is zero or customer DPD1 = 'DD1') and ('DT1' is zero or customer. DEPTime 1 = 'DT1') and (Customer Name 1 = Registration 1 . User name ); If ($ sql === incorrect) {dead (MyScall_arper ())}} = result ($ line = mysql_fetch_assoc ($ sql)) {$ result [] = array ('username1' = & gt; $ line [ 'Username1'], 'start page 1' = & gt; $ line ['startpollie1'], 'finalPoli1' => $ line ['last window 1'], 'weight1' => gt; line ['Weight 1'], 'deputy 1' = & gt; $ line ['depDate1'], 'Dept 1' => $ line ['depTime1'], 'tilephono 1' = & gt; $ line [ 'Tilefono1']);} echo json_encode (array ('select_itin_re sults' =>); mysql_close ($ thief);? & Gt;  

You missed (or last position) This is your SQL at the end of a round bracket SQL

  (with extra unnecessary round brackets):