![]() |
Help with a nested MySQL query!
Okay, so I'm a pretty experienced MySQL programmer, but this problem has stumped me.
I'm getting some funky results when working with a nested MySQL query. It goes something like this: Code:
$cars = $DB_site->query("SELECT * FROM cars"); Has anyone encountered a similar problem to this, and does anyone have a solution? |
Problem solved. I discoverred the wonder that is "unset()".
|
Ack! Avoid nested queries when possible. Use a JOIN query instead. You'll save processing time and system resources.
something like this: SELECT cars.id as cid, cars.field2 as cfield2, passengers.id as pid, passengers.field2 as pfield2 FROM cars c LEFT JOIN passengers p ON cars.id=passwngers.car_id ORDER BY cars.field3 ASC, passengers.field3 ASC |
All times are GMT. The time now is 04:44 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|