y***@gmail.com
2007-07-25 17:09:37 UTC
Hello All,
I was searching for a response about this topic but none get the right
answare, I hope i get help from you on this. :)
I trying to do an insert using a stored procedure to rely the charge
on the db but every type I run the call from my web page ussing PHP
5.X I get the same error.
This is what I'm doing:
______________________________________________________________________________________________
$link = mysql_connect( DB_HOST, DB_USER, DB_PASSWORD, true, 131074);
mysql_select_db(DB_NAME);
$sql = "call spTestCreate('" .
trim($Value1) . "', '" .
trim($Value2) . "', '" .
trim($Value3) . "', " .
$Value4 . ", " .
$Value5 . ", '" .
trim($Value6) . "', '" .
trim($Value7) . "', '" .
trim($Value8) . "') ; ";
$res = mysql_query($sql);
if (!$res) {
echo "Could not successfully run query (" . $sql . ") from DB: " .
mysql_error();
} else {
$row = mysql_fetch_row($res);
$LastId = $row[0];
}
______________________________________________________________________________________________
If I run the call from the SQLyog or any other tool it runs prefect
but that's not the case in the PHP.
Any Idea or Solution is welcome.
Thanks!
I was searching for a response about this topic but none get the right
answare, I hope i get help from you on this. :)
I trying to do an insert using a stored procedure to rely the charge
on the db but every type I run the call from my web page ussing PHP
5.X I get the same error.
This is what I'm doing:
______________________________________________________________________________________________
$link = mysql_connect( DB_HOST, DB_USER, DB_PASSWORD, true, 131074);
mysql_select_db(DB_NAME);
$sql = "call spTestCreate('" .
trim($Value1) . "', '" .
trim($Value2) . "', '" .
trim($Value3) . "', " .
$Value4 . ", " .
$Value5 . ", '" .
trim($Value6) . "', '" .
trim($Value7) . "', '" .
trim($Value8) . "') ; ";
$res = mysql_query($sql);
if (!$res) {
echo "Could not successfully run query (" . $sql . ") from DB: " .
mysql_error();
} else {
$row = mysql_fetch_row($res);
$LastId = $row[0];
}
______________________________________________________________________________________________
If I run the call from the SQLyog or any other tool it runs prefect
but that's not the case in the PHP.
Any Idea or Solution is welcome.
Thanks!