Hi all, I got very confused on a script that I asked someone to write it for me. It is very simple script which is about adding news and displaying them on the index page. Currently it shows only 3 news, and I want it to show 5 or 7 news on the index page. PM me if you are interested, I will send you the details and the script. As far as I know, it is very simple cus the person who wrote that script change it from displaying 5 news to 3 news so fast. (I dont believe it will take 5 mins) I guess what he did was to find the number 5 on the index.php and change to 3. I am quite sure it was like this. I will pay you via paypal.
The code is below: It shows only 3 news like in this link HERE I want it to show 5 news. When I change the below code's order by id desc limit 2 "; to limit 4 it shows 5 news but last 4 news on the same raw. I wanna see 2 news in one raw and the other 2 news under it. $sqllist="select * from demirtepe where id < $list[id] and durum=0 order by id desc limit 2 "; Thanks a lot for your helping
simple change $sqllist="select * from demirtepe where id < $list[id] and durum=0 order by id desc limit 2 " PHP: to $myvalue = "5"; //the number you want $sqllist="select * from demirtepe where id < $list[id] and durum=0 order by id desc limit $myvalue"; PHP:
thats not the problem... as he said, he gets them all in a row but he needs them 2 in a row and in 3 columns.
Hi, Thanks a lot for everyone who tried to help me out on that problem. The problem is solved with this code and thread might be closed. $sqllist="select * from demirtepe where id < $list[id] and durum=0 order by id desc limit 2,2 ";
Just some critism on your coding 'style'; $sqllist = "SELECT * FROM `demirtepe` WHERE `id` < '$list[id]' AND `durum` = '0' ORDER BY `id` DESC LIMIT 2,2 "; Code (markup): Will help you enormous when you look at your code at a later stage.