| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read | ![]() |
|
||||||
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Can anyone see anything wrong with this?
Code:
$query = "SELECT id,alias FROM users ORDER by id DESC LIMIT 5";
$lastreg = mysql_query($query);
while(list($id,$alias)=mysql_fetch_row($lastreg)){
$lastreg=$lastreg."$out[bulletleft] $alias";
}
if(!$lastreg){
$lastreg = "$out[bulletleft] No members yet"; //
}
|
|
|||
|
One last thing, if you go to at the top you can see there is an offer running off this script:
Code:
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/sites/online/public_html/home.php on line 62 Code:
while(list($id,$alias)=mysql_fetch_row($lastreg)){
|
|
|||
|
Quote:
This should work - Code:
$query = "SELECT id,alias FROM users ORDER by id DESC LIMIT 5";
// $lastreg1 is now the resource id
$lastreg1 = mysql_query($query);
while(list($id,$alias)=mysql_fetch_row($lastreg1)){
$lastreg=$lastreg."$out[bulletleft] $alias";
}
if(!$lastreg){
$lastreg = "$out[bulletleft] No members yet"; //
}
Last edited by scottie2212; 05-12-2008 at 07:33 AM. |
![]() |
| Thread Tools | |
| Display Modes | |
|
|