Project / Support Center
Welcome, Guest. Please login or register. March 19, 2019, 06:26: PM
Home Help Search Login Register
D-Web Web Site Creator D - Web Web Site Creator On-line HTML Editor No Programming knowledge required. Web Global Net PayPal-Cart Shopping Cart System PayPal - Kart Shopping Cart System for E-Commerce over the internet, that's easy to use. Web Global Net Newsletter Manager Newsletter Manager On-line Newsletter Creator with Email Subscriber Management.
Ring Central Discount
Web Global Net Web Application & Web Development Project Center  |  Technical Issues  |  MySQL  |  Topic: Query showing records between a certain range 0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Go Down Send this topic Print
Author Topic: Query showing records between a certain range  (Read 1961 times)
admin
Administrator
******
Offline Offline

Posts: 150


« on: December 05, 2017, 09:03: PM »

This show only records between a certain  range for a certain group or client

mysql_select_db($database_reuniomysql, $reuniomysql);
$query_rsphotobuclass = sprintf("SELECT DISTINCT class_ticket_purchases.purchase_ticket_id, class_ticket_purchases.purchase_ticket_title, class_ticket_purchases.purchase_ticket_class_id, class_ticket_purchases.purchase_reunion_year, class_ticket_purchases.purchase_ticket_price FROM class_ticket_purchases WHERE class_ticket_purchases.purchase_ticket_id between '2'  and '4' AND class_ticket_purchases.purchase_ticket_class_id=%s GROUP BY purchase_ticket_id", GetSQLValueString($KTColParam1_rsphotobuclass, "int"));

The bold show only records between a range of 2-4 (2,3,4) for only 1 class (class_id) - must be grouped (ticket_id) to work. range is distinct meaning it will only show items that are unique not the same items over and over again.
« Last Edit: December 05, 2017, 09:05: PM by admin » Report to moderator   Logged

The Unknown Webmaster
Pages: [1] Go Up Send this topic Print 
Web Global Net Web Application & Web Development Project Center  |  Technical Issues  |  MySQL  |  Topic: Query showing records between a certain range « previous next »
Jump to:  


Login with username, password and session length
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!