jeudi 13 novembre 2014

Load mysql result into php varible


Vote count:

0




Hello i have this code:



<?php $servername = "xxx";
$username = "xxx";
$password = "xxx";
$dbname = "xxx";

// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}




$sql = "SELECT varible FROM test";
$result = $conn->query($sql);
echo $result;

?>


All i want to load number from mysql table and load it into php varible and work with that varible as number Thanks for any reply



asked 1 min ago







Load mysql result into php varible

Aucun commentaire:

Enregistrer un commentaire