Page 1 of 1

PHP & MS-SQL Syntax

Posted: Fri Aug 12, 2005 2:33 pm
by quadoc
I've the following errors, but I can't seem to figure out what's wrong. Could someone see what's wrong with it? Thanks.. :?

Code: Select all

$mail_id = $tixid;
			$mail_message =  $emailmessage;			
            $sent_time = mktime();
			$q_str = "insert into tbl_sent_email (id, message, system_time) values ('".$mail_id."','".$mail_message."','".$sent_time."')";	; this is line 205
			
			$q_res = mssql_query($q_str) or die(mssql_error());
Warning: mssql_query() [function.mssql-query]: message: Cannot insert explicit value for identity column in table 'tbl_sent_email' when IDENTITY_INSERT is set to OFF. (severity 16) in c:\Inetpub\wwwroot\WebTicket\admin\read.php on line 205

Warning: mssql_query() [function.mssql-query]: Query failed in c:\Inetpub\wwwroot\WebTicket\admin\read.php on line 205

Fatal error: Call to undefined function mssql_error() in c:\Inetpub\wwwroot\WebTicket\admin\read.php on line 205

Posted: Fri Aug 12, 2005 2:56 pm
by feyd
did you echo the query?

Posted: Fri Aug 12, 2005 3:05 pm
by quadoc
Thanks, I'll try that. :)