Hi,
I'm writing a small database browser app that allows the user to walk through a database, browse the fields, and perform some basic SQL statements on the fields. Basicly, a lite version of phpMyAdmin.
Anyway, my question reloves around some basic SQL, which I don't have a firm grasp of just yet. Basicly (and I don't know if this is a good idea or not) the script gets 7 variables -
$field_assoc['name']
$field_assoc['value']
$field_assoc['type']
$field_assoc['properties']
$field_assoc['is_null']
$field_assoc['primary_name']
$field_assoc['primary_value']
1-5 are the variables the user selected via the form on the previous page, and 'primary_name' is the unalterted name of the primary field, and 'primary_value' is the unaltered value of the primary_field. So basicly, what I need is the SQL code that sort of mirros this psuedocode -
ALTER COLUMN someColumn SET someThing = $field_assoc['value'] WHERE $field_assoc['primary_name'] = $field_assoc['primary_value'];
If anyone is an SQL wiz, the help would be appriciated.
Thanks,
-Alex