|
|
|
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
PHP/MySQL Array
I have this bit of code which is supposed to be selecting all records from a table. Here:
PHP Code:
It works but it is only selecting one of the records that is to that user(first one), then when that one is deleted it is showing the next record to them. What should I do? I just want it to show all records in the table that have their username for the 'to' field. Thanks! |
|
#2
|
|||
|
|||
|
PHP Code:
EDIT: fixed the while line, thanks Llama
__________________
Sir, a desire of knowledge is the natural feeling of mankind; and every human being, whose mind is not debauched, will be willing to give all that he has to get knowledge. Last edited by jamestrowbridge : October 25th, 2009 at 03:54 AM. |
|
#3
|
|||
|
|||
|
if I had to guess, its because you are looping through the result and just setting the vars to the value and then after the loop echoing out the values in the vars. which would mean that you would only see the last message because on each loop you are just overwriting the value from the last message. you would need to do something like:
PHP Code:
if you could post more code it would also help. you are obviously not echoing anything out in the code you provided so speculation like this will be made. |
![]() |
| Viewing: Codewalkers Forums > PHP Related > PHP Coding > PHP/MySQL Array |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|