Title: unexpected T_VARIABLE Problem
Last modified: August 19, 2016

---

# unexpected T_VARIABLE Problem

 *  [newtothis](https://wordpress.org/support/users/newtothis/)
 * (@newtothis)
 * [18 years, 4 months ago](https://wordpress.org/support/topic/unexpected-t_variable-problem/)
 * I have reposted this in the correct catagory
 * I have been losing my mind (what little I have left) over this line of code.
 * $wpdb->query(“INSERT INTO ” $wpdb->$table_name (time, date, glucose, fast, comment)
   VALUES (‘ ” . time() . ” ‘,’ ” . date() . ” ‘,’ ” . $wpdb->escape($gluc) . ” ‘,’”.
   $wpdb->escape($fast) . ” ‘,’ ” . $wpdb->escape($comment) . ” ‘));
 * It generates the dreaded “Parse error: syntax error, unexpected T_VARIABLE” message.
 * Can anyone please tell me what is wrong with this line of code?
 * Thanks in advance,
    Jim

Viewing 1 replies (of 1 total)

 *  [Michael Fields](https://wordpress.org/support/users/mfields/)
 * (@mfields)
 * [18 years, 4 months ago](https://wordpress.org/support/topic/unexpected-t_variable-problem/#post-668810)
 * Maybe try:
 *     ```
       <?php
       $wpdb->query("
       	INSERT INTO " . $wpdb->table_name . "(time, date, glucose, fast, comment)
       	VALUES (' " . time() . " ',' " . date() . " ',' " . $wpdb->escape($gluc) . " ',' " . $wpdb->escape($fast) . " ',' " . $wpdb->escape($comment) . " ');
       	");
       ?>
       ```
   
 * Best to use backticks on column names:)

Viewing 1 replies (of 1 total)

The topic ‘unexpected T_VARIABLE Problem’ is closed to new replies.

## Tags

 * [parse-error](https://wordpress.org/support/topic-tag/parse-error/)
 * [syntax error](https://wordpress.org/support/topic-tag/syntax-error/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [Michael Fields](https://wordpress.org/support/users/mfields/)
 * Last activity: [18 years, 4 months ago](https://wordpress.org/support/topic/unexpected-t_variable-problem/#post-668810)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
