Jump to content

T-String Error


unemployment

Recommended Posts

You are using single-quotes (around the array index "id") inside of a single-quote delimited string. The single-quote before "id" is ending your string, and the "id" is an unexpected string. Since you can't put a variable inside a single-quote delimited string, you need to delimit the string with double quotes:

 

$emp = "SELECT employees.function FROM employees WHERE employees.userid=${r['id']}";

Link to comment
https://forums.phpfreaks.com/topic/224801-t-string-error/#findComment-1161167
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.