mysql_init() giving error
Posted: Sun May 20, 2007 9:35 pm
Hello,
Im getting the following error:
"Fatal error: Call to undefined function: mysqli_init() in /home/content/a/r/t/artecgroup/html/rfid_validator/get_refbase.php on line 9"
I have tried both mysql 4.1 and 5 (hosted with godaddy).
here is the code:
So, this is the line thats giving the error: "$con = mysqli_init();"
Im no pro, but that looks ok to me. Could it be GoDaddy?
Thanks in advance!
Im getting the following error:
"Fatal error: Call to undefined function: mysqli_init() in /home/content/a/r/t/artecgroup/html/rfid_validator/get_refbase.php on line 9"
I have tried both mysql 4.1 and 5 (hosted with godaddy).
here is the code:
Code: Select all
<?php
require_once('sql_rf.inc');
if (!(isset($_POST['tagid_data'])))
die("Wrong parameter!");
else
$tagid_data = $_POST['tagid_data'];
$con = mysqli_init();
/* set connection options */
$con->options(MYSQLI_INIT_COMMAND, "SET AUTOCOMMIT=0");
$con->options(MYSQLI_OPT_CONNECT_TIMEOUT, 5);
/* connect to server */
$con->real_connect('server', 'user', 'pw', 'db');
if (mysqli_connect_errno())
die("Connect failed: " . mysqli_connect_error());
$resultset = db_qry($con, $tagid_data);
$obj = $resultset->fetch_object();
if ($obj)
{
echo $obj->tag_id.",".$obj->tagid_data.",".$obj->description.",".$obj->reg_d_stamp;
}
else
{
echo("0");
}
/* The end of the connection */
$con->close();
?>Im no pro, but that looks ok to me. Could it be GoDaddy?
Thanks in advance!