Jump to content

fenway

Staff Alumni
  • Posts

    16,168
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by fenway

  1. Yes, that's going to be quite difficult in mysql... you should consider doing this in php.
  2. There's a CREATE TABLE LIKE command.
  3. I would guess the latter, but I've no experience with persistent connections.
  4. Just remember about threads...
  5. how to show the progress bar? eg 1% to 100% ? Progress bar in mysql? I didn't realize that was possible, to make a new table and copy the data in one step.... Since I don't know that original table looks like, it's hard to guess.
  6. Agreed... having a timestamp would be more appropriate.
  7. Well, you're getting back * and using just a single row... but without seeing the EXPLAIN for each one, I can't really comment further.
  8. That's code... that's not the contents of the "SQL" variable before the .open call.
  9. This should work: $query = "INSERT INTO table (blah1, blah2, blah3, newvar) VALUES ($blah1, $blah2, $blah3, ( $_POST['newvar'] == '' ? NULL : $newvar) )"; But why aren't you quoting your strings?
  10. Actually, you'd still need to quote the non-NULL value, so that's not it.
  11. It depends on your INSERT statement... if you're blindly quoting this value, you're stuck. You'd need to check in in-line... could you post just the relevant code snippet (NOT the whole file)?
  12. There's only one $query variable in your entire code block.
  13. Please echo the plaintext sql query that causes this error.
  14. It's generally faster, because the rows of the unLIMITed query aren't sent back to the cilent.
  15. There is a skip-networking option in the cnf file that prevents non-local host connections.
  16. It's easy to get the first of the month, figure out what day of the week that is, add the difference to the first monday, then add 2 weeks.
  17. OK... so run select game_id, league, max(total_points) as maxpoints from ts_table group by game_id, league and then join this result back to ts_table with all three of these columns as the on condition... then the users table should be another join.
  18. It can't not run the 2nd query... you sure?
  19. dbQuery() isn't php.
  20. Not really, becauase (a) the amount of data is the same and (b) getting mysql to "flip" the rows like that would be more expensive.
  21. Why does it matter how many rows it gives back? You can format the output however you desire.
  22. Yes, it was an IP issue. No, you can't safely assume anything. Try issuing a "SELECT NOW()" using an actual php function, not some fancy wrapper class.
  23. Depends with version... You either needs to use BINARY to cast the collation accordingly?
  24. You want TIMESTAMP not to have a time? Why? Who cares? Let it be there, you can always remove it for output... why would you throw away valuable data?
×
×
  • 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.