Wuu Posted May 27, 2015 Report Share Posted May 27, 2015 $result = mysqli_query($link,'insert into;'); $output[] = array("error"=>"0ssss","errors"=>mysqli_error($link)); "output": [ { "error": "0ssss", "errors": "" } ] Kāpēc? Quote Link to comment Share on other sites More sharing options...
Kemito Posted May 27, 2015 Report Share Posted May 27, 2015 100% zini, ka konekcija ir izveidojusies? Quote Link to comment Share on other sites More sharing options...
Wuu Posted May 27, 2015 Author Report Share Posted May 27, 2015 Jap, pareizs query izpildās... Quote Link to comment Share on other sites More sharing options...
jurchiks Posted May 30, 2015 Report Share Posted May 30, 2015 errno arī nav? Quote Link to comment Share on other sites More sharing options...
Wuu Posted June 1, 2015 Author Report Share Posted June 1, 2015 Nope, mistika. Quote Link to comment Share on other sites More sharing options...
Faks Posted June 2, 2015 Report Share Posted June 2, 2015 (edited) $result = mysqli_query($link,'insert into;'); $output[] = array("error"=>"0ssss","errors"=>mysqli_error($result)); vienkarsi tu jau taisiji cheku uz datubazi nevis uz kveriju tapec jau ari neko nerada ^^ Edited June 3, 2015 by Faks Quote Link to comment Share on other sites More sharing options...
Wuu Posted June 3, 2015 Author Report Share Posted June 3, 2015 if (!mysqli_query($link, "SET a=1")) { printf("Errormessage: %s\n", mysqli_error($link)); } Čo? http://php.net/manual/en/mysqli.error.php Quote Link to comment Share on other sites More sharing options...
Faks Posted June 3, 2015 Report Share Posted June 3, 2015 (edited) if (!mysqli_query($link, "SET a=1")) { printf("Errormessage: %s\n", mysqli_error($link)); } Čo? http://php.net/manual/en/mysqli.error.php okey sorry mana laza bet nu palasiju druku Manual un tiku skaidriba sajaucu mysql ar mysqli. debug uz koda reku kods skraida te teu bus gatavs kods ar ko vari niekoties talak ceru ka noderes.... ini_set('display_errors', 'On'); error_reporting(E_ALL); ini_set('display_errors', '1'); $mysql_connect = mysqli_connect('127.0.0.1','lietotajs','kods','table',3306); if (mysqli_connect_errno($mysql_connect)) { printf("Connect failed: %s\n", mysqli_connect_error()); exit(); } $result = mysqli_query($mysql_connect,"select * from newsx"); #$test = mysqli_fetch_assoc($result); testeju lai redzet vai iet... #echo $test['title']; $output[] = array("errors" => mysqli_error_list($mysql_connect)); echo '<pre>'; print_r($output); echo '</pre>'; Edited June 3, 2015 by Faks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.