Hallo,
wie kann man diesen Code kürzen?
Bin ja noch ziemlich neu dabei
Danke !
wie kann man diesen Code kürzen?
Bin ja noch ziemlich neu dabei
PHP-Code:
$sql = mysql_query('SELECT
userinquiry.userinquiryfromuserid,
userinquiry.userinquirytouserid,
userinquiry.userinquirypurpose,
userinquiry.userinquirydate,
user.username,
user.userid
FROM userinquiry, user
WHERE userinquiry.userinquirytouserid = '.$_SESSION["session_id"].'
AND userinquiry.userinquiryfromuserid = user.userid');
echo '<TABLE width=100%>';
echo '<TR><TD>Absender</TD><TD>Betreff</TD><TD>Datum</TD><TD>Annehmen?</TD></TR>';
while($row = mysql_fetch_object($sql))
{
echo '<TR><TD>'.$row->username.'</TD>';
echo '<TD>'.$row->userinquirypurpose.'</TD>';
echo '<TD>'.$row->userinquirydate.'</TD>';
echo '<TD>'.$row->userinquirypurpose.'</TD></TR>';
}
$sql2 = mysql_query('SELECT
userinquiry.userinquiryfromuserid,
userinquiry.userinquirytouserid,
userinquiry.userinquirypurpose,
userinquiry.userinquirydate,
user.username,
user.userid
FROM userinquiry, user
WHERE userinquiry.userinquiryfromuserid = '.$_SESSION["session_id"].'
AND userinquiry.userinquirytouserid = user.userid');
while($row = mysql_fetch_object($sql2))
{
echo '<TR><TD>'.$row->username.'</TD>';
echo '<TD>'.$row->userinquirypurpose.'</TD>';
echo '<TD>'.$row->userinquirydate.'</TD>';
echo '<TD>Wartend...</TD></TR>';
}
echo '</TABLE>';
Kommentar