Below you will find my code, it's not it all in it's entirety, but shows what's important. I have some custom functions that are being used just to note out. What I have my code doing is searching a MySQL table and displaying all of the results based on the current session user id. Then I loop through those results and for each one I search another table. This works perfectly, but I just want to see if there is a better way to do this without having to loop and search a table for every result row.
AmieCutie
0
Newbie Poster
Recommended Answers
Jump to PostIs there a reason you did a pastie? Could you not post your code here? It's really awkward to try and provide an answer with the code on a different site.
Have a look at JOINS syntax for MySQL. That should avoid running queries within a loop. Too awkward for …
All 4 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.