NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page Mysql problem

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search


Closed Thread
 
LinkBack Thread Tools
Old 06-20-2006, 06:14 AM THREAD STARTER               #1 (permalink)
NamePros Member
 
Coreycyberdesig's Avatar
Join Date: May 2006
Posts: 39
Coreycyberdesig is an unknown quantity at this point
 



need mysql help


Hello I am writeing a forum and for soem reason my mind has taken a dump and i cant figure out the query

I have a signle table that has the following cols
thread_type_id thread_name poster post Date_posted thread_order thread_id
and a key

I need to figure out based on the thread type id
how many posts there has been for that thread type id minus the ones that are marked first
How mnay are marked first
and when the last post was made for that thread type id

Could anyone help me out with this
Last edited by Coreycyberdesig; 06-20-2006 at 06:33 AM.
Coreycyberdesig is offline  
Old 06-20-2006, 07:07 AM   #2 (permalink)
Senior Member
 
lpxxfaintxx's Avatar
Join Date: May 2006
Location: Irvine, CA
Posts: 1,082
lpxxfaintxx is just really nicelpxxfaintxx is just really nicelpxxfaintxx is just really nicelpxxfaintxx is just really nice
 



Sorry, I do not understand what you are trying to say...
lpxxfaintxx is offline  
Old 06-20-2006, 10:23 AM   #3 (permalink)
NamePros Expert
 
Peter's Avatar
Join Date: Nov 2003
Location: Scotland
Posts: 5,069
Peter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond repute
 


Child Abuse Save The Children Save The Children Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009
better off giving us the proper layout of the tables as well as an exact description of what you need to retrieve.
Peter is offline  
Old 06-22-2006, 03:28 PM THREAD STARTER               #4 (permalink)
NamePros Member
 
Coreycyberdesig's Avatar
Join Date: May 2006
Posts: 39
Coreycyberdesig is an unknown quantity at this point
 



LOL its cool got it


I just needed to find out some information it was basicly a complex count statment I got pissed and rewrote it in ajax and it works so yea its done
Coreycyberdesig is offline  
Old 06-22-2006, 04:26 PM   #5 (permalink)
A Wealth of Knowledge
 
stscac's Avatar
Join Date: Aug 2004
Posts: 3,809
stscac has much to be proud ofstscac has much to be proud ofstscac has much to be proud ofstscac has much to be proud ofstscac has much to be proud ofstscac has much to be proud ofstscac has much to be proud ofstscac has much to be proud of
 



Rewrote it in Ajax?

Ajax opposed to what, traditional?

-Steve
stscac is offline  
Old 06-23-2006, 03:22 PM   #6 (permalink)
New Member
Join Date: Jun 2006
Posts: 10
Prch is an unknown quantity at this point
 



Originally Posted by Coreycyberdesig
I have a signle table that has the following cols
thread_type_id thread_name poster post Date_posted thread_order thread_id
and a key
Originally Posted by Coreycyberdesig
I need to figure out based on the thread type id
how many posts there has been for that thread type id minus the ones that are marked first
Code:
SELECT COUNT(the_key) FROM `your_single_table` 
WHERE thread_type_id = 'variable_for_that_thread_type_id' 
AND what_field_was_that != 'first'
Originally Posted by Coreycyberdesig
How mnay are marked first
Code:
SELECT COUNT(the_key) FROM `your_single_table`
WHERE what_field_was_that = 'first'
Originally Posted by Coreycyberdesig
and when the last post was made for that thread type id
Code:
SELECT MAX(Date_posted) FROM `your_single_table` 
WHERE thread_type_id = 'variable_for_that_thread_type_id'
There's not enough details or table illustration provided. You might want to merge these queries.
Prch is offline  
Old 06-25-2006, 03:46 AM THREAD STARTER               #7 (permalink)
NamePros Member
 
Coreycyberdesig's Avatar
Join Date: May 2006
Posts: 39
Coreycyberdesig is an unknown quantity at this point
 



php


Thanks i rewrote it in ajax and did the whole thing with an function
Coreycyberdesig is offline  
Closed Thread


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


Liquid Web Smart Servers  
All times are GMT -7. The time now is 03:13 AM.

Managed Web Hosting by Liquid Web
Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger