Jump to content

Jerec

Members
  • Posts

    26
  • Joined

  • Last visited

Jerec's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. Jerec

    MySQL Engine changes

    Hello I've gone through the tables we have in a database and have considered what should remain as MyISAM and what should change to InnoDB. Is there anything I need to be aware of when changing engines to an existing table? Thanks!
  2. Jerec

    query vs multi_query

    Is there any reason to NOT always use multi_query, regardless of whether the given string contains one or more than one SQL statements?
  3. Jerec

    CONVERT_TZ for all

    It's a shared environment. Although we get our own PHP instance, I think we're sharing the MySQL instance. So I don't think we can get anything changed for us.
  4. Jerec

    CONVERT_TZ for all

    We've found that our web host has their MySQL server timezone set to MST and we're on the east coast. I know we can convert the result of NOW() to our timezone with CONVERT_TZ, but we've got several routines that make the reference and it'd be tedious to put the conversion into each of them, then remove them if we change hosts and get a database server in another timezone. And we can't change the timezone of the server since it's a shared environment (of course, this was the first thing I tried to do). Is there some other way we can make sure all references to NOW() gives us a converted value where we can just edit one place (I have a feeling a trigger could be the solution IF it's the solution)? Thanks!
  5. This is probably an easy answer for most, but mod_rewrite is still a lot of black magic to me.. I'd like.. http://blargh.com/attachments/99d7c5cd00cf8cb27cebabad100d594546cc4eb227aac7f4d243877be130a498 (last part is file hash) to be processed as.. http://blargh.com/attachments/index.php?a={above file hash here} and this is what I've put into .htaccess (which is located at the root).. RewriteRule ^attachments/([A-Za-z0-9-]+)$ /attachments/index.php?h=$1 [NC,L] The result I get is essentially nothing, as though the rule wasn't there, but chances are I just plain did it wrong. Thanks!
  6. I found it difficult to word out this question, which made it difficult to find something relevant using a search engine. Hopefully, a human around here can understand what I'm looking for. I've got my in-line form validation triggering on keyup, which is working alright so far. However, I've got a login field that checks for email addresses that has a minor issue. Some browsers can remember values you type frequently (like an email field to login!), but I don't know if there's an event that can correspond to selecting that as. So the workflow is as follows: 1. Click the email field2. Type the first few letters of a valid email address, which the form validation marks as invalid because it's only the first few letters.3. The browser (testing Firefox and Opera right now) creates something below the field showing the previous values you've entered before that fit what you've typed so far)4. You select one of those previous full email addresses, which puts that value into the email field.5. The field is still considered invalid because a keyup wasn't triggered to validate the valid email address. I know one solution would be to have the submit, more or less, check every field and validate them, but I'm having issues with that right now. It'll be done at some point, but I'm still curious of whether there's an event that can correspond to the selection in step 4. Thanks!
  7. I guess the answer was simple enough to just warrant one response, so that's one less thing to do. Thanks!
  8. A project I'm working on will require links to files people upload. The direct way to do this is to take those uploads, put them in a directory, then give that link to those who need it like: http://blergh.net/files/what.jpg But I know I could receive those files, store some unique identifier, then give a link containing that identifier and build a PHP page to feed the file with the given identifier: http://blergh.net/downloads/zswe464 (which gives what.jpg when loaded) My question is what are the reasons to do this? I'd like to be sure this is worth doing before actually putting in the effort. Thanks!
×
×
  • Create New...