Jump to content

incorrect syntax


biircoop

Recommended Posts

Please help!

 

I am getting this error:

 

Warning: mssql_query() [function.mssql-query]: message: Line 2: Incorrect syntax near '<'. (severity 15) in E:\Inetpub\wwwroot\securty_tracking\admin_task_daily.php on line 39. The value of $dow should be the day of the week: Sunday, Monday, etc. 'hours_spent' is input from a text box. Let me know if you need anything else.

 

Here is the php code that I am trying to use. Line 39 is the execution of $sql_update. This causes a fail of the query.

 

 

$sql_insert="INSERT INTO TICKETS_DAILY

VALUES(".$ticket_id.",'".trim(strtoupper($_SESSION['username'])).

"', ".$req_id.",0,0,0,0,0,0,0)";

 

mssql_query($sql_insert);

 

$sql_update="UPDATE TICKETS_DAILY

SET ".$_REQUEST['dow']."=".$_REQUEST['hours_spent'].

" WHERE ticket_id=".$ticket_id.

" AND accepted_by='".trim(strtoupper($_SESSION['username']))."'

AND req_id=".$req_id;

 

mssql_query($sql_update);

Link to comment
https://forums.phpfreaks.com/topic/162814-incorrect-syntax/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.