Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Can multiple SELECT queries be used per page?

Guest
Apr 02, 2010 Apr 02, 2010

Hello all,

New question: Can more than one SQL SELECT query be used per page? I have tried it and I'm notgetting results...if the answer is yes, does anyone know of some good resources I can check out to see what the code should look like?

As always,thanks so much!

Sincerely,

wordman

TOPICS
Server side applications
574
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 03, 2010 Apr 03, 2010

>Can more than one SQL SELECT query be used per page?

Of course

>I have tried it and I'm notgetting results

What exactly did you try?

>does anyone know of some good resources I can

>check out to see what the  code should look like?

Not enough information in that statement. What exactly are you trying to do? It's always helpful to provide some context.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Apr 03, 2010 Apr 03, 2010

Bregent,

Good to hear from you again!

My head was splitting last night when I wrote that so that accounts for the vagueness.

Right.

Okay, I have a SELECT query that successfully pulls data from a table based on a query string number.

I want to do another SELECT query after that to pull different records, maybe even a third SELECT query.

I tried two SELECT queries, but the second one didn't pull any data. I read a bit in David Powers' book about free_result(); and was wondering if that should be used in between each SELECT query.

I'm still getting tuned in to the SELECT, FROM, WHERE AND logic, it may be possible to do what I want with one query, right now I'm still too green to know.

Thnaks!!!

Sincerely,

wordman

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Apr 03, 2010 Apr 03, 2010

Bregent,

I hate to keep doing this, but I figured it out. I am on a slow, steady roll, but please know that you all helped me get here.

Cheers and a million thank yous,

wordman

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 03, 2010 Apr 03, 2010

Hey, glad to have "helped"


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Apr 03, 2010 Apr 03, 2010
LATEST

Bregent,

Absolutely. You, David Powers, Murray (who turned me on to David's books) have all been pivotal in my successes.

Here's a question you can answer though while we are here:

Is it a good idea to use free_result() in between multiple queries? What is the preferred etiquette with this one?

The score so far: my photo gallery is coming along nicely. Finally understanding lookup tables, I have a wealth of data I can access all based on query string input and it all works so seamlessly. I have been developing my TOC page over the last several days and it's looking REALLY good. I haven't been this excited in years. Will share more as it happens.

Again, many thanks!

Sincerely,

wordman

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines