所以我有这个查询里面搜索torrent_download,torrent_download只能是1或者0;if else sql语句后查询
$sql_istorrenthere = $this->query("SELECT torrent_download
FROM " . DB_PREFIX . "auctions WHERE
auction_id='" . $item_details['auction_id'] . "'");
if (empty($sql_istorrenthere))
{
$display_output = GMSG_NOTORRENT;}
else
$display_output = GMSG_TORRENT;
}
我想要做的是if (empty($sql_istorrenthere))
喜欢的东西if $sql_istorrenthere == 1 then $display_output = GMSG_NOTORRENT; else $display_output = GMSG_TORRENT;
如何做到这一点更换部件?
'的var_dump($ sql_istorrenthere);' –
@KarolyHorvath我得到这个在类型(MySQL的结果)页面资源(156)的顶部,但在GMSG –
如何连接到你的数据库没有变化?你可能需要使用'$ row = $ sqlistorrenthere-> fetch_assoc(); var_dump($ row);'做完'$ this-> query(...);' – Daan