Hỏi Về lấy nội dung trong sql

  • Thread starter Thread starter Nicolas
  • Start date Start date
N

Nicolas

New Member
Cho hỏi chút :
Code này là để lấy bài đăng ở thể loại (idm) 1 :
$b=mysql_query("select idm, id, url, name, xem, noidung from truyen where idm='1' order by id desc limit $j, $show;");
Cho e hỏi , bây giờ e muốn lấy ở thể loại 1 và thể loại 2 thì sao (không phải của tất cả thể loại)
Em thử dùng and mà k dc
 
Moi the loai no co id rieng, code kia cua ban la nam trong ham array nen khong the xac dinh.
 
Thế có cách nào để lấy 2 thể loại trở lên không bạn?
 
Code:
$b=mysql_query("select idm, id, url, name, xem, noidung from truyen where idm='1' order by id desc limit $j, $show;");
$c=mysql_query("select idm, id, url, name, xem, noidung from truyen where idm='2' order by id desc limit $j, $show;");
vậy thôi, hay là sao?
 

Facebook Comments

Similar threads

D
Replies
0
Views
1K
dragon80
D
Admin
Replies
0
Views
11K
AdminAdmin is verified member.
Admin
Back
Top