[eluser]Triple_vent[/eluser]
[quote author="wabu" date="1250448431"]If I were you I'd break the query up into its component parts, fire up whatever SQL client you prefer (command line or GUI) and get each part of the query working, adding a little more each time until you have the result set you want.
To me it sounds like:
- given a particular category id and location id (both, if I read your post correctly)
- get all related assets
- display parent category information if it's a subcategory
So if it's giving you trouble don't try to get everything working at once, just get each part working (for example start by getting assets for a category without considering location or joining/subquerying for parent categories) and then build it up piece by piece.
[/quote]
thanks for your reply, you right i assume i provide $_POST['category'] and $_POST['id_location'] in my gui php view, and when user click search the result is what i explain on my first post.
to break the sql piece by piece i agree, but i takes 2 more days or more for unexperienced person like me to make it work..
Quote:Then once it's all working go back to CI and see if you can translate your query to Active Record (if that's your preference).
yeah iam using active record for all my 60% CI database...(the sql is just an option, if people provide the model based on that rather than Active record).
honestly i am just wondering if there are some people who already done it so it take little time for people like me to speed up my application to be done...