Jump to content

[SOLVED] altering tables in database through php code


shan.india

Recommended Posts

i am writing code for a software for manging staff of a clinic.. and i want that as soon as i insert a new staff  a new field to be created in one of the database table.

One, more thing i want to know is that, that in my software i even want to add data to the fields code will be creating...so how should i write the code for creating fields by altering table and how to use these fields in database.

please help me out soon.

hey i am clueless.

i have created a code for linking field of a database table with the staff but it is hardcoded.

what i want is that whenever a new field is created in db, it links upto staff like staff1 is linking to event_id_staff_1 where 'event_id_staff_1' is the field name.

$staff_db_name = array (

'staff1' => 'event_id_staff_1',

'staff2' => 'event_id_staff_2',

'staff3' => 'event_id_staff_3',

);

waiting for reply

Thanks

Shan

There many tutorials around (including the link In my sig) that deal with database management with php. Do you want us to write one specifically for you? I'm not trying to be rude, but you need to learn to walk before you can run and we are not really here to hold your hand.

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.