The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.2.25 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/showthread.php 28 require_once





× This forum is read only. As of July 23, 2019, the UserSpice forums have been closed. To receive support, please join our Discord by clicking here. Thank you!

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Retrieving details from a Database to table
#3
Code:
$db->findAll("customers");

Code:
if (!$db->error()  &&  $db->count()>0) {
Code:
$customers = $db->results(true);
Code:
echo "<TABLE CLASS=\"table\"><TR>";

Code:
foreach ($customers[0] as $key=>$value)
Code:
echo "<TH>$key</TH>";

Code:
echo "</TR>";

Code:
foreach ($customers as $customer) {
Code:
echo "<TR>";

Code:
foreach ($customer as $value)
Code:
echo "<TD>$value</TD>";

Code:
echo "</TR>";
Code:
}

Code:
echo "</TABLE>";
Code:
}
  Reply


Messages In This Thread
Retrieving details from a Database to table - by faguss - 07-05-2017, 09:28 AM

Forum Jump:


Users browsing this thread: 2 Guest(s)