Question Regarding Update Year statement

2002-10-04 Thread W
Hello All, I'm looking for a date function that will allow me to update only the year portion of a field to a particular year, in this case, 2002. I've tried "UPDATE [table] SET YEAR([field]) = '2002' WHERE [field] > 2002" but this gives me an error. The MySQL documentation only seems to cover

Re: than you for your answer but...

2006-05-18 Thread Chris W
'mysql_real_escape_string' this function will add the needed escape characters to allow the insert to work. The APIs for other languages should all have the same function. * * -- Chris W KE5GIX Gift Giving Made Easy Get the gifts you want & give the gifts they want One stop wish list for any gift,

Adding row numbers to a select.

2006-05-19 Thread Chris W
Is there an easy way to add row numbers to the result of a select statement? -- Chris W KE5GIX Gift Giving Made Easy Get the gifts you want & give the gifts they want One stop wish list for any gift, from anywhere, for any occasion! http://thewishzone.com -- MySQL General Mailing

Re: Looking for free MySQL Administrator

2006-05-20 Thread Chris W
s any limitations on how many rows it can fetch at once. I just did a select * from my largest table, and in 100 seconds it said it returned 890,000 rows, don't know how to verify it really has that many rows displayed in the query browser, but I don't know why it wouldn't. --

Re: MySql Limitations??

2006-05-29 Thread Chris W
case the number of rows depends on the size of the rows. -- Chris W KE5GIX Gift Giving Made Easy Get the gifts you want & give the gifts they want One stop wish list for any gift, from anywhere, for any occasion! http://thewishzone.com -- MySQL General Mailing List For list archives:

Re: select 9000000000000.10*19.80 wrong result 178200000000001.97

2006-05-30 Thread Chris W
thing to a level of precision of 16 significant digits is completely impossible. -- Chris W KE5GIX Gift Giving Made Easy Get the gifts you want & give the gifts they want One stop wish list for any gift, from anywhere, for any occasion! http://thewishzone.com -- MySQL General Mailing L

Re: select 9000000000000.10*19.80 wrong result 178200000000001.97

2006-05-30 Thread Chris W
It is due to the assumptions MySQL makes about how many digits to display. Try select 1.00/666 and it will give the 0.0015. Add more zeros, and it displays more significant digits. -- Chris W KE5GIX Gift Giving Made Easy Get the gifts you want & give the gifts they want One stop wish lis

Re: DateTime limits

2006-06-06 Thread Chris W
;0001-01-01 00:00:00' I only have 4.1 so I don't know what would happen in 5 -- Chris W KE5GIX Gift Giving Made Easy Get the gifts you want & give the gifts they want One stop wish list for any gift, from anywhere, for any occasion! http://thewishzone.com -- MySQL General

Re: database size

2006-06-08 Thread Chris W
next time. Although I'm not sure why this question isn't in the FAQ as often as it is posted here. -- Chris W KE5GIX Gift Giving Made Easy Get the gifts you want & give the gifts they want One stop wish list for any gift, from anywhere, for any occasion! http://thewishzon

Re: Math problem

2006-06-22 Thread Chris W
ply a dollar amount to another number. Has anyone else seen this problem? What does a show create table give for the price column? I bet it is varchar. The only way to make it work then would be to trim off the dollar sign and cast it to a float or double. -- Chris W KE5GIX Gift Giving Made

Date functions

2006-07-07 Thread Chris W
) Yes I know that is just 3 days but other times I will want to find records that are a few hours old so I like using the formula. -- Chris W KE5GIX Gift Giving Made Easy Get the gifts you want & give the gifts they want One stop wish list for any gift, from anywhere, for any occ

Re: Date functions

2006-07-07 Thread Chris W
Addison, Mark wrote: From: Chris W Sent: 07 July 2006 09:23 It's late and I just gave up reading the manual. Can someone please tell me the easiest way to do a query that will return all rows with a time stamp that is X number of seconds older than the current time? Something

Re: I don't understand why SCSI is preferred.

2006-07-11 Thread Chris W
better. -- Chris W KE5GIX Gift Giving Made Easy Get the gifts you want & give the gifts they want One stop wish list for any gift, from anywhere, for any occasion! http://thewishzone.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:

Odd join questing

2006-07-14 Thread Chris W
| SELECT `PID` FROM serviceplanfeaturelink WHERE `SID` = '$SID' SELECT `PID`, `psoc`, `pName` FROM product WHERE pTypeID IN ($_FEATURES_TYPE_IDS) Just in case your aren't familiar with PHP the $SID is just a php variable. Any suggestions -- Chris W KE5GIX Gift Giving Ma

Re: Is a "set current" TIMESTAMP operation atomic when updating/inserting multiple rows?

2006-07-23 Thread Chris W
amp. It should be easy enough to test if you have a large set of data where an update would take a long time. I'm pretty sure it will do what you need though and set them all the same. -- Chris W KE5GIX Gift Giving Made Easy Get the gifts you want & give the gifts they want One stop wi

Re: SELECT with Result Ordered by Minimum of Fields

2006-08-06 Thread Chris W
David T. Ashley wrote: Can I just write something like: SELECT * FROM mytable WHERE fieldofinterest I think this will work.. SELECT *, IF(a-b < 0,a, b) as SortField FROM table WHERE whatever ORDER BY SortField a and b being the names of the fields you are interested in. -- Chris W KE5

Re: SELECT with Result Ordered by Minimum of Fields

2006-08-06 Thread Chris W
David T. Ashley wrote: On 8/6/06, Chris W <[EMAIL PROTECTED]> wrote: David T. Ashley wrote: > Can I just write something like: > > SELECT * FROM mytable WHERE fieldofinterest field2) ASC; I think this will work.. SELECT *, IF(a-b < 0,a, b) as SortField FROM table WHERE

Replicating -- sort of 2 way

2006-08-06 Thread Chris W
for DB X and the Slave for DB Y AND Server B would be the Master for DB Y and Slave for DB X. The reason I am doing this is just for keeping a backup. Is this a bad idea? Any better ways? -- Chris W KE5GIX Gift Giving Made Easy Get the gifts you want & give the gifts they want One

Re: Replicating -- sort of 2 way

2006-08-06 Thread Chris W
s too. The replication I was planing on doing was going to be between 2 servers at 2 different locations, which would allow for the best backup in case of disaster that completely destroyed one location. -- Chris W KE5GIX Gift Giving Made Easy Get the gifts you want & give the gifts they

Re: Connection Help - Stupid Question, sorry to bother.

2006-08-12 Thread Chris W
t to the mysql database with these details? if so how? Im sorry for asking seemingly obvious questions, but some assistance would be greatly appreciated. Thanks, Sana -- Chris W KE5GIX Gift Giving Made Easy Get the gifts you want & give the gifts they want One stop wish list for any

Re: Incrementing using Max(Field) ?

2006-08-15 Thread Chris W
uldn't this cause a problem if more than one person were trying to insert a record in that table at the same time? Could that not cause the ID to be the same for 2 records -- Chris W KE5GIX Gift Giving Made Easy Get the gifts you want & give the gifts they want One stop wish list for any

Re: query question: most active user

2006-08-20 Thread Chris W
GROUP BY UserID ORDER BY Count DESC LIMIT 5 -- Chris W KE5GIX Gift Giving Made Easy Get the gifts you want & give the gifts they want One stop wish list for any gift, from anywhere, for any occasion! http://thewishzone.com -- MySQL General Mailing List For list archives: http://lists.mysql.

Re: Calculation distances

2006-08-20 Thread Chris W
es. http://williams.best.vwh.net/avform.htm -- Chris W KE5GIX Gift Giving Made Easy Get the gifts you want & give the gifts they want One stop wish list for any gift, from anywhere, for any occasion! http://thewishzone.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql

Re: Calculation distances

2006-08-20 Thread Chris W
me of the mapping people like Google maps or Street Atlas USA, if they don't have a product they can sell you to provide lat long of street addresses, maybe they can tell you who provides them with data and contact them. -- Chris W KE5GIX Gift Giving Made Easy Get the gifts you want &a

Audit trail

2006-08-21 Thread Chris W
MySQL to do this, or do I just need to write code to track any changes as they are entered? -- Chris W KE5GIX Gift Giving Made Easy Get the gifts you want & give the gifts they want One stop wish list for any gift, from anywhere, for any occasion! http://thewishzone.com -- MySQL Gen

Re: Seperating Application server and Database server

2006-08-27 Thread Chris W
hould also help. If you move it, you need to be sure to have enough network band width between the two machines. -- Chris W KE5GIX Gift Giving Made Easy Get the gifts you want & give the gifts they want One stop wish list for any gift, from anywhere, for any occasion! http://thewis

Re: Conditional Insert

2006-08-28 Thread Chris W
w what the previous value is. You probably should define a stored procedure and call that. Here is an example which seems to work: Why not use this INSERT INTO table VALUES(..) ON DUPLICATE KEY UPDATE X = $X, y=$y .. -- Chris W KE5GIX Gift Giving Made Easy Get the gifts you want &

Re: Zip Code & Distance

2006-08-29 Thread Chris W
t just takes some math to figure out the distance. Not sure where you get the data but someone here probably knows. You can find details on the calculations here... http://williams.best.vwh.net/avform.htm -- Chris W KE5GIX Gift Giving Made Easy Get the gifts you want & give the gifts the

Group By question

2006-08-30 Thread Chris W
[EMAIL PROTECTED] F [EMAIL PROTECTED] The query would return row A, D, B, and E, in that order. It would not return C or F -- Chris W KE5GIX Gift Giving Made Easy Get the gifts you want & give the gifts they want One stop wish list for any gift, from anywhere, for any occasion!

Re: help with insert +php

2006-09-01 Thread Chris W
riggers on this table that could be doing this? -- Chris W KE5GIX Gift Giving Made Easy Get the gifts you want & give the gifts they want One stop wish list for any gift, from anywhere, for any occasion! http://thewishzone.com -- MySQL General Mailing List For list archives: http://lists

Re: Is there a way to load non-native Date type with LOAD DATA

2006-09-03 Thread Chris W
the first thing on the line, replace the first space on each line with a ^ and remove the second space. If the date is quoted, replace both spaces on each line with a quote. If the date is preceded by just a tab, replace both spaces on each line with a \t -- Chris W KE5GIX Gift Giving Made Easy

Re: Computing a column based on other columns

2006-09-10 Thread Chris W
derived_column ; This works on a table I have. SELECT MIN(tone) as `min`, MAX(tone) as `max`, MIN(tone)/MAX(tone) as ratio FROM pltone p I put the back tick mark around min and max alias, I'm not sure you need it but it is always a good idea anyway. -- Chris W KE5GIX Gift Giving Made Eas

Re: Sort Problem

2006-09-15 Thread Chris W
Albert Padley wrote: I have the following query that has worked fine for displaying standings for a soccer league. SELECT * FROM standings WHERE division = 'BU10' AND pool = '1' ORDER BY tpts DESC, spts DESC, w DESC, ga ASC, team_number ASC As I said, works fine. Now,

Re: making varchar field to act like numeric field

2006-09-28 Thread Chris W
0,000 etc. You must use the cast as another reply suggested. However I'm unclear as to why you would store numeric data in a var char field. If at all possible it would be better to store it in a numeric field. -- Chris W KE5GIX Gift Giving Made Easy Get the gifts you want & give the gift

Re: What's the PHP equivallent of "mysql mydb < somefile.sql"

2006-10-10 Thread Chris W
her types of SQL in them and almost no data actually. mySQL 5.0.15 ÐÆ5ÏÐ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- Chris W KE5GIX "Protect your digital freedom and privacy,

remote connection

2006-10-14 Thread Chris W
; with only one entry for that user. Can someone give me some ideas? Php info gives me this ... PHP Version 4.3.11 MySQL Client API version 3.23.49 My version of mysql is 4.1.15 and I have set it to use the old style password. Anyone have any ideas on what to look for? -- Chris W KE5GIX

Web Hosting and MySQL

2006-10-15 Thread Chris W
Also as for php they had version 4.3.11. If you are considering using godaddy.com for hosting, you can use this information to make the decision as to if their service offers what you need. -- Chris W KE5GIX "Protect your digital freedom and privacy, eliminate DRM,

Re: Remove unwanted characters from a name field

2006-10-25 Thread Chris W
. Doe - Jane W. Doe John Try this page with several examples and see if it will do what you want it to do. http://hrrdb.com/FormatName.php The main line of code that does the work is... $FormatedName = preg_replace('/^([A-Za-z]+)([^a-zA-Z]+)(.*)$/', '$1, $3', $FullName)

Finding duplicates

2006-10-30 Thread Chris W
condition exists? -- Chris W KE5GIX "Protect your digital freedom and privacy, eliminate DRM, learn more at http://www.defectivebydesign.org/what_is_drm"; Gift Giving Made Easy Get the gifts you want & give the gifts they want One stop wish list for any gift, from anywhere, fo

Re: Finding duplicates

2006-10-30 Thread Chris W
Chris wrote: Chris W wrote: Suppose I have table t with fields k1, k2 and k3 that all make up the primary key. Then I have fields x, y and z. If fields x, y and z all have the same values in more than one row, there is a good chance they are duplicate records. What is the best way to list

Searching "IN" a comma separated list

2005-06-25 Thread W Luke
Hi, Have struggled with this all day, and didn't know where else to ask. If it's not appropriate to the list, I apologise - and advice or pointers would be brilliant, as my head is now hurting! So here's the situation: 3 tables. f_u_groups f_groups and f_images f_u_groups contains the user's

Re: Searching "IN" a comma separated list

2005-06-25 Thread W Luke
On 25/06/05, Mathias <[EMAIL PROTECTED]> wrote: > I then write you this query which should give you the idea, and i think the > solution : > > mysql> select gid,ugid,FIND_IN_SET(gid,ugid) from groups,groupsList > -> where FIND_IN_SET(gid,ugid) > 0; > +--+-+---+

Re: How to edit part of a field?

2005-06-28 Thread W Luke
On 28/06/05, Brian Dunning <[EMAIL PROTECTED]> wrote: > Hi all - > > I have an urgent need to update several million records. There is a > URL stored in a MySQL 'text' field. Many of the records contain > "1234" like this: > > http://www.domain.com?etc=etc&arg=1234&etc=etc > > Any occurence of "

Asteriks in password field

2005-11-16 Thread W Roothman
Dear All, When I register a new user in my (php4.1 & MySQL 4) application, using: $insertSQL = "INSERT INTO tblusers (uname, usurname, uusername, upassword) VALUES ('$name', '$surname', '$username', password('$password'))"; an asteriks (*) is posted with the encrypted password to the password fi

Re: Fwd: avoiding use of Nulls

2009-03-14 Thread Chris W
you don't know what they are going to be doing. Also having the separate table to link employees and departments allows for a many to many relationship, so an employee can work in more than one department. I'll leave the discussion for how bad an idea that is for another list :)

Re: dynamically splitting a table through one full table scan

2009-03-28 Thread Chris W
Why not write a simple script that scans every record and inserts them into the proper table one at a time? In php for example.. $query = "SELECT * \n"; $query .= "FROM `X` \n"; $result = mysql_query($query); while(($row = mysql_fetch_array($result, MYSQL_ASSOC))){ $Values = ""; foreach($r

Update with value form another table

2009-05-22 Thread Chris W
study table. So I can do a simple select like this SELECT ProfileID, p.`Date` as `BadDate`, s.`Date` as `GoodDate` FROM profile JOIN study USING (`StudyID`) Of course study to profile is a one to many relationship. How do I run an update to set p.`Date` equal to s.`Date`? Chris W

Prepared statements and printing Queries

2009-10-20 Thread Chris W
have looked through the PHP docs and can't seem to find it. Of course I could be blind. Chris W -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org

Re: Is there a better way than this?

2009-12-27 Thread Chris W
Unless I am missing something, this should work. SELECT DISTINCT X FROM `A` WHERE Y IN (25) AND Y NOT IN (24) Chris W Tim Molter wrote: I'm new to MySQL and I'm looking for some guidance. I have a table A, with two columns X and Y with the following data: | X|Y

Re: tmp tables

2010-01-13 Thread Chris W
key) in the Cart table. Though it's not needed in the system as described above a "Many to Many" link requires a table to link to tables together having the two keys in it that relate to the two tables being linked. That's it for me tonight, everyone feel free to criticize at w

Re: 50 things to know before migrating from Oracle to MySQL

2010-01-29 Thread Chris W
0% of the people who are actually writing queries with that many joins don't have a solid grasp of the fundamental principles of relational database design. Chris W -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org

Re: redirecting query output?

2010-03-02 Thread Chris W
I'm not sure this is the best solution, but whenever I am inserting a lot of records with the possibility of some of those records already existing and I have no reason to update the existing records with new data, I use 'INSERT IGNORE'. I'm not sure if that will 'ignore' other errors that you

Re: SQL command for MySQL ?

2010-03-17 Thread Chris W
s+1),mail_rbl=(mail_rbl+1) Chris W Stephane MAGAND wrote: Hi i am debutant in SQL and i am search to know if it's possible: My SQL requets: UPDATE Table_Logs_Summary SET mails_recus=(mails_recus+1),mail_rbl=(mail_rbl+1) WHERE dom_id=4 AND Date_Start="2010-03-16 06:00:00" AND D

Re: 7-day average

2010-03-18 Thread Chris W
I changed the names slightly when I tested it but here is the query that gives the result you want... SELECT a.`AccountID`, a.`company`, sum(h.hits), count(h.AccountID), sum(h.hits)/count(h.AccountID) AS AvgHits FROM account a JOIN hitsperday h using (AccountID) WHERE `date` < DATE(now()) AND

Re: How to deal with 96 Dimensional Points ?

2010-03-30 Thread Chris W
t;= $r){ print "$PointID is with in $r of test point.\n"; } } In an application I had that was similar (but in 2D) I would insert the id of the points that passed the condition into a temp table. Then I could join that temp table to other tables do other queries I may need o

Re: Table Length Question...

2010-03-30 Thread Chris W
N `dftable` d USING(`name`) WHERE `FNumber` = '1' AND `Date` = '2010-03-02' If id, id2 and or type change over time and you need to keep track of that you could add those fields in this table. Chris W Steven Staples wrote: Hi there, I currently store some information about a u

Re: How to deal with 96 Dimensional Points ?

2010-03-30 Thread Chris W
the next round. Also doing it that way, instead of using the NOT IN syntax, which I understand can be slow, you can modify the where condition to find points that are inside the current cube of size r but are outside the previous cube. Chris W Werner Van Belle wrote: Hello Chris, The use

Combine Two Queries

2010-04-06 Thread Chris W
in JOIN `grouplink` l USING (`GroupID`) //Groups the LinkType, ID is in JOIN `group` g USING (`GroupID`) WHERE u.`LinkType` = 'user' AND l.`LinkType` = '$LinkType' AND u.`ID` = '$UserID' AND l.`ID` = '$ID' AND g.`Active` Is there any way merge these into one query? Chris W -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org

Re: INSERT INTO multiple tables

2010-04-13 Thread Chris W
I have no idea how you got here but there is no reason to do it that way. This will work just fine and I do it every day in php. However I don't use mysqli I still use ... mysql_connect mysql_select_db mysql_real_escape_string mysql_query Don't forget to use the mysql_real_escape_string funct

Speeding up inserts in InnoDB

2010-04-22 Thread Chris W
s InnoDB so I decided to change it to MyISAM and try again. With MyISAM I was getting around 10,000 inserts per second. Surely there is some way to make InnoDB faster. Any ideas? Chris W -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org

Re: Auto Increment in InnoDB

2010-04-22 Thread Chris W
u keep the full revision history. Although I suppose that if you were to keep say the most recent X revisions then the last revision would always be in the table and max could work where count would not always. Chris W -- MySQL General Mailing List For list archives: http://lists.mys

Re: Speeding up inserts in InnoDB

2010-04-22 Thread Chris W
Sorry I misspoke, I am doing updates not inserts. If I was doing inserts I thought about the multiple record at a time idea but unless there is something I don't know, I don't think you can do that with updates. I will look into turning autocommit off and see what that does.

Re: Count Query question

2010-05-12 Thread Chris W
With out the table definitions, I'm not sure how anyone could help. Can you send the output of "show create table" for each of the tables involved in this query? Chris W Keith Clark wrote: I'm trying to produce a report that will tell me how many products were availab

Re: Decimal points

2010-07-20 Thread Chris W
right with the sane number of digits after the decimal point. So why would you even want to do this is? Chris W -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org

Re: newb problem

2010-07-20 Thread Chris W
use upper case letters as that is the standard way queries are written. CREATE TABLE `patnotes` ( `patid` INT UNSIGNED NOT NULL, `patnote` INT UNSIGNED NOT NULL AUTO_INCREMENT, `parentid` INT UNSIGNED NOT NULL , `appuserid` VARCHAR(40) NOT NULL, `subject` VARCHAR(100) NOT NULL, `body` LONGTEXT N

Re: Performing subtraction between fields

2010-08-21 Thread Chris W
If you want C to always be A-B then it would, in my opinion, be a very bad idea to store C in the table. Instead you can just put C in your query. SELECT `A`, `B`, `A` - `B` AS `C` FROM `table` If that seems like a hassle, you could always create a view using that select. Chris W b

To join or not to join?

2010-08-25 Thread Chris W
. However in this situation it will be unique. I can't put a unique key on this field in the second table because there are other applications of the second table where I do need it to non unique. Hope that makes sense. Chris W -- MySQL General Mailing List For list archives:

Re: AW: Dup Key Error Messages

2010-09-07 Thread Chris W
p by displaying raw error messages. Chris W -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org

Re: prime number table

2010-09-18 Thread Chris W
e primary key does that for you. Chris W On 9/17/2010 1:28 PM, Elim PDT wrote: I got a file of the list of the 1st 1270607 prime numbers (the 1270607th prime is 1999, beat the $227 book at http://www.amazon.com/prime-numbers-Carnegie-institution-Washington/dp/B0006AH1S8). the file is an o

ORDER BY with field alias issue

2010-09-28 Thread Chris W
uld rather not do that. Is there a standard way to get around this and have it sort by the non-formatted time value? Chris W -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org

Re: Not to show until a certain date

2010-09-28 Thread Chris W
e` ASC Also to me it just makes it easier to read/ understand if you second condition is rewritten like this... AND CURDATE() >= announcements_postdate Just my opinion on that. Chris W -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org

Re: Get MySQL server IP address in SQL

2011-03-03 Thread Chris W
ng to someones home, knocking on their door, and asking, "Where do you live?" Chris W -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org

Is it possible to make this more efficient?

2011-10-18 Thread Wayne W
Hi, I asked this question over on stackoverflow - basically I have a query and when using EXPLAIN I see that around 2400 rows are still being scanned. I'd added various indexes but it cannot make it perform any better. I would appreciate if anyone has any further ideas? http://stackoverflow.com/

Possible to copy the key field to another on INSERT?

2012-10-16 Thread W. D.
When creating a record, the first field (KeyField)... KeyFieldBIGINT UNSIGNED NOT NULL AUTO_INCREMENT ...is it possible to copy this auto-generated value into another field when using the same INSERT that creates the record? Or would I have to use an UPDATE query using LAST_INSERT_ID()

Re: Possible to copy the key field to another on INSERT?

2012-10-17 Thread W. D.
At 02:44 10/17/2012, Claudio Nanni, wrote: >Take a look at TRIGGERS > >C. > >PS: I am curious to know why you would do that anyway Will want this 'AssociatedWith' field to be associated with an older records' KeyField so I can search for a group of records by this field. Start Here to Find

Re: Possible to copy the key field to another on INSERT?

2012-10-17 Thread W. D.
be able to search on the `AssociatedWith` field to find all records that rely on that first record's `KeyField`. > >PS: I am curious to know why you would do that anyway > >2012/10/17 W. D. > >> When creating a record, the first field (KeyField)... >> >>

Update One of Three tables in a single query

2012-11-30 Thread Chris W
ecords or don't update any records. Thanks for the help. Chris W -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql

Multi Lookup Table Joins

2007-09-30 Thread Chris W
-- Chris W KE5GIX "Protect your digital freedom and privacy, eliminate DRM, learn more at http://www.defectivebydesign.org/what_is_drm"; Gift Giving Made Easy Get the gifts you want & give the gifts they want One stop wish list for any gift, from anywhere, for any o

Not In join query.

2007-10-12 Thread Chris W
nt to match of FName and LName. I tried to use concat to build the full name and do the not in based on the new field MySQL didn't like that query at all. -- Chris W KE5GIX "Protect your digital freedom and privacy, eliminate DRM, learn more at http://www.defectivebydesign.

Join to find Duplicates

2007-10-16 Thread Chris W
u1.FName = u2.FName AND u1.LName = u2.LName LEFT OUTER JOIN userprofile p ON u1.UserID = p.UserID GROUP BY u1.UserID HAVING `Count` > 1 ORDER BY u1.LName, u1.FName However that returns rows that are not duplicate names and I'm not sure why. -- Chris W KE5GIX "Protect your d

Group by time range.

2007-10-30 Thread Chris W
s all happened with in say 10 seconds. So my group by would be more like.. GROUP BY CreateDate +- 10 SECOND Is there a way to do this? -- Chris W KE5GIX "Protect your digital freedom and privacy, eliminate DRM, learn more at http://www.defectivebydesign.org/what_is_drm"; Ham

Re: Incrementing a "Private" Integer Space

2007-11-24 Thread Chris W
REATE TABLE `t` ( `p` int(10) unsigned NOT NULL default '0', `q` int(10) unsigned NOT NULL auto_increment, PRIMARY KEY (`p`,`q`) ) ; -- Chris W KE5GIX "Protect your digital freedom and privacy, eliminate DRM, learn more at http://www.defectivebydesign.org/what_is_drm&qu

Re: Incrementing a "Private" Integer Space

2007-11-25 Thread Chris W
), (2,NULL), (3,NULL), (3,NULL); -- Chris W KE5GIX "Protect your digital freedom and privacy, eliminate DRM, learn more at http://www.defectivebydesign.org/what_is_drm"; Ham Radio Repeater Database. http://hrrdb.com -- MySQL General Mailing List For list archives: http://list

Re: Incrementing a "Private" Integer Space

2007-11-25 Thread Chris W
quot;many to many relationship" table and in that case neither field is auto increment. -- Chris W KE5GIX "Protect your digital freedom and privacy, eliminate DRM, learn more at http://www.defectivebydesign.org/what_is_drm"; Ham Radio Repeater Database. http://

Re: Deleting duplicate rows via temporary table either hung or taking way way too long

2008-02-04 Thread Chris W
The easiest way is to add the index with your create temporary table statement and then do an ... INSERT INTO dupes (SELECT .) -- Chris W KE5GIX "Protect your digital freedom and privacy, eliminate DRM, learn more at http://www.defectivebydesign.org/what_is_drm"; Ham R

Re: Deleting duplicate rows via temporary table either hung or taking way way too long [SOLVED]

2008-02-05 Thread Chris W
ther way around, it would be faster. Take every record in the dupes table and then use the index in the buglog table to find the row that matches the LogID. -- Chris W KE5GIX "Protect your digital freedom and privacy, eliminate DRM, learn more at http://www.defectivebydesign.org/w

Optimizing a query

2008-02-29 Thread Chris W
s I have set work, if the count is 1 or larger then that user has access to the page. Now the question is there anything I can do to make this query faster? -- Chris W KE5GIX "Protect your digital freedom and privacy, eliminate DRM, learn more at http://www.defectivebydesign.org/what

Recent change in behaviour when inserting into NOT NULL fields??

2008-04-03 Thread Ed W
ehaviour can be controlled, but as far as I can see I don't have the |STRICT_ALL_TABLES or ||STRICT_TRANS_TABLES options enabled anyway..? How can I return to the old behaviour (at least until I update my app)? Is this change in behaviour defined anywhere? Thanks Ed W | -- MySQL General M

Lost my defaults on varchar columns?

2008-04-04 Thread Ed W
y this has changed? Innodb if this makes a difference.. Thanks Ed W -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: Recent change in behaviour when inserting into NOT NULL fields??

2008-04-07 Thread Ed W
Baron Schwartz wrote: Hi Ed, On Thu, Apr 3, 2008 at 3:32 PM, Ed W <[EMAIL PROTECTED]> wrote: Hi Up until version 5.0.44 (on linux) it appeared that you could do stuff like deliberately insert a NULL into a NOT NULL varchar field and it would be silently converted to an empty

update select question

2008-04-15 Thread Chris W
y to do it. -- Chris W KE5GIX "Protect your digital freedom and privacy, eliminate DRM, learn more at http://www.defectivebydesign.org/what_is_drm"; Ham Radio Repeater Database. http://hrrdb.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To

Re: data truncation warnings by special characters

2008-04-18 Thread Chris W
ncted Description field like: "Jams, Jellies, Pur". Any idea how to solve this ? Thanks in advance, Cor -- Chris W KE5GIX "Protect your digital freedom and privacy, eliminate DRM, learn more at http://www.defectivebydesign.org/what_is_drm"; Ham Radio Repeater Datab

Re: Spatial data and mysql

2008-04-25 Thread Chris W
ut doing a table scan. Would the spatial index (Rtree) be able to achieve this? Are there any good tutorials (or heaven forbid, books) that anyone can suggest? Should I go hang out with the cool kids that are using postGIS ;) -- Chris W KE5GIX "Protect your digital freedom and privac

Timestamps replicating inconsistently depending on local timezone of server?

2008-05-13 Thread Ed W
med that dates would always be stored in UTC in the database and the only effect of localtime would be for display purposes? Can anyone shed some light on what's happening here please? Thanks Ed W -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysq

Re: Timestamps replicating inconsistently depending on local timezone of server?

2008-05-13 Thread Ed W
Rob Wultsch wrote: On Tue, May 13, 2008 at 2:07 PM, Ed W <[EMAIL PROTECTED]> wrote: I had naively assumed that dates would always be stored in UTC in the database and the only effect of localtime would be for display purposes? Can anyone shed some light on what's happening

Re: Timestamps replicating inconsistently depending on local timezone of server?

2008-05-14 Thread Ed W
then I have a bag of trouble when I want to figure out the time something happened (as you can see c1 and c2 should be the same in all cases, but not in your example) Can anyone shed some light on the best approach? Thanks Ed W -- MySQL General Mailing List For list archives:

Re: Match/No Match query

2008-05-21 Thread Chris W
ving more details on your data I can't say for sure but I am guessing a group by *might* be needed. -- Chris W KE5GIX "Protect your digital freedom and privacy, eliminate DRM, learn more at http://www.defectivebydesign.org/what_is_drm"; Ham Radio Repeater Database. http://hrrdb.

Re: Match/No Match query

2008-05-21 Thread Chris W
Jerry Schwartz wrote: From: Chris W [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 21, 2008 12:25 PM To: Jerry Schwartz Cc: mysql@lists.mysql.com Subject: Re: Match/No Match query Jerry Schwartz wrote: I have a list of codes. Some, but not all, of these codes will match the

Re: SET vs. ENUM

2008-07-31 Thread Chris W
e DB. Doing so would be kind of like giving a 16 year old kid the keys to a 200mph race car and say have fun. Sooner or later something bad is going to happen. Just my opinion. -- Chris W KE5GIX "Protect your digital freedom and privacy, eliminate DRM, learn more at http://www.d

Lookup tables

2008-07-31 Thread Chris W
h all the joins? -- Chris W KE5GIX "Protect your digital freedom and privacy, eliminate DRM, learn more at http://www.defectivebydesign.org/what_is_drm"; Ham Radio Repeater Database. http://hrrdb.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql

  1   2   3   4   5   6   7   8   >