Jump to content

[SOLVED] PostgreSQL queries, storing results instead of multiple queries


jdt05

Recommended Posts

Hey everyone, I am a beginner to PHP and at the minute I have a script that does multiple SQL queries.

 

So I have something like $result = pg_query($my_query);

 

After this query I tend to loop through like this to get the result:

 

while ($entry=pg_fetch_row($result))

{

//do stuff

}

 

But my question is, how can I make a copy of the result? So I don't run the query more than once.

 

Thanks,

 

jdt

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.