?
Path : /home/admin/domains/happytokorea.com/public_html/include/ |
Current File : /home/admin/domains/happytokorea.com/public_html/include/module.php |
<? $queryc = "SELECT column_comment ,column_name,table_name FROM information_schema.columns where table_name='user' or table_name='product' "; $resc = mysql_query($queryc); $i=0; $j=0; while($fc = mysql_fetch_array($resc)){ $myarray2[$i][$j] = $fc[column_name]; $j++; $myarray2[$i][$j] = $fc[column_comment]; $i++; $j=0; } //print_r($myarray2); function get_comm($column_name,$array){ //$query = "SELECT column_comment AS comment FROM information_schema.columns WHERE table_name = '$table' and column_name='$column_name' "; //$res = mysql_query($query); //while($f = mysql_fetch_array($res)){ //$comm=$f[comment]; //} for ($i=0;$i<count($array);$i++){ if($array[$i][0]==$column_name){ $com = $array[$i][1]; } } return $com; } function get_comm_form_pos($pos,$table){ $sql = "select * from $table "; $res = mysql_query($sql); while($f = mysql_fetch_field($res)){ $fx[]= $f->name; } return $fx[$pos]; } ?>