My site got it's Sybase 'auto_commit' disabled, I mean, if I type a (INSERT,
UPDATE, DELETE) query on ISQL's console I got the correct result, but the
same doesn't happen when I run the query via PHP. Check the code below:
<?
//includes with database connection and stuff
$xSql= "INSERT INTO oab_mailing_logs (nvaNomeMailing, nvaInicioEnvio,
nvaFimEnvio, dtDataEnvio, numTamanhoMailing, intLidos) VALUES ('teste', '0',
'0', '2003-01-01', 0, 0)";
$xQuery = sybase_query($xSql);
if($xQuery) //sybase_query returns me nothing. $xQuery is not tested on the
'if' clause, it just pass through both 'if' and 'else'.
{
"OK!<br>";
}
else
{
"Erro!<br>";
}
//sybase_query("commit"); //if I uncomment 'sybase_query("commit")' I got
what I want, I mean, the INSERT is done correctly, but note that I hadn't to
do this before, it's just stop running as it used to
//echo "xQuery-> ".$xQuery."<br>"; //it outputs '1'
echo "Executando a query: <b>".$xSql."</b><br>";
echo "Linhas afetadas: ".sybase_affected_rows($xQuery); //there's not output
here... it's kinda empty
sybase_free_result($xQuery);
?>
I haven't got any kind of error message, even on Sybase errorlog.
Can you help me ?
Thanks and the best regards
----------------------------------------------------------------------------
--
Nilo
Desenvolvedor WEB
A B I L I T Y
Solu��es interativas
+55 21 38526657
www.ability.com.br
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php