PHP MySql query not able to execute -
this my main code
if (isset($_post)) { include('connection.php'); $query = "call pgetuseridfromemail('" . $_session['email']. "')"; $result = mysqli_query($conn, $query); $row = mysqli_fetch_assoc($result); $userid = $row['idusers']; $query = "select * users"; $result = mysqli_query($conn, $query) or die("query no executed"); while($row = mysqli_fetch_assoc($result)) { echo $row['username']; } }
this connection data base
session_start(); $user = "root"; $pass = ""; $hostname = "localhost"; $database = "faana final"; //conection database $conn = mysqli_connect($hostname, $user, $pass, $database) or die(mysql_error());
this store procedure
begin select idusers users email = email1; end
i'm unable execute query echos query not executed
table names case sensitive in mysql, depends on operating system:
$query = "select * users"; select idusers users email = email1;
you might print mysql error lines below:
$result = mysqli_query($conn, $query1) or die(mysql_error()); //die("query no executed");
Comments
Post a Comment