[eluser]James Pax[/eluser]
thank you seppo... my internet got cut off last night (ugly provider lol) and had problems sending in my code!
anyways...
I'm getting this:
Code:
//get the list of tables
$tables = $this->db->list_tables();
//parse the tables
foreach ($tables as $table)
{
$data[$table]=array();
//get table field metadata
$fields = $this->db->field_data($table);
$data[$table]['fields']=array();
//parse fields one by one
foreach ($fields as $field)
{
//array fields check
var_dump($field);
gives me
no "type" and probably wrong
"max_length" in 'mysqli'
(edit: I don't know about the primary_key it might return the length of the int,the result doesn't change I guess length of FALSE=0 length of TRUE=1 ?? )
var_dump:
Code:
array(1) { ["id"]=> array(3) { ["type"]=> string(6) ["max_length"]=> int(1) ["primary_key"]=> int(1) } }
(edit: with 'mysql' driver I get the type in the var_dump)
then I get
just like seppo:
Code:
ALTER TABLE `users` CHANGE Array NOT NULL
even for
modify_column
(edit: by passing an array like the one above)
I'm so happy Derek Allard is going to give a look into it
ps: damn had to wait another 5 hours to post this...