Answers for "php select data from mysql database without column name"

SQL
0

php select data from mysql database without column name

function sql($sql) {
  global $db_cnx;
    $T_Return=array();
    $result=mysqli_query($db_cnx,$sql);
   
    $i=0;
    while ($i < mysqli_num_fields($result)) {           
        $fields[]=mysqli_fetch_field($result);
        $i++;
    }
   
    while ($row=mysqli_fetch_row($result)) {               
        $new_row=array();
        for($i=0;$i<count($row); $i++) {
            $new_row[ $fields[$i]->table][$fields[$i]->name]=$row[$i];
        }
        $T_Return[]=$new_row;
    }

   
    return $T_Return;
}
Posted by: Guest on November-30-2020
0

php select data from mysql database without column name

SHOW COLUMNS FROM table_name;
Posted by: Guest on November-29-2020

Code answers related to "php select data from mysql database without column name"

Code answers related to "SQL"

Browse Popular Code Answers by Language