+(91)-(11)-23271551

Result

global $wpdb;
// this adds the prefix which is set by the user upon instillation of wordpress
$table_name = $wpdb->prefix . “your_table_name”;
// this will get the data from your table
$retrieve_data = $wpdb->get_results( “SELECT * FROM $table_name” );
?>

    foreach ($retrieve_data as $retrieved_data){ ?>

  • column_name;?>
  • another_column_name;?>
  • as_many_columns_as_you_have;?>

Database Output

“;

if ($result = $mysqli->query($query)) {

while ($row = $result->fetch_assoc()) {
$field1name = $row["col1"];
$field2name = $row["col2"];
$field3name = $row["col3"];
$field4name = $row["col4"];
$field5name = $row["col5"];

echo ‘‘.$field1name.$field2name.’
‘;
echo $field5name.’
‘;
echo $field5name.’
‘;
echo $field5name;
}

/*freeresultset*/
$result->free();
}