Newbie PHP/mySQL Fetch Array Question...
Posted: Mon Jun 02, 2008 3:29 pm
Hi everyone. Im a novice PHP/mySQL guy and Im trying to work something out for my website. Essentially I have been using a flat file text database to update listings for performances at my job's venue. It is getting tedious to update the text file all the time so I created a mySQL database and installed an awesome table editor that allows me to add and delete quickly. But Im having trouble figuring out how to display the information coming from the database.
Before it was pretty simple. I used a while loop and extracted the performance information in loop for a total of 6 listings. Ive been messing around with mysql_fetch_array and cant see to figure out how to limit my results to 6 rows only. Everything I come across is:
which just returns everything. Could anyone help me figure out to to limit my rows to only 6? Thanks!
Before it was pretty simple. I used a while loop and extracted the performance information in loop for a total of 6 listings. Ive been messing around with mysql_fetch_array and cant see to figure out how to limit my results to 6 rows only. Everything I come across is:
Code: Select all
while ($row = mysql_fetch_array($result))