Results 1 to 10 of 21
Threaded View
-
5th Jan 2011, 11:30 PM #1OPBannedWebsite's:
SKDown.Net WarezGuru.Org RARdownload.netmysql query help ($5 reward) [SOLVED]
i have the following tables
client
-----
id
name
purchases
---------
p_id
c_id
date
...
i want to select all purchases for all clients where their last purchase was before date X.
For example:
Consider client 1, 2, 3 and 4.
client 1 made 20 purchases before time X and just one recent purchase.
Client 2 made 1000 purchases before time X
Client 3 made only 1 purchase before time X
Client 4 made only 1 purchase recently.
The query should select "all" the purchases for client 2 and 4 only.
first who writes the correct query gets the reward first.
more info: http://www.besthostingforums.com/sho...2&postcount=10
How the query works:
we should select the MAX dat for each site and see if its maximum date entry is older than a year from now.
if so we select all its rows. if not, we don't select any of its rows.
solution: http://www.besthostingforums.com/sho...4&postcount=12tdsii Reviewed by tdsii on . mysql query help ($5 reward) i have the following tables client ----- id name purchases --------- p_id Rating: 5
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
PHP - MySQL query to CSV export
By ElitePirate in forum Web Development AreaReplies: 2Last Post: 25th Jul 2012, 09:19 PM -
mysql query to export database
By lenney in forum IP.BoardReplies: 4Last Post: 7th May 2011, 03:43 PM -
MySql Query
By GoPantheoN in forum Web Development AreaReplies: 5Last Post: 8th Mar 2011, 02:09 PM -
WordPress database error MySQL server has gone away for query
By blur88 in forum Webmaster DiscussionReplies: 10Last Post: 27th May 2010, 08:43 PM -
Speed Up Your Web Site With MySQL Query Caching
By BlaZe in forum Technical and Security TutorialsReplies: 1Last Post: 4th Nov 2009, 03:11 PM
themaCreator - create posts from...
Version 3.52 released. Open older version (or...