History Of Changed Percents
I have a table with data like that:
percent date
50% 2007-05-01
30% 2007-05-02
30% 2007-05-03
50% 2007-05-04
50% 2007-05-05
20% 2007-05-06
20% 2007-05-07
50% 2007-05-08
70% 2007-05-09
70% 2007-05-10
The query has to return this rows:
50% 2007-05-01
30% 2007-05-02
50% 2007-05-04
20% 2007-05-06
50% 2007-05-08
70% 2007-05-09
View Complete Forum Thread with Replies
Related Forum Messages:
Tracking The History Sql Statements
I have a system runnig with many different insert,update and select queries running. sometimes my databases get updated with wrong values and I cant track the sql statement which cause this. So I want to get a list of all the sql statement that has been executed on that server? How can I get this information ?
View Replies !
Mysql Sql History(cross Session)
I have found many docs to see is there any way to figure out how can mysql store the typed words or sql(whatever it is a valid sql or not) so that we can just use "arrow up" or "arrow down" easily to move to the previous sql or even some sqls typed yesterday or in different sessions(such as by putty/konsole) that is already logged out ? Does anyone have any clues about this ? I think that it should be done by setting some mysql server vairables but i didn't see any mentioned in the mysql docs.
View Replies !
Clear MySQL History - Remotely
I was wondering if it's possible to Clear MySQL's History Remotely. Considering that you only have root access to the database but no access to the linux box. I found something in Goggle to do this, but you need to have access to the linux box: cat /dev/null ~/.mysql_history How can you do this remotely with only root access to the database and not to the linux box?
View Replies !
Save Game Score History
I want to save game scores in my DB. I’ve learned that two tables is suitable for this. One that takes care of the parameters for the games it selves where each row I contains a game, and one for the game scores where each row contains a player and only the bests scores for each player are saved. Now I want to save all the scores each players submits. How do I accomplish this?
View Replies !
Why Doesn't This Work? - SHOW TABLES NOT LIKE 'history%'
Well my question is simple - I want to exclude tables with a certain prefix using this: SHOW TABLES NOT LIKE 'history%' With the prefix obviously being 'history'. I cannot understand why I get a nasty syntax error - it works when I have just LIKE rather than NOT LIKE but I want all the tables that are NOT like it.
View Replies !
Selecting The Latest Rows From A History Table
Table Looks like this (its testopia test_case_texts) case_ID(int) case_text_version(int) timestamp(datetime) Action (text) Setup (text) Breakdown (text) <more.e> Whenever you edit the text columns you end up with a new row with the same case_id, new version and new timestamp. I'm trying to select the last entry for each case_id. I really only care about the setup column right now. I've tried this: SELECT test_case_texts.case_id, Max(test_case_texts.case_text_version), test_case_texts.setup FROM test_case_texts GROUP BY test_case_texts.case_id I get the correct last entries for the version col, but I do NOT get the corresponding setup value.
View Replies !
Changed Characters
While using mysqldump to backup the databases on my server i noticed that all the the portuguese accented characters from my databases get screwed up and changed to wierd characters. What's up?
View Replies !
Access MySQL Command Line History In WinXP
I've installed MySQL v4.1 onto my WinXP and unfortunately now need to reinstall my OS. I need to access my mysql command line history but don't know how. I know there's a .mysql_history file but that's just on Unix. Is there a similar file in Windows? If not, how does mysql remember all the commands? Where is it's buffer? Also, the doskey /history command only gives a history of the cmd.exe prompt so that's not what I want either.
View Replies !
Delete History Data Auto, Rebuild Indices
i would like to know if there is any function for delete data before two days or before a specified date. now, i am deleting data using delete * from table when (); the autonumber id or index continue to increment, i would like to know how to set the id to 1 whenever i delete all data
View Replies !
Using A Revision Number To Keep A History (how To Select Current Rows?)
Here is the table structure: CREATE TABLE IF NOT EXISTS `jos_wahd_glossary` ( `headword` varchar(255) NOT NULL default '', `description` text NOT NULL, `published` tinyint(1) unsigned NOT NULL default '0', `checked_out` int(11) unsigned NOT NULL default '0', `checked_out_time` datetime NOT NULL default '0000-00-00 00:00:00', `last_updated` datetime NOT NULL default '0000-00-00 00:00:00', `revision` int(3) unsigned NOT NULL default '1', `author` int(11) unsigned NOT NULL default '0', PRIMARY KEY (`headword`,`revision`), KEY `headword` (`headword`) ) TYPE=MyISAM;
View Replies !
Changed User Privileges And Now I Can't Log In
I read several web sites and O'Reilly's book on MySQL about securing the system tables. I removed several users and, as advised inthe book and web sites, changed the user "root" to another name with another password. I removed the site name as a host but kept the IP address. Now when I use phpMySdmin to get back in, it let's me past the login popup BUT it gives me the message: Error MySQL said: Access denied for user: 'root@localhost' (Using password: YES) The data in the database is not important but the database structure/definition is. I'd like to find a way to back up or dump that. Then I can reload MySQL and start over.
View Replies !
Get The Latest Changed Records
I hava a table with the following information CREATE TABLE TEMP1 (REFID INT, REVISION INT, FIELDNAM VARCHAR(10), VALUE VARCHAR(10)); INSERT INTO TEMP1 VALUES(1001, 0, A, A2); INSERT INTO TEMP1 VALUES(1001, 0, C, C2); INSERT INTO TEMP1 VALUES(1001, 0, E, E2); INSERT INTO TEMP1 VALUES(1002, 0, A, A3); INSERT INTO TEMP1 VALUES(1002, 0, B, B2); INSERT INTO TEMP1 VALUES(1002, 0, E, E3); INSERT INTO TEMP1 VALUES(1001, 1, A, A4); INSERT INTO TEMP1 VALUES(1001, 1, E, E4); Here based on latest revision and refid I should get the fieldnam and value. Expected output: REFID FIELDNAM VALUE REVISION 1001 A A4 1 1001 E E4 1 1002 B B2 0 1001 C C2 0
View Replies !
User Information Changed
The other day someone changed every user's password on my site. Then they changed every user's email address to theirs - I assume the reason was that when the user used the password reset function, they would never see the information. I'm trying to research what/where the vulnerability is in the script that I'm suing, but I don't really know where to start - not being a hacker, I don't even know the terms to search for here or on google. Is this what is meant by mysql injection?
View Replies !
Float(m,n) Changed Between Mysql 4.0 And 5.0?
I have a float(11,10) field (default NULL) in one of my MyISAM tables. With MySQL 4.0.16, I can call an Update/Insert query with a value of , say 33.166668 to this field, and it updates correctly. When I retrieve that value again with a select statement, I get something like 33.1666668392 (10 digits after decimal). Which is correct. (The sql_mode server variable is set to 0) With the same field in MySQL 5.0, my experience is different. With the server sql_mode set to one of the strict values( SQL_TRANS_STRICT), i get an error about out of range value for the float field. when I change the sql_mode to not have the SQL_TRANS_STRICT, I get the same error as a warning, 1264 "Out of range...". When I retrieve this value, it is set to 10.0000000000, which is wrong. But , when I change the field description to float(11,5) and do an update, the value is updated right, but I get an intermittent "No rows updated" error. Could anybody please explain if the float definitions changed between versions? Does float(m,n) now mean that I can have only (m-n) digits before decimal point?
View Replies !
Rows Changed In Update SQL
Is there a way to find out how many rows got updated when i execute a update stmt. I would like to get the updated rows count in SQL. Let me know and Thanks in advance. update stmt where clause; now how can i get the count of rows that got updated.
View Replies !
How To Find Out Which Table Is Changed?
I dont have source code of my web application I installed. Its using mysql 5. when I create a new user account, I know "users" tables is changed, but there's also a couple other tables are modified. Is there a way I can find out which table is changed?
View Replies !
Changed Datadir Now Mysql Won't Run
I changed the datadir using mysql administrator (so I could "see it") (I'm using version 5.0.x under OS X 10.4.5 and now mysql won't run and I don't know how to reset the datadir. I've reinstalled mysql and when I try to run it this is what I get: iBook-G4:/usr/local/mysql michael$ sudo ./bin/mysqld_safe & [16] 12878 iBook-G4:/usr/local/mysql michael$ Starting mysqld daemon with databases from /Users/michael/Sites STOPPING server from pid file /Users/michael/Sites/iBook-G4.pid 060329 12:38:24 mysqld ended
View Replies !
All Swedish Characters Is Changed
I'm doing Kevin Yanks tutorial about how to manage users with session (with some small modifications). But when the data is inserted into the table all Swedish characters is changed to some strange "¥" and "¶". Why is it so and how to fix it? According to PHPAdmin the collation is either UTF-8 (db) or Latin1_swedish (table)?
View Replies !
Changed Root Password, Now I Can't Do Anything
I am following the MySQL by Michael Kofler and looking at securing root access as currently it has no password. I've logged into the MySQL consol and changed password using : mysqladmin -u root -h localhost password XXX However, i now can't do anything in in mysql terminal it comes back "access denied for user 'root'@'localhost' (using password :NO)
View Replies !
Date And Time Stamp A Changed Row
I am about to declare a table with 20 columns. How do I create 4 more columns: 1. current Time 2. current Day of the month 3. current Month 4. current Year Such that: a. These 4 columns are not editable by the user. b. Whenever a row is updated/inserted/replace/etc. then these 4 columns in that row are automatically updated by the system accordingly.
View Replies !
Datetime Field Changed After ALTER
To archive when a row is added, I have a column called date_added which uses the data type DATETIME. I recently added a new column to my table "ALTER TABLE mytable ADD COLUMN mycolumn INT", and my stored dates have all been changed. In hindsight, was this to be expected? I am using PHP to both push data into MySQL and pull data from MySQL. To prevent such future blunders, is it good practice to store dates as CHAR data type, and actively store the date using PHP?
View Replies !
Phone Numbers Changed On Import
I have imported a cvs data file every way I can think of and I always get this weird problem. About 75% of my 4,000 files end up with the phone number 2147483647. I searched the cvs file and this number does not exist there. Is there an explaination for this?
View Replies !
Replication :: Master Log File Position Changed
I have a simple master/slave replication environment that is working smoothly with one exception. If I restart the master server the Master Log File is incremented by one (e.g. the original master log is named data-bin.000001 and the new master log is named data-bin.000002) the slave server never notices that the Master Log File and the Master Log Position have changed. Instead, the slave sits there waiting for new entries in the old Master Log File. I can tell this by executing a SHOW SLAVE STATUS on the slave server. I am not sure about this because I can't find any documentation on the proper behavior of mysql during this scenario, however, I am under the impression that slave server should be able to figure this out and continue replicating, without requiring me to execute an "CHANGE MASTER..." command on the slave server every time the master is restarted. Of course, I assume this same problem will occur when the Master Log File grows to its maximum size and a new Master Log File is created. If anybody who has experience with mysql replication could just confirm that the behavior I am seeing is not correct, that would be great. Or if anybody has any suggestions as to what, if anything, is wrong with my setup. Code:
View Replies !
Row Cannot Be Located For Updating. Some Values Might Have Changed Since It Was Last Updated
I've recently migrated from access to mysql with vb6). Unfortunately, i get the following error whenever the .update is executed on the recordset. "Row Cannot be located for updating. Some values might have changed since it was last updated" The select statement is: Select * from tablename, connection,3,3 (have also modified the 3,3, to be adOpenDynamic, adLockOptimistic) I have tried checking the flag To Return Matching Rows, I've added the option = 2 in the connection string, i have a primary key field in the table, and I've also tried re-assigning it to itself.
View Replies !
String Error - Quotes Changed To Question Marks
I recently converted an asp/access site to an asp/mysql site. Now all my strings are displaying funky. For example if I have the text - Why don't we say "Yipee" - it displays on my site as - Why don?t we say ?Yipee?. The same change is being made when I use a sentence with "..." in it. I like ... baseball is changed to - I like?baseball. Any thoughts as to why this is happening? Sometimes it is actually being changed somehow in the database, and sometimes it is correct in the database, but then changed when it displays on the web.
View Replies !
Mysql Appears To Have Changed The 'password' Function Hashing
I've been using Mysql for about 6 months but in fairly basic fashion. For a cms I have built, I have a users table, with userName and password fields. An admin can create new users, and the password is hashed using the PASSWORD() function. SQL: "INSERT INTO users VALUES ('', '$userName', PASSWORD('$userPwd')) Straight out of the book basically. Now the problem is that all this has been functioning fine on a couple of sites on external servers, plus a couple of local machines. Until today, on my main dev machine - yesterday a user could log in, today they couldn't. As far as I can tell, nothing has changed. But when I look at the hashes in the database table, they are 41 chrs, and when I add a new user, the hash is 16 characters. I know that at some stage the hash length was increased between mysql versions, but I have not updated the install (I run XAMPP for Windows 1.4.14, which appears to install php 5.0.4 and mysql 4.1.12) Is there any other reason that the hash length could change to 16? I'd like to know why this happened so that I'm prepared if it happens on the server (where it is not so easy to hack in and add new users that can log in again)
View Replies !
Caching "most Recent" Values From A History Table
I have a "catchall" table in which I can dynamically define fields for values that change over time, so I can build up a history for a client. (I'm sure this is a common pattern, but I don't know what it's called.) I have one table -- client_history -- for values and dates:....
View Replies !
Restoring Database In A Changed Database
I have a database name 'rtdb1' with a table 'review_table'. The 'review_table' has one column 'version' of varchar 20 type. I took the mysqldump of the rtdb1 database. Then I changed by table 'review_table' by adding one more column 'category' int type and called the database 'rtdb2'. But when I restore my dump of 'rtdb1' database to 'rtdb2' database, I don't see the 'category' column.
View Replies !
Session And Session History -
looking for a way to monitor connections that are currently open and their history. for example - join connection information (from where it is running, which program, etc...) with its queries history. In oracle you can find all the session information in the Data dictionary and you can easily join 2 tables to get it. I'm using MySql version 5.1.24-rc-community.
View Replies !
|