multiple oracle queries: 1 statement

wxdqz

New Member
PHP People:

I'm happy enough to have PHP talking to my oracle database. At this point I have created a ticketing DB that has 1 query per page. Obviously I'd like to have variable substitution in my :

$sql

so that the user can pick which table, column or qualifier to have in the sql statement.

The following works:

$sql = "select * from web where owner='$case'";

The $case is fed to the script by html form tags.

PROBLEM:
How do I make a variable substitution for "owner" so that the user giving input can choose which column he/she will query. All input is taken with the standard:

<input type="text" name="case"></input>

I have tried using:
$sql = "select * from web where $column=$case

but the php & oracle don't seem to like variable substitution for the column name. It always works on the other side of the = sign.

Thanks !
Roger
 
Back
Top