MySQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsDatabasesMySQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old April 25th, 2003, 04:41 PM
dbdesigns dbdesigns is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Location: India
Posts: 2 dbdesigns User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
PHP & MySQL: Basics Tutorial by Ben Rowe

Hi,
I am new to this and I dont know much of PHP Coding. I took the PHP and mySQL Bascis tuts by Ben found on this page. The tut is extremely simple to understand and apply. Thumbs up to it. The tutorial says has an address book. Now all I want to do is, only display the very latest address and not the old ones. I would like to know how I do that? I tried different ways but all in vain. Please help me out with this. Any help provided will be highly appreciated. Please answer me keeping in mind that I dont have knowledge about PHP coding. Thank you

Reply With Quote
  #2  
Old April 25th, 2003, 09:43 PM
Ben Rowe
Guest
Dev Articles Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
whoa, its a been a while since ive done been though this article

MySQL by defaults orders the rows by the way you enter them into the database. So in order to get the last entry you could use the following query

SELECT * FROM address ORDER BY id DESC LIMIT 1

This would return the last entry of the table.

You could then use the mysql_fetch_array function to retrieve those results, and get the data array.

Reply With Quote
  #3  
Old April 26th, 2003, 03:53 AM
dbdesigns dbdesigns is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Location: India
Posts: 2 dbdesigns User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thnx alot Ben This really worked out for me *Cheers*

Last edited by dbdesigns : April 26th, 2003 at 04:14 AM.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesMySQL Development > PHP & MySQL: Basics Tutorial by Ben Rowe


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway