Jump to content

add values into class file


jason213123

Recommended Posts

hi,

i have a class file that have all values from a database fields.

for example:

 

 

class mospedidos extends mosDBTable {

id = null;

date =null;

}

 

class mosunder extends mosDBTable {

id = null;

name =null;

}

 

each time i creat a new field in the database i need add the same field in the

class file, what i want is a way using  php to add that new field to the class file.

i just need a way to open the file and the class name that i give and add the value

and save the file.

how can i do this?

thanks for your help

:)

Link to comment
https://forums.phpfreaks.com/topic/254305-add-values-into-class-file/
Share on other sites

hi,

yes but i also need the default value for example

 

date =null; or date =1; etc

so i think in use a form in the script that can creat in same time a field in the database and the same value in the class.

in that form i can define the type of the field and the default value that i will be stored in the class file :)

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.