Timeout or over limit?

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
User avatar
dstefani
Forum Contributor
Posts: 140
Joined: Sat Jan 11, 2003 9:34 am
Location: Meridian Idaho, USA

Timeout or over limit?

Post by dstefani »

I got an email from a friend of a friend and I don't want to sound rude and say, "just go to php forums and ask", so I'm going here and asking, then I'll send her here. :-)

Here's the question as I got it, any help on an answer or what questions I should ask her would be appreciated.

Thanks - dstefani
I have written a PHP/MySQL application and one of my programs reads a database table with 322,000 records. I do a SELECT on the table to get 2 fields. Then I use a mysql_fetch_array and load the all the results into my program space. I lose my connection after the first record. I am thinking that I am exceeding the allowed program space on the server. This isn't one of Matt's servers, unfortunately, or I would be getting some good tech support. As it is, the server people are pretty useless. I am going to have to tell them what is wrong.

So question 1: Do you know of any parameter that might limit program space on a server?
question2: Do you know of a PHP command I could use to not have to load all the data in at once like the way mysql_fetch_array does?
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

First thing would be to use mysql_fetch_assoc() so that instead of a numeric and associative array you just get an associative one. Does she get a script timeout, I'm not sure what she means by 'lose my connection'.

Mac
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Post by Weirdan »

she can use [php_man]phpinfo[/php_man] to figure out what memory_limit is set to.
User avatar
dstefani
Forum Contributor
Posts: 140
Joined: Sat Jan 11, 2003 9:34 am
Location: Meridian Idaho, USA

Post by dstefani »

Thanks!
Post Reply