|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
loop - only row 1 is looping
Hi all,
Currently in my mysql database there are 5 rows. I have it looping, however it posts the 1st row 5 times ( cause I have 5 rows). my output page displays the data via arrays ( so I can format the page better) my code is on my laptop not connected to the web so I cant post the code sorry. any help would be greatly appreciated. Thanks, Ben |
|
#2
|
|||
|
|||
|
RE: loop - only row 1 is looping
Without code it is hard to say. It sounds like you are not fetching another row from the database, but just redisplaying the first row you fetch 5 times.
|
|
#3
|
|||
|
|||
|
RE: loop - only row 1 is looping
Thanks for the reply Matt.
ive got it to fetch arrays not sure how to fetch rows and fetch arrays in the same query Ben |
|
#4
|
|||
|
|||
|
RE: loop - only row 1 is looping
|
|
#5
|
|||||
|
|||||
|
RE: loop - only row 1 is looping
I was trying to use this code, but I got the error's
Warning:mysql_num_rows(): supplied argument is not avalid MySQL result resource in c:/.... Warning:mysql_free_result(): supplied argument is not avalid MySQL result resource in c:/.... php Code:
|
|
#6
|
|||
|
|||
|
RE: loop - only row 1 is looping
After mysql_query(), do
echo mysql_error(); to see what the problem with the query is |
|
#7
|
|||
|
|||
|
RE: loop - only row 1 is looping
could it be the 'date'? that is a reserve word aint it?
|
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Database Help > loop - only row 1 is looping |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|