Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.