how to solve php mysqli query function problem does not execute

Solutions on MaxInterview for how to solve php mysqli query function problem does not execute by the best coders in the world

showing results for - "how to solve php mysqli query function problem does not execute"
Ana Sofia
29 Sep 2019
1<?php
2$con = mysqli_connect("localhost", "root", "", "test");
3if (mysqli_connect_errno()) {
4  printf("Connect failed: %s\n", mysqli_connect_error());
5  exit();
6}
7
8$query = "INSERT INTO files VALUES (NULL, 5, 'hello')";
9echo "<pre>Debug: $query</pre>\m";
10$result = mysqli_query($con, $query);
11if ( false===$result ) {
12  printf("error: %s\n", mysqli_error($con));
13}
14else {
15  echo 'done.';
16}