Jump to content

Data from a DB


CJLeah

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?


Link to comment
https://forums.phpfreaks.com/topic/7916-data-from-a-db/
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]
Link to comment
https://forums.phpfreaks.com/topic/7916-data-from-a-db/#findComment-28868
Share on other sites

Archived

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

×
×
  • Create New...

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.