This program i have been debugging:
<?php
$SQLHost="localhost" ;
$SQLDBName="webgeein_database";
$SQLUser="webgeein_root" ;
$SQLPass="gaurav_singh";
$conn = new mysqli($SQLHost, $SQLUser, $SQLPass );
if ($conn->connect_error)
{
$strErr = sprintf ( "Could not connect to server [%s] Error Code [%d] \nError Message [%s]", $SQLHost, $conn->errno, $conn->error);
echo ( $strErr);
die ();
}
$conn->select_db ($SQLDBName);
$query = "SELECT * FROM student_record WHERE Name='RAMAN'" ;
if($query){echo("success");}else{echo("failure");}
$result = $conn->query($query, MYSQLI_STORE_RESULT );
if($result){echo("success");}else{echo("failure");}
$row = $result->fetch_assoc();
if($row){echo("success");}else{echo("failure");}
$AGE = $row ['Age'] ;
if($T_Status){echo("success");}else{echo("failure");}
echo($AGE);
?>
but even then the response is failure at running the query function.
and the result shown is
"""""successfailure."""""
I hope someone would solve the problem.
enter code here
Aucun commentaire:
Enregistrer un commentaire