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

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

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

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: 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

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

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: 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

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: 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: 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: 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: 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

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: 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

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: 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

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
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: 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: 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: 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: 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: 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: 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

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

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

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

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: Join question

2008-10-16 Thread Chris W
I have no idea what I was thinking. For some reason I was thinking Distinct wouldn't work, must have been temporarily brain dead. Thanks for the wake up call. Gerald L. Clark wrote: Chris W wrote: I have two tables, one is a list of users and the other is a list of events for each

Join question

2008-10-16 Thread Chris W
times in one day just that it happened at least once on that day for a user. Chris W -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: Help with Table structure

2008-08-11 Thread Chris W
Not sure how someone can intelligently comment on your table structure when you haven't given any details of the data you are storing. In my experience, the fact that you have 75 fields in your table is a strong indicator that your data is not normalized. If that is the case you tables are li

Re: reset auto increment to a lesser value

2008-08-02 Thread Chris W
t you want it to be. Mark Can you elaborate on that point? Do you not use auto-increment values to link records in a one to many relationship? Chris W -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: SET vs. ENUM

2008-07-31 Thread Chris W
interface with predefined pathways. Can't really argue with that. -- 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 Mailin

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

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

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: 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: 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

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

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

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

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

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: 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: 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-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

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

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

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.

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

Re: Can't fetch result twice in a PHP script

2007-09-15 Thread Chris W
esult variable. -- 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

Re: How do I get myself of this email list?

2007-08-30 Thread Chris W
ssage! -- Chris W -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: duplicate key question

2007-06-22 Thread Chris W
other than that I'm not sure how I can now what the other ones are if there is more than one additional unique key. -- 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

Re: Arbitrary Boolean Functions as Relational Database Structure?

2007-06-09 Thread Chris W
7;m not mistaken you may be able to rewrite this just using joins. Chris W David T. Ashley wrote: Hi, I'm implementing a software release database. Users may aribtrarily be members of groups (a many-to-many mapping), and each software release may contain multiple files. I'd l

RE: Fields seem to be mis-wired (for lack of a better term)

2007-04-24 Thread Chris W. Parker
On Tuesday, April 24, 2007 10:12 AM Jim Winstead said: >> AND `type` = 0 >> AND `manager_id` = 0 >> AND `modified` = NOW() >> WHERE `id` = 5 > > you can't use 'AND' to connect your updates, you need to use commas: > > UPDATE users SET name = 'First Las

Fields seem to be mis-wired (for lack of a better term)

2007-04-24 Thread Chris W. Parker
Hello, I'm having a problem when trying to update a record. I'm trying to set a field called 'balance' to 0 but instead of 'balance' becoming 0 the field 'name' becomes 0. None of the other columns are updated incorrectly. Here's the SQL statement I'm using: UPDATE `users` SET `name` = 'First

load sharing

2007-02-26 Thread Chris W
uster storage engine not a good choice. Can someone here give some insight and suggest other options I could look into? -- 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

Re: On Duplicate Key Update question

2007-01-05 Thread Chris W
thing like this... Insert Into tablename (myID, Qty) Values ($myID,$Qyt) On Duplicate Key Update Qty = Qty + $Qty you may also be able to use... On Duplicate Key Update Qty = Qty + Values(Qty) But I have never used that before so I'm not sure -- Chris W KE5GIX "Protect your di

Re: float numbers

2006-11-18 Thread Chris W
2, such as .5, .25, .125, .75, .625. You get the idea. I don't remember any examples of the first two cases, and am too lazy to figure any out, but they do exist. -- Chris W KE5GIX "Protect your digital freedom and privacy, eliminate DRM, learn more at http://www.defectivebyd

MySQL Workbench

2006-11-02 Thread Chris W. Parker
Anyone have any info on MySQL Workbench? In it's latest state it isn't usable at all. It looks like it'll be really great.     Thanks,   Chris ParkerAardvark Tactical, Inc.IT Manager1002 W Tenth St. Azusa, CA 91702phone: 800.997.3773 x130 fax: 626.334.6860[EMAIL PROTECTED]  

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

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

Performance of different length/size datatypes

2006-10-27 Thread Chris W. Parker
Hello, Originally I had this long explanation of what I'm doing and why I'm asking this question but I thought I'd just cut to the chase and ask... For a db that doesn't get a lot queries is there much of a performance difference between BLOB and VARCHAR(255)? Thanks, Chris. -- MySQL General

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)

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,

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

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,

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: Sort Problem

2006-09-15 Thread Chris W
nearest 10's before doing the sort. Of course the output is not rounded. The following are a few examples of the output of the round statement. ROUND(23.632, 2) = 23.63 ROUND(23.632, 1) = 23.6 ROUND(23.632, 0) = 24 ROUND(23.632, -1) = 20 -- Chris W KE5GIX Gift Giving Made Easy Get the gif

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: 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: 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

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: 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

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: 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

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: 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

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: 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: 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: 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

Transactions and testing an Insert statement

2006-08-07 Thread Chris W. Parker
Hello, Me again. Excuse for sending two questions so closely together. I'm looking through the MySQL manual (as well as searching Google and the PHP site's MySQL functions) trying to find out how to test an Insert statement (or any other statement for that matter). Although I haven't found a dir

RE: Delete one record, automatically delete other records...

2006-08-07 Thread Chris W. Parker
Chris on Monday, August 07, 2006 6:19 PM said: > Foreign keys with an "on delete cascade" should do it. > > http://dev.mysql.com/doc/refman/5.1/en/example-foreign-keys.html Thanks everyone! -- MySQL General Mailing List For list archives: http://lists.mysql.com/m

Delete one record, automatically delete other records...

2006-08-07 Thread Chris W. Parker
Hello, I'm not sure if this is possible (or what it's called, and how to search for it) at the db layer or if this has to be done at the application layer... I would like to be able to delete one record in one table and then automatically (without making an extra call to the db) delete other recor

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

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: 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

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: 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

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: 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:

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

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: 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

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: 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: 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: 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

  1   2   >