Updating Random Records

2001-07-09 Thread Roger Ramirez
Is there a way to update random records? I have a database of 5.6 million records and I want to pull out 5000 records and mark a field in the database that I've pulled these so that I don't pull the same 5000 again. I know I can select the records by doing: SELECT * FROM 5600k WHERE picked IS

Random Selection

2001-07-06 Thread Roger Ramirez
I have a database of 5.6 million records and I need to choose 5000 random records. What would that query look like? - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/

Re: db design questions

2001-07-06 Thread Roger Ramirez
Pretty much was Siomara says is the way I think, except that I would have made the extra table for the two addresses. For the kids field it depends on what you want. If you want to have information for each child then you would create a separate table, but if you just need to record the number

RPM or Source or Binary

2001-07-06 Thread Roger Ramirez
I'm curious as to how people are installing MySQL on Linux. I've been learning linux on Red Hat and more recently I've been using Trustix Secure Linux (which also uses RPMs) but I've never actually installed MySQL through the RPM's. The person who gave me my first basic lessons in Linux had an

Re: RPM or Source or Binary

2001-07-06 Thread Roger Ramirez
/articles/ddws/4.html - Original Message - From: Roger Ramirez [EMAIL PROTECTED] To: MySQL [EMAIL PROTECTED] Sent: Saturday, July 07, 2001 10:02 AM Subject: RPM or Source or Binary I'm curious as to how people are installing MySQL on Linux. I've been learning linux on Red Hat and more

Problems with MOD

2001-04-27 Thread Roger Ramirez
Why do I get the following results? mysql select (1008306000-988344000)/86400/7, mod((1008306000-988344000)/86400,7.); ++-- + | (1008306000-988344000)/86400/7 | mod((1008306000-988344000)/86400,7.) |

RE: COUNT(DISTINCT Column_Name)

2001-02-16 Thread Roger Ramirez
You can use: SELECT Column_Name, count(Column_Name) FROM Table_Name GROUP BY Column_Name -Original Message- From: Franz, Fa. PostDirekt MA [mailto:[EMAIL PROTECTED]] Sent: Friday, February 16, 2001 3:02 AM To: [EMAIL PROTECTED] Subject: COUNT(DISTINCT Column_Name) Hi Everybody

Query/Left Join problem

2001-02-15 Thread Roger Ramirez
something like WHERE count(member_id) 1 (although I know this does not work in that query) Thanks, Roger Ramirez Senior Developer TodoBebe.com - Todo lo que quiere saber de su beb. TodoBebe.com - The best baby website in Spanish! www.todobebe.com

RE: Query/Left Join problem

2001-02-15 Thread Roger Ramirez
Duh why didn't I think of that. Thank you graciously. :) -Original Message- From: Quentin Bennett [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 15, 2001 4:26 PM To: 'Roger Ramirez'; MySQL List Subject: RE: Query/Left Join problem Hi, Your left join tried to find members

RE: Error creating tables

2001-02-06 Thread Roger Ramirez
I copied and pasted your create table query into mysql and it created the table without a problem. I'm using 3.32.32. mysql describe top - ; +-+---+--+-+-++ | Field | Type | Null | Key | Default | Extra |

RE: Insert into blob

2001-02-06 Thread Roger Ramirez
Try using this function on your data before inserting into the database. http://www.php.net/manual/en/function.addslashes.php If that doesn't work show us what error you are getting. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, February 05,

RE: Boolean Datatype

2001-02-06 Thread Roger Ramirez
Couldn't you just do: boolVarsENUM ('True', 'False') DEFAULT 'False' -or- boolVarsENUM ('TRUE', 'FALSE') DEFAULT 'FALSE' unless I'm misunderstanding what you are saying about ASP. -Original Message- From: Russ Davies [mailto:[EMAIL PROTECTED]] Sent: Tuesday,

RE: Auto-Increment - how can I avoid repeating IDs?

2001-01-30 Thread Roger Ramirez
Use your own id's. I personally hate auto increment. I do all my work in php so I make my id's like this. srand(time()); $id = md5(uniqid(rand())); This will make a 32 character id. -Original Message- From: Viken Nokhoudian [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 30,

Re: Help with Query Syntax?

2001-01-29 Thread Roger Ramirez
Hmmm... Looks like you over did the query to me. This should work. SELECT o.OrderID, c.CustomerFirst, c.CustomerLast, s.SalesRepFirst, s.SalesRepLast FROM Orders as o, Customers as C, SalesReps as s WHERE O.CustomerPhone=c.CustomerPhone AND o.SalesRepID=s.SalesRepID of course you don't need