Is there any problem with this sentence? I don't know where the error is. PHPcode & lt ;? Php $ conmysql_connect (& quot; localhost & quot;, & quot; root & quot;, & quot;); if (! $ Con) {die (Couldnotconnect:. mysql_error ();} is there any problem with mys? I don't know where the error is
PHP code
------ Solution --------------------
PHP code
/* $ Sql1 = $ result = SELECT 'A1' FROM 'tab' WHERE 1; $ sql2 = $ result = SELECT 'A3 'FROM 'tab' WHERE 1; $ result1 = mysql_query ($ sql1, "$ con"); $ result2 = mysql_query ($ sql2, "$ con"); $ con1 = mysql_fetch_array ($ result 1 ); $ con2 = mysql_fetch_array ($ result 2); echo $ con1 ["con"]/$ con2 ["con"]; * // admire you too much, each line of the above code has an error !! $ Sql1 = 'select' a1 'FROM 'Tab 'Where 1'; $ sql2 = 'select' a3' FROM 'Tab 'Where 1'; $ result1 = mysql_query ($ sql1, $ con); $ result2 = mysql_query ($ sql2, $ con); $ con1 = mysql_fetch_array ($ result1); $ con2 = mysql_fetch_array ($ result2 ); echo $ con1 ['A1']/$ con2 ['A3'];