Jump to content

Archived

This topic is now archived and is closed to further replies.

CJLeah

Data from a DB

Recommended Posts

[code]<?php
$sql_users = mysql_query("SELECT * FROM users WHERE staff = 10, ORDER BY ID DESC LIMIT 0, 10");
$users = mysql_fetch_assoc($sql_users);
do {
($users['username'],("view_user?=".$users['id']),"default");
} while ($users = mysql_fetch_assoc($sql_users));  ?>[/code]

Above is the code i'm using to try and extract users that have a staff level of 10, but it's not working please help! Below is the error I get:


Parse error: parse error, unexpected ',' in /home/tmafia/public_html/staff.php on line 14

any help?


Share this post


Link to post
Share on other sites

[code]$sql_users = mysql_query("SELECT * FROM users WHERE staff = 10, ORDER BY ID DESC LIMIT 0, 10");
$users = mysql_fetch_assoc($sql_users);
do {
         echo $users['username'], <br>';
} while ($users = mysql_fetch_assoc($sql_users)); [/code]

what is this supposed to do
[code]("view_user?=".$users['id']),"default")[/code]

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.