solution-digest

From: Date: Mon, 20 Nov 2000 09:32:06 +0000
Subject: solution-digest
Groups: php.db 
Request: Send a blank email to php-db+get-4571@lists.php.net to get a copy of this message
From: "Todd Fincannon" <todd.fincannon@acotec.com> Date: Fri, 17 Nov 2000 12:48:14 +0100 Subject: Storing result sets between script invocations >I am approaching the famous next/back paging problem with a special >requirement. Some of my queries are complex and take a long time to compute. >All the paging approaches I have seen require the query to be reprocessed >for each page. For simple queries this is OK, but for my complex queries the >wait is too long. > >Is there some way to keep the result set between pages? I tried storing the >result in a PHP4 session variable, but that didn't work. cache the results on the server itself in the 1.) database itself, using a table for this, and multiple clients can even have identifiers, which are attached to the rows they've generated, 2.) in a plain textfile, which you can read in in the next step, and you only have to post the filename to the client and then back to the server, or, 3.) if the results are relatively low-volume, then you can simply pass them to the client browser. The problem with 1.) an 2.) is that the db will fill up with data after a while so you have to clean this cache after a while - it would be a good idea to erase based on the date of creation of cache entries (you have to manage a separate column for this with 1.)) - and, you can still do this from within the script that generates the cache entries itself. -o- From: JMO <sevenproductions@aol.com> Date: Fri, 17 Nov 2000 18:47:29 -0500 Subject: selecting a specific record from database oh man, RTFM... this is not the php-tutorial list ;) - o - From: jchum@techdevelopers.com (Jonathan Chum) Date: Sat, 18 Nov 2000 21:40:40 GMT Reply-To: jchum@techdevelopers.com Subject: DB Comparisons for starting a site, I'd consider using a free product. You may fail anyway and have only your oracle and some bills in your hand :) In my country I know of two big sites using MySql and serve tons of users, both have branded forums (which anyone can include in own pages) and they are up and running. If you plan to have a really big business later, then you might want to take a little time and write your code so you can easily change from one db to another - you might even consider writing some own functions which now use mysql but later you only have to rewrite these functions to migrate to oracel, for e.g. Alternatively, I think ODBC can be a solution for migrating, but I'm not sure I'm not into odbc... - o - Date: Sun, 19 Nov 2000 09:57:46 +0100 From: Niels Schenk <niels@accept.demon.nl> Subject: Please tell me what's wrong this will not directly be an answer to your question, but a method to look after bugs. Use an echo"something"; exit; in your code, at first insert it into the very beginning of the main function, try loading the script, and see if you see "something" as output. If yes, then you can move it down few lines, save, reload, and see if it's work - it's a quick but really dirty ;) way to track down programming bugs which do not generate errors. Additionally, you can echo some variables you think work suspiciously and track down where they turned bad... - o - Date: Sun, 19 Nov 2000 09:12:56 -0800 (PST) From: "Adv. Systems Design" <asd_2000@yahoo.com> Subject: opening webpage >Hello all: >I was wondering how one would open (go to) another web >page programatically, say as a result of an if-else >statement. i.e. >if (x==true) { > goto http://pagex >}else{ > goto http://pagey >} >Thanx >Luis Ok, so you want to redirect the client browser depending on some variable, for this use header () function with a "Location:" tag, here is an example: header ("Location: http://www.php.net"); be sure you do not have any output before the location header else it shouldn't work well... - o - Date: Sun, 19 Nov 2000 09:47:07 -0800 (PST) From: omar cromwell mercado <ocmercado@yahoo.com> Subject: page timeout while moving large data >hi, >i created a php script that reads data from a mysql >database and loads it into corresponding tables in >oracle. this is in line with our migration from mysql >to oracle. however, i noticed that the script's >execution is stopped after a certain period of time >even if it isnt completed yet resulting to incomplete >data transferred. i suspect this a php or apache issue >that limits script execution time. Is it? If so, any >hints/pointers how I can lengthen the time? in php.ini, there is a variable controlling execution time, which by default is set to 30 seconds as I remember. Parameter name is "max_execution_time value". Change this and restart, or, you can override this limit in your individual scripts with set_time_limit (int seconds) function. - o - lameness disclaimer: rtfm stands for read the fucking manual... :) Trap.

« previous php.db (#4571) next »