~desarrollokumbia/kumbia/ActiveRecord

« back to all changes in this revision

Viewing changes to db_pool/adapters/mysql_db.php

  • Committer: Emilio Silveira
  • Date: 2010-06-16 03:20:43 UTC
  • Revision ID: emilio.rst@gmail.com-20100616032043-coxo4mz6l0nlzv8y
Puliendo codigo y corrigiendo bugs

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
    {
34
34
        try {
35
35
            $results = $this->pdo()->query("DESCRIBE $table");
36
 
            
 
36
                        
37
37
            if ($results) {
38
38
                require_once CORE_PATH . 'libs/ActiveRecord/db_pool/metadata.php';
39
39
                $metadata = new Metadata();
68
68
                    //indices
69
69
                    switch ($field->Key){
70
70
                        case 'PRI':
71
 
                            $metadata->setPK($field->Key);
 
71
                            $metadata->setPK($field->Field);
72
72
                            $attribute->PK = TRUE;
73
73
                            break;
74
74
                        case 'FK':
75
 
                            $metadata->setFK($field->Key);
 
75
                            $metadata->setFK($field->Field);
76
76
                            $attribute->FK = TRUE;
77
77
                            break;
78
78
                        case 'UNI':