[PHP-DB] Not solved - mysql data truncation does not cause an error to be thrown

2007-11-09 Thread Andrew Blake
Hello It seems that the normal mysql_query doesn't error when an sql command forces the server to truncate the data. The mysql server executes the sql and provides a warning but it still executes the sql so allowing php to ignore the fact that there is a warning. You can run another sql

Re: [PHP-DB] Not solved - mysql data truncation does not cause an error to be thrown

2007-11-09 Thread Andrew Blake
Should i say badly written code to reproduce the problem here is the code again with the errors ?php $dbhost = 'localhost'; $dbuser = 'root'; $dbpass = 'password'; $db= mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error connecting to mysql'); $dbname = 'andy';

Re: [PHP-DB] Not solved - mysql data truncation does not cause an error to be thrown

2007-11-09 Thread chris smith
On Nov 9, 2007 8:34 PM, Andrew Blake [EMAIL PROTECTED] wrote: Hello It seems that the normal mysql_query doesn't error when an sql command forces the server to truncate the data. The mysql server executes the sql and provides a warning but it still executes the sql so allowing php to ignore

Re: [PHP-DB] Not solved - mysql data truncation does not cause an error to be thrown

2007-11-09 Thread Andrew Blake
Hiya This seems to be one thing java has over php (perl etc) as it does know about the warning and acts approperately. This should be an option to ignore or not ignore warnings within php to prevent errorless truncation of data. Cheers Andy chris smith wrote: On Nov 9, 2007 8:34 PM, Andrew