Thanks - it was the PHP timeout problem. A PHP script will timeout after 30 seconds. So I had to set the set_time_limit() very high like 10000 and it worked beautifully. Of course, I also figured out to index the dang DB also which sped things up - oops! lol!
Thanks for all your help....
I tried the pg_pconnect instead, but still didn't work. Also tried the error reporting above along with more echo'ing and get this as my SQL UPDATE statement:
20,532 results returned
1204-1875 Robson St originally - now converted to: 1875 Robson St
UPDATE "GVRD1" SET address = '1875 Robson...
Tried pg_pconnect instead of pg_connect - no change. Also tried the or die statement above - no dice. Still works for 10 iterations and stops, no error thrown - no postresql error log recorded or Apache error log recorded. I'm stumped.
Tried the pg_query as stated above - same response. Down to 11 iterations now. It's decreasing every 20 or so runs of the script. What's going on? No errors in Apache Log. No timeouts - I increased that in Apache http.conf file. It doesn't get out of the loop and doesn't through an...
Yes, pg_Exec is just a PostgreSQL statement to execute an SQL statement. Here is the official doc on it:
pg_exec
Name
pg_exec -- send a command string to the server
Synopsis
pg_exec dbHandle queryStringInputs
dbHandle
Specifies a valid database handle.
queryString
Specifies a valid SQL...
Ok, upon further testing, it does NOT leave the loop, and if I comment out the UPDATE execution, the iteration works PAST the 14-17 times and works properly and exits the loop. I loaded the script with error handling originally and it throws NO errors. I stripped out the error handling for...
More info:
Ok, after trying a few more runs of it, it stops with NO errors after 14-17 iterations of the for loop. The addresses don't have any strange escape characters or anything to cause it to bail out of the loop prematurly. I've run it 50 times, and it started at 17 times, now down to 14.
I am trying to trim apartment numbers off of an address field in a 800,000 record PostgreSQL table. It works for only 16 times through the for...loop then quits even though the results of the SELECT statement is 25,000. So logically it should run through the iteration 25,00 times. How come it...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.