Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

how to solve php mysqli_query function problem does not execute

<?php
$con = mysqli_connect("localhost", "root", "", "test");
if (mysqli_connect_errno()) {
  printf("Connect failed: %s
", mysqli_connect_error());
  exit();
}

$query = "INSERT INTO files VALUES (NULL, 5, 'hello')";
echo "<pre>Debug: $query</pre>m";
$result = mysqli_query($con, $query);
if ( false===$result ) {
  printf("error: %s
", mysqli_error($con));
}
else {
  echo 'done.';
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #solve #php #function #problem #execute
ADD COMMENT
Topic
Name
9+7 =