Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Displaying SQL feilds in HTML using PHP
Old 10-18-2007, 12:47 PM Displaying SQL feilds in HTML using PHP
Novice Talker

Posts: 7
Name: Michael
Trades: 0
This one seems harder than it probably is, I basically want to display the 6 most recent members of my website like so:

mikes is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 10-18-2007, 01:19 PM Re: Displaying SQL feilds in HTML using PHP
l3lueMage's Avatar
Skilled Talker

Posts: 73
Location: San Jose, California
Trades: 0
SELECT * FROM TBLUSERS ORDER BY [DATE] DESC LIMIT 6

I think x.x
l3lueMage is offline
Reply With Quote
View Public Profile
 
Old 10-19-2007, 12:14 AM Re: Displaying SQL feilds in HTML using PHP
Novice Talker

Posts: 7
Name: Michael
Trades: 0
I like your thinking but assuming i'll get a few people join the site each day is there anyway to display realtime new members?
mikes is offline
Reply With Quote
View Public Profile
 
Old 10-19-2007, 03:17 AM Re: Displaying SQL feilds in HTML using PHP
maxxximus's Avatar
Extreme Talker

Posts: 219
Name: Rob
Location: UK
Trades: 0
Quote:
Originally Posted by l3lueMage View Post
SELECT * FROM TBLUSERS ORDER BY [DATE] DESC LIMIT 6

I think x.x
Just change [DATE] to the userID (auto-increment primary key).
maxxximus is offline
Reply With Quote
View Public Profile
 
Old 10-20-2007, 05:31 AM Re: Displaying SQL feilds in HTML using PHP
Junior Talker

Posts: 3
Name: Ben
Trades: 0
PHP Code:
$query "SELECT * FROM users ORDER BY uid DESC LIMIT 6";

$query mysql_query($query);

while(
$users mysql_fetch_assoc($query)) {

echo 
$users['username'] . ", ";


Something like that too, would work, for actually echoing the data.
benzoenator is offline
Reply With Quote
View Public Profile
 
Old 10-20-2007, 08:18 AM Re: Displaying SQL feilds in HTML using PHP
Experienced Talker

Posts: 34
Name: DesignersForHire
Location: India
Trades: 0
I think he need to display the latest visitors to the site.It can be down by adding a log table and using the format of the above query
__________________
Joseph

Please login or register to view this content. Registration is FREE
michael_1980 is offline
Reply With Quote
View Public Profile Visit michael_1980's homepage!
 
Reply     « Reply to Displaying SQL feilds in HTML using PHP
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.16819 seconds with 12 queries