vingne
08-25-2005, 09:38 AM
Hey.
I want to make a query to a database, and display it on my php page either through php code or with 2 queries to my mysql database.
This is how i want it displayed:
Data 1 Data 2
Data 3 Data 4
Data 5 Data 6
Data 7 Data 8
... ....
Data X Data X
This is my current code which i use and get it displayed in 1 row:
$db->Query("SELECT * FROM Applications WHERE ugp_id='".$ugp."' ORDER BY app_name","applications");
echo "<table class='main'>\n";
while ( $applications = mysql_fetch_assoc($db->res['applications'])) {
echo " <tr>\n";
echo " <td>\n";
echo " <a href='index.php?s=applications&applications=show&id=" .$applications['app_id'] ."'>" . $applications['app_name'] . "</a>\n";
echo " </td>\n";
echo " </tr>\n";
}
echo "</table>\n";
I want to make a query to a database, and display it on my php page either through php code or with 2 queries to my mysql database.
This is how i want it displayed:
Data 1 Data 2
Data 3 Data 4
Data 5 Data 6
Data 7 Data 8
... ....
Data X Data X
This is my current code which i use and get it displayed in 1 row:
$db->Query("SELECT * FROM Applications WHERE ugp_id='".$ugp."' ORDER BY app_name","applications");
echo "<table class='main'>\n";
while ( $applications = mysql_fetch_assoc($db->res['applications'])) {
echo " <tr>\n";
echo " <td>\n";
echo " <a href='index.php?s=applications&applications=show&id=" .$applications['app_id'] ."'>" . $applications['app_name'] . "</a>\n";
echo " </td>\n";
echo " </tr>\n";
}
echo "</table>\n";