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 N

Re: RPM or Source or Binary

2001-07-06 Thread Roger Ramirez
his way works perfectly for us. > > http://www.mysql.com/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

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 a

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 o

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/

indexing

2001-07-05 Thread Roger Ramirez
ok. The other two fields are varchar(5) and varchar(10) and I know for a fact that it didn't take more then 24 hours, and I'm pretty sure it was less than 6 hours. Thanks, Roger Ramirez - Before posting, please check:

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 )

2001-02-16 Thread Roger Ramirez
You can use: SELECT , count() FROM GROUP BY > -Original Message- > From: Franz, Fa. PostDirekt MA [mailto:[EMAIL PROTECTED]] > Sent: Friday, February 16, 2001 3:02 AM > To: [EMAIL PROTECTED] > Subject: COUNT(DISTINCT ) > > > > Hi Everybody , > > I am using MySql 3.22.32 on LINUX. > My

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 > &g

Query/Left Join problem

2001-02-15 Thread Roger Ramirez
et (0.10 sec) Is there a faster/easier way to do this? 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é. TodoB

RE: creating tables from the shell

2001-02-06 Thread Roger Ramirez
ok it looks like your funneling whatever query you have in create_member.sql into mysql and executing it on the samp_db database. From your filename I'm assuming that you have a "create table" query within create_member.sql. Is the table not being created within samp_db? Try this: ./bin/mysql s

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, Fe

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

2001-02-02 Thread Roger Ramirez
http://www.mysql.com/documentation/mysql/bychapter/manual_Reference.html#Gro up_by_functions max(x) works with the group by clause. > -Original Message- > From: Roman Arefiev [mailto:[EMAIL PROTECTED]] > Sent: Friday, February 02, 2001 10:25 AM > To: [EMAIL PROTECTED] > Subject: Max valu

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, 2

Re: Insert Problem

2001-01-30 Thread Roger Ramirez
Hmmm I don't believe you can have a where in an insert statement. You either do or you don't. Perhaps you are thinking of update? - Original Message - From: "Toby Miller" <[EMAIL PROTECTED]> To: "Liste mysql" <[EMAIL PROTECTED]> Sent: Tuesday, January 30, 2001 6:28 AM Subject: Inser

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 the