โค้ด: เลือกทั้งหมด
$sql_img = 'SELECT real_filename FROM ' . ATTACHMENTS_TABLE .
' WHERE ' . $this->db->sql_in_set('real_filename', 'imgpsh_fullsize_anim.png') .
' ORDER BY attach_id DESC';
$result_img = $this->db->sql_query($sql_img);
$row_img = $this->db->sql_fetchrow($result_img);
echo $row_img['real_filename'];
โค้ด: เลือกทั้งหมด
SELECT real_filename FROM phpbb_attachments WHERE real_filename = 'imgpsh_fullsize_anim.png' ORDER BY attach_id DESC
แต่พอผมจะนำค่าของ real_filename มาใช้ โดยการ echo
โค้ด: เลือกทั้งหมด
echo $row_img['real_filename'];
อยากทราบว่าควรปรับแก้อย่างไรครับ