PHP -Warning: mysqli_fetch_array() -


php code:

<?php  $name = $_get['name']; $type = $_get['type']; $desc = $_get['desc'];           $con=mysqli_connect("localhost","root","","projdb");          // check connection         if (mysqli_connect_errno($con))         {         echo "failed connect mysql: " . mysqli_connect_error();         }          $res = mysqli_query($con,"select * __scannedfiles description '%$desc%' , title='$name' , doctype='$type' ");          while($row = mysqli_fetch_array($res)){             $path=$row[3];             echo '<a target=\"_blank\" href="'.$path.'"   title=\"\">'.$path.'</a> ';         } ?> 

error:

warning: mysqli_error() expects 1 parameter, 0 given. error.

it means query giving error, use mysqli_error() viewing error in query

$res = mysqli_query($con,"select * __scannedfiles description '%$desc%' , title='$name' , doctype='$type' ") or die(mysqli_error()); 

Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -