0
我在PHP非常非常新,我想修復別人寫的代碼。我設法做了一些修復,現在搜索工作,但我無法得到「沒有記錄」的消息。PHP - 沒有找到記錄
我是一個試圖教自己的新手,所以任何反饋意見。先謝謝你。
這裏是我的代碼:
塊引用
<?php $counter = 0;
while ($data_main = mysql_fetch_object($rs_main)) { ?>
<div id="thumbnail_div">
<a href="more_info.php?id=<?php echo $data_main->iuniqid; ?>"><*image here*/<?php echo $data_main->prefix; ?>_<?php echo stripslashes($data_main->iname); ?>" border="0" /></a><br />
<?php if ($data_main->itype != '') {
$sql_type = " select itype from type where id = ". $data_main->itype;
$rs_type = mysql_query($sql_type);
$data_type = mysql_fetch_object($rs_type); ?>
<*image here*<?php echo $data_main->itype; ?>.*extension*" width="10" height="10" alt="<?php echo $data_type->itype; ?>" title="<?php echo $data_type->itype; ?>" />
<?php } ?>
<?php if ($data_main->iotype != '') {
$sql_otype = " select itype from original_type where id = ". $data_main->itype;
$rs_otype = mysql_query($sql_otype);
$data_otype = mysql_fetch_object($rs_otype); ?>
<*image here*<?php echo $data_main->iotype; ?>.*extension*" width="10" height="10" alt="<?php echo $data_otype->itype; ?>" title="<?php echo $data_otype->itype; ?>" /><br />
<?php } ?>
<span class="textBody">Image ID <?php echo $data_main->iuniqid; ?></span>
</div>
<?php $counter++;
if ($counter == 5) {
$counter = 0; ?>
<div id="separatordiv"> </div>
<?php }
} ?>
<div style="clear:both;"></div>
<div align="center"><?php echo $page->get_page_nav(); ?></div>
塊引用
謝謝你這麼多丹!有效!我非常感謝你的幫助。乾杯 – NewAtPHP 2011-02-08 06:24:32