Jessica
Staff Alumni-
Posts
8,968 -
Joined
-
Last visited
-
Days Won
41
Everything posted by Jessica
-
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)
-
... So .... why don't you post it HERE so we can HELP you make it WORK.
-
So....you read my post, said you had already done this, and then in the end that was the problem....
-
Check Box Group Insert / How to handle the data
Jessica replied to cdoggg94's topic in PHP Coding Help
Nope! -
Check Box Group Insert / How to handle the data
Jessica replied to cdoggg94's topic in PHP Coding Help
Yes! Good job -
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...
-
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.
-
I see what you're saying, sure. .... OP, if you still have an issue please post with more details.
-
Check Box Group Insert / How to handle the data
Jessica replied to cdoggg94's topic in PHP Coding Help
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. -
Check Box Group Insert / How to handle the data
Jessica replied to cdoggg94's topic in PHP Coding Help
The name needs to be an array. CheckboxGroup1[] For the rest of your question, look up "Data Normalization". -
Table design: Sum+grouping values by date and time of day. (500k+ rows)
Jessica replied to Christian F.'s topic in MySQL Help
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. -
Dear god. No. You should turn off magic quotes and use escape_string. Really you should switch to PDO.
-
Yes, it's possible. Why don't you post your actual code that you're having trouble with?
-
Possible? want one combobox to populate another combo box
Jessica replied to loren646's topic in PHP Coding Help
Yes, it's javascript. Specifically, AJAX. jQuery has a great tool for AJAX. -
Edit: God damnit.
-
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.
-
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.
-
He's defining them AFTER trying to use them
-
Sorting multidimensional array on date - again
Jessica replied to Drongo_III's topic in PHP Coding Help
You can't see that those numbers are in ascending order?? -
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...
-
Sorting multidimensional array on date - again
Jessica replied to Drongo_III's topic in PHP Coding Help
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. -
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.