Alright I have a table that houses bills per car.id so in this table is a list of bills that assocaited by the car.id so there may be 20 different entries for the same car.id how can I query the table to return all the bills per car.id ADDED up and spit out ONE total
php query question
13
Alright I have a table that houses bills per car.id so in this table is a list of bills that assocaited by the car.id
so there may be 20 different entries for the same car.id how can I query the table to return all the bills per car.id ADDED up and spit out ONE total
I'm using this query right now
SELECT * FROM `cars` JOIN `bills` ON cars.id=bills.car_id WHERE cars.make="$userchoice" ORDER BY cars.year DESC
this is returning about 20 copies of the same vehicle with each bill how can I get ONE total in the cost colum and one copy of the vehicle
so there may be 20 different entries for the same car.id how can I query the table to return all the bills per car.id ADDED up and spit out ONE total
I'm using this query right now
SELECT * FROM `cars` JOIN `bills` ON cars.id=bills.car_id WHERE cars.make="$userchoice" ORDER BY cars.year DESC
this is returning about 20 copies of the same vehicle with each bill how can I get ONE total in the cost colum and one copy of the vehicle
- goosefrabah
- Earnie Boyd
- solidsoul
- SteveJohnson
- solidsoul
- SteveJohnson
- [ 2 ] Thanks
- solidsoul
- solidsoul
- solidsoul
- Earnie Boyd
- [ 1 ] Thanks
- solidsoul
- jassmee Banned
Next Topics on Trending Feed
-
13