Jump to content

Jessica

Staff Alumni
  • Posts

    8,968
  • Joined

  • Last visited

  • Days Won

    41

Everything posted by Jessica

  1. CREATE TABLE IF NOT EXISTS `temp` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `title` varchar(100) NOT NULL, `a_number` int(11) NOT NULL, `another_number` int(11) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1; INSERT INTO `test`.`temp` ( `id` , `title` , `a_number` , `another_number` ) VALUES ( NULL , 'Row One', '1', '2' ), ( NULL , 'Row Two', '2', '1' ); SELECT * FROM `temp` WHERE a_number < another_number id title a_number another_number 1 Row One 1 2 If you want some help you're going to have to explain to us WHAT you are encountering. That query works. You haven't given us any information to help you, and it's annoying. (Sidebar: I used phpmyadmin for that dump, excuse the quoted numbers. Blah blah blah)
  2. ... So .... why don't you post it HERE so we can HELP you make it WORK.
  3. So....you read my post, said you had already done this, and then in the end that was the problem....
  4. How on earth did you come up with that as a solution?????? I'm just... I am literally flabbergasted. Literally. What did you think you accomplished by switching not only the order of the escape character and escapee, but the actual slash from \ to / ????? I just...
  5. 1. Post in the right forum next time please. I'm moving this. 2. Use code tags so we can read your code. 3. Your select query is getting ALL the rows in your table, except you only run it once so it gets the first one every time. use mysql_insert_id.
  6. I see what you're saying, sure. .... OP, if you still have an issue please post with more details.
  7. You need to create a new table that holds the ID of the parent entry and the type selected. you'd do three new rows in it, one for each, all with the same parent ID.
  8. The name needs to be an array. CheckboxGroup1[] For the rest of your question, look up "Data Normalization".
  9. I've never done it but a coworker told me it was possible a few weeks ago. http://dev.mysql.com...ndex-hints.html Might help. Edit: and according to the examples you can do it on the first table not just the joined ones.
  10. Dear god. No. You should turn off magic quotes and use escape_string. Really you should switch to PDO.
  11. Yes, it's possible. Why don't you post your actual code that you're having trouble with?
  12. die
  13. Yes, it's javascript. Specifically, AJAX. jQuery has a great tool for AJAX.
  14. Edit: God damnit.
  15. What EXACTLY is the error you get? Read the post in my signature about debugging SQL and follow those steps. Give us the error message and the final query.
  16. Strike that, read too fast. Attempt 2: You're sending MySQL a string. Strings need to be quoted. It thinks your variable's value is a column name.
  17. He's defining them AFTER trying to use them
  18. You can't see that those numbers are in ascending order??
  19. Without checking for mysql errors it's usually really hard to tell. But you don't have $parm_book_id defined or $parm_book_title. So...
  20. You can easily look at those timestamps and see that they are IN FACT in order. 1357.... 13587... 13589... 1359.... 13874... 13877... So...the problem is clearly not in the code you've posted. Edit: The last one in the list is: 2013-12-22 19:50:33 and the first is: 2013-01-04 01:35:43 I think you need to refer to date() for the right formats to use for your human-readable date.
  21. Your original structure was better. What if someone needs to clock in and out for a second break? What about when they don't take a lunch? The original design is more flexible.
  22. The only way you can get an accurate estimate is to run the script.
×
×
  • 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.