Most efficient way to use arrays in MySQL statements?

psyclepop

New Member
Alright, take this for example:\[code\]$array['key'] = 'value';$SQL = "SELECT column FROM table WHERE column='{$array[key]}'";\[/code\]That's how I've been doing it, but of course if I were to enable E_ALL error reporting, I'd get a notice about using the undeclared constant, and it would assume 'key' instead of a constant.As such, I assume that's not the proper or more efficient way to do it, so what would be the most efficient way of doing that SQL query (or other relevant string)?
 
Back
Top