phpmyadmin - having trouble accessing mysql database -
i've started mysql.
created database "practice
" , table named "student info
"(i using xampp
local server).
able connect sql server unable perform query . error recieved
table practice.studentinfo doesn't exist
here code....
connecting server
<?php $host='127.0.0.1'; $user='root'; $pass='1234'; $db='practice'; if($link= mysqli_connect($host,$user,$pass,$db)) { echo "connected successfully"; } ?>
performing query
<?php include('db_connection.php'); $table="studentinfo"; $query =" select 'name' $table "; $result=mysqli_query($link,$query); if(false===$result) { printf("error: %s\n",mysqli_error($link)); } ?>
output:
connected error: table 'practice.studentinfo' doesn't exist
kindly help!!!!
Comments
Post a Comment