Parašė WantedBoy· 2007 Lap. 6 23:11:13
#3
Tai aš formas pasidares tik man reikia scriptuko kad padarytu uzklausa ir ish
mysql tos info ishemimo scriptuko :)
--------------------------------------------------------------------------
Va mano
mysql uzklausa:
<?php
if (!defined("IN_FUSION")) { header("Location:../../index.php"); exit; }
$inf_folder = "rezultatai";
$inf_admin_image = "";
$inf_admin_panel = "rezultatai_admin.php";
// Duombaze
$inf_newtables = 1;
$inf_altertables = 0;
$inf_deldbrows = 0;
$inf_newtable_[1] = "rezultatai (
id int(255) unsigned NOT NULL auto_increment,
komanda1 varchar(55) NOT NULL default '',
rezultatas1 varchar(55) NOT NULL default '',
rezultatas2 varchar(55) NOT NULL default '',
komanda2 varchar(55) NOT NULL default '',
PRIMARY KEY (id)
) TYPE=MyISAM AUTO_INCREMENT=1 ;
";
$inf_droptable_[1] = "rezultatai";
?>
Cia ziurejimo skriptas.Tai kaip dba?
<?
require_once "../../maincore.php";
require_once BASEDIR."subheader.php";
require_once BASEDIR."side_left.php";
echo "<table width='100%'>\n";
$uzklausa=mysql_query("SELECT komanda1, rezultatas1, rezultatas2, komanda2 from ".$db_prefix."rezultatai order by id");
if (dbrows($uzklausa)) {
echo "<tr>
<td class='tbl1'><b>Komanda</b></td>
<td class='tbl1'><b>Rezultatas</b></td>
<td class='tbl1'><b>Rezultatas</b></td>
<td class='tbl1'><b>Komanda</b></td>
</tr>\n";
$i = 1;
while ($data = dbarray($uzklausa)) {
$i = $i+1;
$tbl = $i%2 == 0 ? "class='tbl2'" : "class='tbl1'";
echo "<tr>
<td $tbl><center><img src='/images/nbalogo/".$data['komanda1']."'></center></td>
<td $tbl><center><b>".$data['rezultatas1']."</b></center></td>
<td $tbl><center><b>".$data['rezultatas2']."</b></center></td>
<td $tbl><center><img src='/images/nbalogo/".$data['komanda2']."'></center></td>
</tr>\n";
}
}
echo "</table>\n";
require_once BASEDIR."side_right.php";
require_once BASEDIR."footer.php";
?>
Redagavo ramon· 2007 Lap. 6 23:11:42