Webmaster Forum


Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Coding Forum Problems with your code? Let's hear about it.

Bidding Directory   1,000 Directory Submissions   V7N Directory

Reply
 
LinkBack Thread Tools Display Modes
Old 11-26-2004, 06:15 PM   #1 (permalink)
v7n Mentor
 
Sketch's Avatar
 
Join Date: 05-06-04
Location: London, UK
Posts: 1,452
iTrader: 0 / 0%
Latest Blog:
None

Sketch is a highly respected web proSketch is a highly respected web proSketch is a highly respected web proSketch is a highly respected web proSketch is a highly respected web proSketch is a highly respected web proSketch is a highly respected web proSketch is a highly respected web proSketch is a highly respected web proSketch is a highly respected web proSketch is a highly respected web pro
SQL - Very Basic

I'm stupid, I don't know what I'm doing

I have 'updateTBL' < Table
With 2 Columns, A_COUNT, A_DATE. Very simple, the count is the primary key and increments by one each time a new date is added. How do I select the Max A_COUNT so that it will show the most recent date?

I tried;

Code:
SELECT A_DATE FROM updateTBL WHERE A_COUNT = MAX(A_COUNT);
Edit;
I didn't know how to delete the post, but I found out a solution

Code:
SELECT * FROM updateTBL WHERE 1 ORDER BY A_COUNT DESC LIMIT 0,1
I guess it isn't the best way to do things, but hey it works

Last edited by Sketch : 11-26-2004 at 06:29 PM. Reason: Found Solution
Sketch is offline  
Add Post to del.icio.us
Reply With Quote
Sponsored Links
SEO Hosting by HostGator  Advertise Here  Buy Blog Links
Old 11-27-2004, 02:41 AM   #2 (permalink)
Contributing Member
 
DragonEye's Avatar
 
Join Date: 10-13-03
Location: Belgium
Posts: 316
iTrader: 0 / 0%
Latest Blog:
None

DragonEye is liked by somebodyDragonEye is liked by somebodyDragonEye is liked by somebodyDragonEye is liked by somebodyDragonEye is liked by somebody
Send a message via MSN to DragonEye
selecting the highest A_count is just

SELECT MAX(A_count) from updateTBL

it's quite easy, always use the easy solution
DragonEye is offline  
Add Post to del.icio.us
Reply With Quote
Old 11-27-2004, 06:43 AM   #3 (permalink)
v7n Mentor
 
Sketch's Avatar
 
Join Date: 05-06-04
Location: London, UK
Posts: 1,452
iTrader: 0 / 0%
Latest Blog:
None

Sketch is a highly respected web proSketch is a highly respected web proSketch is a highly respected web proSketch is a highly respected web proSketch is a highly respected web proSketch is a highly respected web proSketch is a highly respected web proSketch is a highly respected web proSketch is a highly respected web proSketch is a highly respected web proSketch is a highly respected web pro
Yer but I wanted to pull up date that date of the highest count, not the highest count itself...
Sketch is offline  
Add Post to del.icio.us
Reply With Quote
Old 11-27-2004, 10:36 AM   #4 (permalink)
Inactive
 
littleFella's Avatar
 
Join Date: 06-20-04
Location: Ontario
Posts: 3,359
iTrader: 0 / 0%
Latest Blog:
None

littleFella is a splendid one to beholdlittleFella is a splendid one to beholdlittleFella is a splendid one to beholdlittleFella is a splendid one to beholdlittleFella is a splendid one to beholdlittleFella is a splendid one to beholdlittleFella is a splendid one to beholdlittleFella is a splendid one to beholdlittleFella is a splendid one to beholdlittleFella is a splendid one to beholdlittleFella is a splendid one to behold
SELECT A_DATE
FROM updateTBL
WHERE A_COUNT = (SELECT MAX(A_COUNT) FROM updateTBL)
littleFella is offline  
Add Post to del.icio.us
Reply With Quote
Old 11-27-2004, 05:41 PM   #5 (permalink)
v7n Mentor
 
Sketch's Avatar
 
Join Date: 05-06-04
Location: London, UK
Posts: 1,452
iTrader: 0 / 0%
Latest Blog:
None

Sketch is a highly respected web proSketch is a highly respected web proSketch is a highly respected web proSketch is a highly respected web proSketch is a highly respected web proSketch is a highly respected web proSketch is a highly respected web proSketch is a highly respected web proSketch is a highly respected web proSketch is a highly respected web proSketch is a highly respected web pro
Cheers littleFella, thats the one I shall use now ;-)
Sketch is offline  
Add Post to del.icio.us
Reply With Quote
Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum

Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Need All The Help I Can Get -- Just Know Very Basic HTML x360 Web Design Lobby 3 06-22-2007 07:30 AM
Visual Basic Brian M Computers & Internet 4 12-18-2006 05:08 PM
Just BASIC Brian M Computers & Internet 7 12-14-2006 12:38 PM
basic seo $ digiweb SEO Forum 14 05-08-2006 05:49 PM
Basic concept? se4b4ss V7N Directory Issues 4 10-22-2004 01:54 AM


Sponsor Links
Get exposure! Get exposure! Find Scripts Web Hosting Directory Get exposure! SEO Blog


All times are GMT -7. The time now is 02:06 PM.
© Copyright 2008 V7 Inc