PHP & MS-SQL Syntax

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
quadoc
Forum Contributor
Posts: 137
Joined: Fri Jul 01, 2005 5:33 pm
Location: Atlanta, GA

PHP & MS-SQL Syntax

Post 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
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

did you echo the query?
User avatar
quadoc
Forum Contributor
Posts: 137
Joined: Fri Jul 01, 2005 5:33 pm
Location: Atlanta, GA

Post by quadoc »

Thanks, I'll try that. :)
Post Reply