Wuu Posted May 27, 2015 Report 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
Kemito Posted May 27, 2015 Report Posted May 27, 2015 100% zini, ka konekcija ir izveidojusies? Quote
Faks Posted June 2, 2015 Report 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
Wuu Posted June 3, 2015 Author Report 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
Faks Posted June 3, 2015 Report 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
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.