Jump to content

Adam

Moderators
  • Posts

    5,717
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Adam

  1. Do you have command line access to the server? You could execute a script and leave it running, with a sleep in-between updates. Not perfect but might be the best option...
  2. As I think dweeber is getting at, if shared hosting is essential you could use your own computer to download the stock data, then push to your remote server via a simple API.
  3. @Drongo_III There's no need to pass the PREG_PATTERN_ORDER flag, it's the default. Though your pattern would match all DIVs with just a class attribute, so it's not really a practical solution. @hamza I think your problem is using ^ and $ at the start/end of the pattern. Together these require that the pattern is the *only* contents of the string. You can omit either or both to remove that restriction from one or both sides of the pattern.
  4. Can you re-post the code formatted correctly? You can't use tags within tags, but you can within [quote] tags.
  5. Ahh reminds me of my first site, built with FrontPage at about 14 for my "DoD" clan
  6. There's no real difference in security, prepared statements are generally pretty secure on their own. Binding data with the correct type will ensure that the database has the right type of data for the query. If you don't define it then the type will default to a string, which may cause issues with say integer values. MySQL will probably let you off and internally cast the data, but other databases aren't so lenient. Also a feature of stored procedures is that you're able to pass output parameters, which require you to define them as their data type + output type. You couldn't do that if you used your second example. I think using MySQL you'll probably not run into any issues passing everything as a string - as I said MySQL is very lenient - but declaring/knowing all your data types is a good habit to get into.
  7. A lot of them are just simple web services you pass a URL to. For example "Digg" you just send the user to: http://digg.com/submit?phase=2&url=http://(...) Just get the icons and add a link to them. Social sharing plug-ins are generally just for convenience.
  8. It's just a jQuery plug-in for arranging content, I don't think you have much to worry about. I doubt it - nothing that I would trust anyway.
  9. What are the permissions on one of the session files?
  10. You don't need to wrap the code within a document ready event if it's within the body -- in-fact if it's within the body it makes more sense not to wrap it within the event. The problem is the position, you're trying to bind the event before you've actually defined the element. Move the JS just after and it would work.
  11. Which plug-in are you using?
  12. With JS you can access object properties like an array, for reasons such as this. Give this a try: App[idx][file] = new App.View[file];
  13. There won't really be a difference between them, they both use MySQL. Just use whichever you prefer. As for the Excel/PDF creation, you could negate the effect by passing it to a background process to handle. There would be a delay in receiving it of course, but would mean you don't have to sit around waiting for it. I would try to improve the speed/efficiency before deciding whether that kind of solution is necessary though.
  14. Is a "significant improvement" enough of an improvement? I can't really tell what you've changed..? But since you're executing essentially the same query (just different column values) in a loop, you can gain some easy performance by using a prepared statement instead. The DB will cache the execution plan on the server, making any subsequent requests much quicker. Depends how many subsequent requests you actually make as to how much of an improvement you'll see, but looking at your SQL it can't do any harm!
  15. You just need to use break: // Check to see if we've already sent a reminder for this appointment if($apt->id == $rem->appid) { break; } Edit Although your code does seem a little like spaghetti now. It doesn't make much sense why you would break from the child loop if the first ID in the loop matched the parent? Surely you would want to move on to the next iteration, or you should be able to determine this before entering a loop?
  16. Are you writing this mark-up in MS Word, or have you just copied it? The formatting has broken the quotes.
  17. Which one did you remove? Only the last comma in each object should be removed, otherwise you will break the syntax. I'm quite surprised browsers (with obviously the exception of IE8) are so tolerant of trailing commas after the last property.
  18. Looks like a few people have reported similar requests, and the IP has been reported too. Just block it..
  19. The main benefit for me is being able to pay by card.
  20. You're missing a semi-colon after the mysql_fetch_assoc() call.
  21. http://lmgtfy.com/?q=javascript+countdown
  22. If you know your username and password, as explained clearly in the manual pass them as the second and third paramters to mysql_connect.
  23. There is no CSS only solution, you need to use images.
  24. Are you asking us for your MySQL username? Have you read the manual on how to use it?
×
×
  • 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.