Jump to content

gizmola

Administrators
  • Posts

    5,945
  • Joined

  • Last visited

  • Days Won

    145

Everything posted by gizmola

  1. Your question is too vague to provide much of an answer. 1 million rows is going to be a lot of data, and it will take a while. Having an index or not is probably irrelevant unless this is a table with multi-millions of rows. You need to provide more information about what you mean by extract, and what you will be doing with all that data.
  2. Yes, the file related functions like require and include work with the filesystem path. Try this out: $docroot = realpath($_SERVER['DOCUMENT_ROOT']); echo $docroot;
  3. Good luck -- hope it doesn't get too bad there.
  4. I guess you didn't read any of the other post I linked? You should be sending a multipart mime encoded email with a text part and the html part seperately. As for going to a spam folder, this is often a case of your email server not being legit enough for gmail. Things like a valid MX record, a valid reverse DNS entry, and an SPF record are essential these days to avoid being seen as spam. The handling of the html version is highly variant. You can either go lowest common denominator or do special versions for different email systems.
  5. You should only do inline styles using font with html emails and even those don't work on a lot of email clients. One of the other phpf mods wrote this article that has some good info: http://www.flingbits.com/article/view/developing-html-emails
  6. The support for html varies widely across different email clients. With that said, I covered this topic recently in this post: http://www.phpfreaks.com/forums/index.php?topic=341258.msg1609547#msg1609547
  7. It looks to me like you want to take some data, and then make a computation with it. Some of that data is based on data you have in your database. If the computation is expensive, you might look into caching results using one of the numerous caching systems, the most widely used being memcached. You could also store some of the computations in session variables. php arrays are all associative, which means that they are keyed by strings. You can easily nest arrays inside arrays, so in that way they are quite flexible, and could certainly be the basis for your output.
  8. That is a lot of rows to delete, so it may just be that 22 seconds for a large delete like that on the hardware you're using, with the resources and contention on the server, is going to take that long. It's probably relevant to the total number of rows as well. To fenway's question -- that is a good question, but i suspect that it might be an optimization decision. Can you provide a: SHOW CREATE TABLE `RSCEmulation Logs`.`game_chat`
  9. Yeah not sure about netbeans debugger -- things should go null on an unset(), but even if they don't you could verify easily that they are gone using vardump. This is the entire purpose of unset().
  10. Sure, you could have 2 different sets of rules. The RewriteCond is like a pre-check if you want to look at it that way... if it matches the following rule will be looked at, if not it will be skipped. This way you can have different rules. Also keep in mind that as far as apache is concerned, the https site is a completely different site, so it makes sense that a part 80 rule which needs to issue a 403 to move to port 443 (https) would handle things differently than a rewrite in the port 80 site, which would be more of a standard rewrite.
  11. Are you doing?: putenv(“TNS_ADMIN=/path/to/dir/with/tnsnames.ora/"); $conn = ociplogin('user', 'pw', 'profilename');
  12. Yes my bad -- thank requinix.
  13. If you are running php as say user apache... then the apache user needs to have the appropriate environment variables setup so that it can connect to oracle. When a script is running it is running as the webserver.
  14. Mjdamto's way and mine are roughly equivalent -- just using different fetching. You probably could combine these in a single query as well as he originally suggested, which would be the ideal situation, but I figured that since your main issue was needing to understand the query -> fetch system better, I'd just stick to that.
  15. You need to store the total variables somewhere. Here's what I would do: $hometotal = "SELECT SUM(test_results.hts) AS homesum FROM test_teams, test_results WHERE test_teams.team = '$team' AND test_teams.teamid = test_results.hometeam"; $result = mysql_query($hometotal) or die(mysql_error()); $homerow = mysql_fetch_assoc($result); $awaytotal = "SELECT SUM(test_results.ats) as awaysum FROM test_teams, test_results WHERE test_teams.team = '$team' AND test_teams.teamid = test_results.awayteam"; $result = mysql_query($awaytotal) or die(mysql_error()); $awayrow = mysql_fetch_assoc($result); $total = $homerow['homesum'] + $awayrow['awaysum']; ?>
  16. Because then you would have to reinitialize the session. You stated you wanted to have something you could drop in for testing purposes that doesn't do black magic with the session handler. If you really want to use session_destroy then you'd have to have: session_start(); session_destroy(); session_start();
  17. He's doing a sum on 2 different columns though.
  18. I'd suggest a simple function: function cleanSession() { foreach($_SESSION as $sessvar) { unset($sessvar); } } Add it where you want to insure that there are no set session variables.
  19. You need to: -issue the query (mysql_query) -fetch the results (mysql_fetch_) Fetching will get you a php variable with the row, and since you are using SUM() you should only get one row per query. So, quite simply you need to do query1 first, then query2, and add the vairables as the last step.
  20. The best support on oracle configuration can be found on the Oracle Technology Network, where they have lots of howto's, required software, and forums with people who are actively using php with oracle.
  21. The environment needs to be set for whatever user apache/php is running as.
  22. Your RewriteCond is looking for Port 80. HTTPS is port 443. RewriteCond %{SERVER_PORT} 80
×
×
  • 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.