•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 455,979 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,786 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 496 | Replies: 5
![]() |
•
•
Join Date: Feb 2007
Posts: 10
Reputation:
Rep Power: 2
Solved Threads: 0
Well Guys i really need you guys help.
I want to Show (display) Last 10 Categories Here is Sql Table for Categories.what i think is it can be done with 'cat_id',but i am not really getting this .anybody can help me ?
I want to Show (display) Last 10 Categories Here is Sql Table for Categories.what i think is it can be done with 'cat_id',but i am not really getting this .anybody can help me ?
CREATE TABLE `categories` ( `cat_id` int(10) unsigned NOT NULL auto_increment, `cat_name` varchar(255) NOT NULL default '', `cat_description` text NOT NULL, `cat_parent_id` int(10) unsigned NOT NULL default '0', `cat_hits` int(10) unsigned NOT NULL default '0', `cat_order` int(10) unsigned NOT NULL default '0', `auth_viewcat` tinyint(2) NOT NULL default '0', `auth_viewimage` tinyint(2) NOT NULL default '0', `auth_download` tinyint(2) NOT NULL default '0', `auth_upload` tinyint(2) NOT NULL default '0', `auth_directupload` tinyint(2) NOT NULL default '0', `auth_vote` tinyint(2) NOT NULL default '0', `auth_sendpostcard` tinyint(2) NOT NULL default '0', `auth_readcomment` tinyint(2) NOT NULL default '0', `auth_postcomment` tinyint(2) NOT NULL default '0', PRIMARY KEY (`cat_id`), KEY `cat_parent_id` (`cat_parent_id`), KEY `cat_order` (`cat_order`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=11 ;
•
•
Join Date: Aug 2007
Location: Cavite,Philippines
Posts: 508
Reputation:
Rep Power: 3
Solved Threads: 68
"Select * from categories order by cat_id desc"
"death is the cure of all diseases..."
http://ryantetek.wordpress.com
http://ryantetek.wordpress.com
•
•
Join Date: Aug 2007
Location: Cavite,Philippines
Posts: 508
Reputation:
Rep Power: 3
Solved Threads: 68
Ooh,I didn't see the last 10 thing.anyway,here it goes:
"Select * from categories order by cat_id desc limit 10"
to fatihpiristine:
dude,the order by must come first before the limit thing.
"Select * from categories order by cat_id desc limit 10"
to fatihpiristine:
dude,the order by must come first before the limit thing.
"death is the cure of all diseases..."
http://ryantetek.wordpress.com
http://ryantetek.wordpress.com
![]() |
•
•
•
•
•
•
•
•
DaniWeb PHP Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Similar Threads
- link exchange script (Existing Scripts)
- Entertainment Site for sale over 60,000 pages of quality content (Websites for Sale)
- Apache (Linux Servers and Apache)
- School assignment help (Pascal and Delphi)
- AIM, MSN Messenger, (Viruses, Spyware and other Nasties)
- Byondspeed Enjoy! Free Cpanel Hosting: Subject (Web Hosting Deals)
Other Threads in the PHP Forum
- Previous Thread: prevent re-run of script on page refresh
- Next Thread: Grab Mp3 Files and Play online


..
Linear Mode