Home News Contact Us Forum About Us Demos Products F.A.Q.
Shopping Cart
You currently have 0 items in your cart.


Recent Events
  • 23/11/2024 Black Friday 2024

    BIG SALE, 30% discount for all our extensions. Use BF24 coupon code. Hurry up the discount is valid till 3 December.

  • 31/12/2023 New Year SALE

    We are glad to announce New Year SALE. 25% discount for all our extensions. Use NY24 coupon code. Hurry up the discount is valid till 7 January.


2Checkout.com, Inc. is an authorized retailer of goods and services provided by ARI Soft. 2CheckOut




Follow us on twitter



Welcome, Guest
Please Login or Register.    Lost Password?

Help with sql query please
(1 viewing) (1) Guest
Go to bottomPage: 12
TOPIC: Help with sql query please
#48208
Re:Help with sql query please 10 Years, 9 Months ago Karma: 0
3.2.2
The administrator has disabled public write access.
 
#48209
Re:Help with sql query please 10 Years, 9 Months ago Karma: 760
Try the following query:

SELECT (CASE WHEN state = '1' THEN 'Accepted' WHEN state = '-2' THEN 'Waiting' WHEN state = '-1' THEN 'Archived' WHEN state = '0' THEN 'Rejected' ELSE 'Unknown' END) AS Status, s.names, s.phone, FROM_UNIXTIME(datetime1,'%d/%m/%y %T'), s.begin, s.PickupAddr1, s.end, s.PickupAddr4, s.message, s.selpassengers, s.selluggage, IF(s.returntrip=0, 'No', 'Yes'), IF(FROM_UNIXTIME(datetime2,'%Y') = '1970', NULL, FROM_UNIXTIME(datetime2, '%d/%m/%y %T')), tc.title AS Vehicle, s.cprice, pm.title As Payment, s.payment, s.selinfantseats, s.selchildseats, s.selboosterseats, s.selcarry, s.email, s.id, s.prepay, s.vehicletype FROM #__taxibooking_orders s
INNER JOIN #__taxibooking_cars tc ON tc.id = s.vehicletype
INNER JOIN #__taxibooking_paymentmethods pm ON pm.id = s.payment
INNER JOIN #__users u ON s.email = u.email
INNER JOIN #__user_usergroup_map ugm ON u.used_id = u.id
INNER JOIN #__usergroups g ON ugm.group_id = g.id
WHERE g.title = 'supervisor'
GROUP BY s.id

Regards,
ARI Soft
The administrator has disabled public write access.
 
#48210
Re:Help with sql query please 10 Years, 9 Months ago Karma: 0
Hello

Thank you but it is not working. Also, I can't define the usergroup in the query, I need it to find the usergroup itself from the logged in user because there will be a number of different usergroups and I cannot have a separate table for each usergroup.

Thanks again
The administrator has disabled public write access.
 
#48211
Re:Help with sql query please 10 Years, 9 Months ago Karma: 760
The extension doesn't support this ability.

Regards,
ARI Soft
The administrator has disabled public write access.
 
#48215
Re:Help with sql query please 10 Years, 8 Months ago Karma: 0
Are you saying there is a limit on the complexity of the sql query allowed? If the extension supports sql queries then surely if the query can be written then the extension can support it?
The administrator has disabled public write access.
 
#48216
Re:Help with sql query please 10 Years, 8 Months ago Karma: 760
The extension supports any correct "SELECT" SQL query.

Regards,
ARI Soft
The administrator has disabled public write access.
 
Go to topPage: 12