Re: Random Error

2006-08-16 Thread Dan Buettner
A little more searching also uncovered this, which appears to be right up your alley: http://dev.mysql.com/doc/refman/4.1/en/gone-away.html On 8/16/06, Dan Buettner <[EMAIL PROTECTED]> wrote: At first blush, I'd look into a few different possibilities - - An idle connection timeout is being en

Re: Random Error

2006-08-16 Thread Dan Buettner
At first blush, I'd look into a few different possibilities - - An idle connection timeout is being enforced on a persistent connection pool - Too many individual connections are overwhelming a Windows server (see http://dev.mysql.com/doc/refman/5.0/en/can-not-connect-to-server-on-windows.html)

Re: Random Error

2006-08-16 Thread Mike Blezien
gt; Cc: "MySQL List" Sent: Wednesday, August 16, 2006 3:24 PM Subject: Re: Random Error Mike, can you provide more details? OS platform, networking overview, types of apps experiencing this error (PHP app, mysql cli, etc), does it happen with local as well as network connections, etc

Re: Random Error

2006-08-16 Thread Dan Buettner
Mike, can you provide more details? OS platform, networking overview, types of apps experiencing this error (PHP app, mysql cli, etc), does it happen with local as well as network connections, etc. This will help us help you. Dan On 8/16/06, Mike Blezien <[EMAIL PROTECTED]> wrote: Hello, oc

Re: Random SELECT on subset

2006-08-13 Thread Chris
Mark wrote: -Original Message- From: Chris [mailto:[EMAIL PROTECTED] Sent: maandag 14 augustus 2006 6:32 To: Mark Cc: mysql@lists.mysql.com Subject: Re: Random SELECT on subset Thanks to you, the query has been greatly simplified, but the result is still the same: every once in a

RE: Random SELECT on subset

2006-08-13 Thread Mark
> -Original Message- > From: Chris [mailto:[EMAIL PROTECTED] > Sent: maandag 14 augustus 2006 6:32 > To: Mark > Cc: mysql@lists.mysql.com > Subject: Re: Random SELECT on subset > > > Thanks to you, the query has been greatly simplified, but > the result

Re: Random SELECT on subset

2006-08-13 Thread Chris
Mark wrote: -Original Message- From: Chris [mailto:[EMAIL PROTECTED] Sent: maandag 14 augustus 2006 4:54 To: Mark Cc: mysql@lists.mysql.com Subject: Re: Random SELECT on subset Hmm, this still does not do what I want: SELECT columnId FROM queue WHERE processed = '1' ORD

RE: Random SELECT on subset

2006-08-13 Thread Mark
> -Original Message- > From: Chris [mailto:[EMAIL PROTECTED] > Sent: maandag 14 augustus 2006 4:54 > To: Mark > Cc: mysql@lists.mysql.com > Subject: Re: Random SELECT on subset Hmm, this still does not do what I want: SELECT columnId FROM queue WHERE processed =

Re: Random SELECT on subset

2006-08-13 Thread Chris
Mark wrote: -Original Message- From: Chris [mailto:[EMAIL PROTECTED] Sent: maandag 14 augustus 2006 4:18 To: Mark Cc: mysql@lists.mysql.com Subject: Re: Random SELECT on subset Then I want to select 4 random columnIDs, but only from the subset WHERE processed = '1' (so

RE: Random SELECT on subset

2006-08-13 Thread Mark
> -Original Message- > From: Chris [mailto:[EMAIL PROTECTED] > Sent: maandag 14 augustus 2006 4:18 > To: Mark > Cc: mysql@lists.mysql.com > Subject: Re: Random SELECT on subset > > > Then I want to select 4 random columnIDs, but only from the > > subse

Re: Random SELECT on subset

2006-08-13 Thread Chris
Mark wrote: -Original Message- From: Chris [mailto:[EMAIL PROTECTED] Sent: maandag 14 augustus 2006 3:55 To: Mark Cc: mysql@lists.mysql.com Subject: Re: Random SELECT on subset In Perl, I'm trying to get 4 random entries from a subset "WHERE processed = '1'

RE: Random SELECT on subset

2006-08-13 Thread Mark
> -Original Message- > From: Chris [mailto:[EMAIL PROTECTED] > Sent: maandag 14 augustus 2006 3:55 > To: Mark > Cc: mysql@lists.mysql.com > Subject: Re: Random SELECT on subset > > > In Perl, I'm trying to get 4 random entries from a subset >

Re: Random SELECT on subset

2006-08-13 Thread Chris
Mark wrote: Dear MySQL-ers, Using MySQL 4.1.20, I'm trying to do a complex query on a subset; well, complex to me, that is. :) In Perl, I'm trying to get 4 random entries from a subset "WHERE processed = '1'" and "columnId" is unique. Like so: $sth = $dbh->prepare ("SELECT columnId FROM queue

Re: random sort?

2006-08-13 Thread Chris
Tanner Postert wrote: so if i have a list of records... id name other 1 water H2O 2 water aqua 3 water liquid so i want to select other where name = 'water' but i want to only return 1 result, and for that result to be a random value. is there a way to sort by rand() ? Yes. Funnily eno

Re: Random Hangs, Linux AMD 64, 5.0.22 AB Binaries

2006-07-25 Thread Matt Williams
On 7/13/06, Jim Winstead <[EMAIL PROTECTED]> wrote: Sounds like the well-known problem with Debian stable's glibc on x86_64: http://hashmysql.org/index.php?title=Opteron_HOWTO#pthread_rwlock_wrlock_hang_with_nptl Just for the record, this resolved it for us. We applied the patch mentioned to t

Re: Random Hangs, Linux AMD 64, 5.0.22 AB Binaries

2006-07-14 Thread Matt Williams
On 7/13/06, Jim Winstead <[EMAIL PROTECTED]> wrote: Sounds like the well-known problem with Debian stable's glibc on x86_64: http://hashmysql.org/index.php?title=Opteron_HOWTO#pthread_rwlock_wrlock_hang_with_nptl Any other ideas or suggestions? We've upgraded to libc 2.3.6 from etch, and we'r

Re: Random Hangs, Linux AMD 64, 5.0.22 AB Binaries

2006-07-13 Thread Jim Winstead
Sounds like the well-known problem with Debian stable's glibc on x86_64: http://hashmysql.org/index.php?title=Opteron_HOWTO#pthread_rwlock_wrlock_hang_with_nptl Jim Winstead MySQL Inc. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.

Re: Random 'select permission denied' since upgrade to 5.0.18

2006-04-03 Thread Mark Leith
Jorrit Kronjee wrote: On 3/29/2006 2:10 PM, Jorrit Kronjee wrote Mark, Apparently so, thanks for the hint! We'll try to upgrade as soon as possible. I'll supply the mailing list with the results of the upgrade. Mark, We've been testing it over the weekend and it seems that the bugs

Re: Random 'select permission denied' since upgrade to 5.0.18

2006-04-03 Thread Jorrit Kronjee
On 3/29/2006 2:10 PM, Jorrit Kronjee wrote: >> It seems you are running in to Bug #7209: >> >> http://bugs.mysql.com/bug.php?id=7209 >> >> This is fixed in 5.0.19 now. >> >> Best regards >> >> Mark >> > > Mark, > > Apparently so, thanks for the hint! We'll try to upgrade as soon as > possible. >

Re: Random 'select permission denied' since upgrade to 5.0.18

2006-03-29 Thread Jorrit Kronjee
Mark Leith wrote: Hi Jorrit, Jorrit Kronjee wrote: [EMAIL PROTECTED] wrote: is this relevant ? We've been looking at connection graphs, but MySQL doesn't seem to reach that limit. However, these are timely based measurements, so it could've peaked in between, although highly unlikely. I'

Re: Random 'select permission denied' since upgrade to 5.0.18

2006-03-29 Thread Mark Leith
Hi Jorrit, Jorrit Kronjee wrote: [EMAIL PROTECTED] wrote: is this relevant ? We've been looking at connection graphs, but MySQL doesn't seem to reach that limit. However, these are timely based measurements, so it could've peaked in between, although highly unlikely. I'm not very comforta

Re: Random 'select permission denied' since upgrade to 5.0.18

2006-03-29 Thread Jorrit Kronjee
[EMAIL PROTECTED] wrote: is this relevant ? We've been looking at connection graphs, but MySQL doesn't seem to reach that limit. However, these are timely based measurements, so it could've peaked in between, although highly unlikely. I'm not very comfortable tweaking these values in a prod

Re: Random 'select permission denied' since upgrade to 5.0.18

2006-03-28 Thread mysql
On Tue, 28 Mar 2006, Jorrit Kronjee wrote: > To: mysql@lists.mysql.com > From: Jorrit Kronjee <[EMAIL PROTECTED]> > Subject: Re: Random 'select permission denied' since upgrade to 5.0.18 > > [EMAIL PROTECTED] wrote: > > On Tue, 28 Mar 2006, Jorri

Re: Random 'select permission denied' since upgrade to 5.0.18

2006-03-28 Thread Jorrit Kronjee
is your access control by hostname or IPnumber? if hostname you could be having transient DNS issues - where the IPnumber on the client connect can't be resolved into the permitted hostname (fast enough). try using IPnumber in the access control and see if the problem goes away - if it does you'

Re: Random 'select permission denied' since upgrade to 5.0.18

2006-03-28 Thread Jorrit Kronjee
[EMAIL PROTECTED] wrote: On Tue, 28 Mar 2006, Jorrit Kronjee wrote: To: mysql@lists.mysql.com From: Jorrit Kronjee <[EMAIL PROTECTED]> Subject: Re: Random 'select permission denied' since upgrade to 5.0.18 snip Could this message appear when, for instance, a maximum amoun

Re: Random 'select permission denied' since upgrade to 5.0.18

2006-03-28 Thread mysql
On Tue, 28 Mar 2006, Jorrit Kronjee wrote: > To: mysql@lists.mysql.com > From: Jorrit Kronjee <[EMAIL PROTECTED]> > Subject: Re: Random 'select permission denied' since upgrade to 5.0.18 snip > Could this message appear when, for instance, a maximum amount of threads

Re: Random 'select permission denied' since upgrade to 5.0.18

2006-03-28 Thread Jorrit Kronjee
Keith, Thanks for answering me. Yes I did. Nothing in the MySQL log either. Keep in mind that these errors only sometimes show up and usually in the middle of a few queries in a row (while permissions are set for the whole table). Because the script runs fine most of the time, I don't think p

Re: Random ID's for existing data

2006-02-13 Thread SGreen
"Brian Menke" <[EMAIL PROTECTED]> wrote on 02/12/2006 09:20:32 PM: > I have a table with about 2000 entries with names and other data. Ultimately > I'm going to make a database backed web site with this and I want to provide > existing users with random id's that they will use for their password

Re: Random Truncate?

2005-11-01 Thread Paul DuBois
At 22:31 -0500 11/1/05, Ric Pennington wrote: Hello, MySQL Version Server version: 4.1.14-log I've been gettting "random" truncate commands as seen below: Once/day at a seemingly random time it happens. I have no code that issues a truncate command and I've changed and limited connections

Re: random "permission denied" issues

2005-10-29 Thread 156 Oud
Hi, I've got the exact same problem than Johannes with MySQL 4.1.14. Like him, i've set a little script [EMAIL PROTECTED]($host,$user$password); while ($i<5) { $x=mysql_query($query); if ( $x) { print "$i worked!"; } else { print "$i ERROR! ".mysql_error().""; } $i++; }

Re: random "permission denied" issues

2005-10-28 Thread sheeri kritzer
I'm not sure if this will help you, but it might: http://jeremy.zawodny.com/blog/archives/000173.html (brief excerpt) "So the moral of the story is this: If you have a busy server that's getting a lot of quick connections, set your thread cache high enough that the Threads_created value in SHOW S

Re: random "permission denied" issues

2005-10-28 Thread Johannes B. Ullrich
sheeri kritzer wrote: > What is max_connections set to (my.cnf?)? How many connections are > there at a time? (show processlist) That would result in a "too many > connections" error, but it's worth a shot. Max connections: 2000 typically 10-20 used (hardly ever >100). > What is the thread cache

Re: random "permission denied" issues

2005-10-28 Thread sheeri kritzer
What is max_connections set to (my.cnf?)? How many connections are there at a time? (show processlist) That would result in a "too many connections" error, but it's worth a shot. What is the thread cache set to? -Sheeri On 10/28/05, Johannes B. Ullrich <[EMAIL PROTECTED]> wrote: > > I am having

Re: random rows selection

2005-07-21 Thread Nuno Pereira
Michael Monashev wrote: > How to select 5 random rows from big table with WHERE clause? Maybe something like this: SELECT col1, col2 FROM table WHERE col3=123 AND (id_col=RAND() OR id_col=RAND() OR id_col=RAND() OR id_col=RAND() OR id_col=RAND()) the problem is that there is the (low) probabi

Re: random rows selection

2005-07-21 Thread Gleb Paharenko
Privet! > But this query can return empty results, if we use it with WHERE: Yes, it can. However, we're able to change the technique and obtain one random record with WHERE condition in query. With several iterations it is possible to get several random records. First we should get the

Re: random rows selection

2005-07-20 Thread Michael Monashev
Hello GP> Similar questions have been asked before. For example: GP> http://lists.mysql.com/mysql/184088 Thank you. I found something interesting: SELECT @rand_id:= CAST( 1 + MAX(id)*RAND() AS UNSIGNED) FROM history; SELECT * FROM history WHERE id >= @rand_id LIMIT 1; But this query can retur

Re: random rows selection

2005-07-20 Thread Chris Knipe
Put a index on col3 and it will be faster. That's the only way as far as I know. -- Chris. - Original Message - From: "Michael Monashev" <[EMAIL PROTECTED]> To: Sent: Wednesday, July 20, 2005 3:04 PM Subject: random rows selection Hello, How to select 5 random rows from big tabl

Re: random rows selection

2005-07-20 Thread Gleb Paharenko
Hello. Similar questions have been asked before. For example: http://lists.mysql.com/mysql/184088 Search in archives at: http://lists.mysql.com/mysql Michael Monashev <[EMAIL PROTECTED]> wrote: > Hello, > > How to select 5 random rows from big table with WHERE claus

Re: Random 1036 "Table XXX is read-only"

2005-02-11 Thread Gleb Paharenko
Hello. Can you reproduce a problem on the official binary? Sergey <[EMAIL PROTECTED]> wrote: > úÄÒÁ×ÓÔ×ÕÊÔÅ > > After upgrading mysql server from 4.1.3beta to 4.1.9 (FreeBSD 4.8, > mysql is installed from ports) I sometimes have the following problem: > when some perl client t

Re: Random Record Retrieval

2004-05-22 Thread Michael Stassen
mos wrote: At 05:08 PM 5/22/2004, you wrote: Robb Kerr wrote: Got a simple table that contains records which are made up of only three fields - ID, quote and author. These are "inspirational" quotes that I want to appear at the bottom of the pages of my website. I want them to come up randomly wi

Re: Random Record Retrieval

2004-05-22 Thread mos
At 05:08 PM 5/22/2004, you wrote: Robb Kerr wrote: Got a simple table that contains records which are made up of only three fields - ID, quote and author. These are "inspirational" quotes that I want to appear at the bottom of the pages of my website. I want them to come up randomly with every page

Re: Random Record Retrieval

2004-05-22 Thread Hassan Schroeder
Robb Kerr wrote: Got a simple table that contains records which are made up of only three fields - ID, quote and author. These are "inspirational" quotes that I want to appear at the bottom of the pages of my website. I want them to come up randomly with every page load. How do I randomly access re

Re: Random Table Locking in 3.23.58-7 ?

2004-03-13 Thread Sasha Pachev
[EMAIL PROTECTED] wrote: Here is the problem. I am getting random table locks in my databases on a new server running Fedora 0.96 and Mysql 3.23.58-7. It seems that different tables will "lock" -- what I mean by that is when I try to execute a query on them, mysql just freezes up -- it doesn't

Re: RANDOM in GROUP BY

2003-11-14 Thread Colleen Dick
A HUGE THANK YOU I had almost given up doing this in a query, it works! I knew there had to be something like this, just couldn't quite snag it most of my queries are pedestrian to say the least. It may be inefficient --and I see why it is-- but would it not be less so for the dbms to do th

Re: RANDOM in GROUP BY

2003-11-14 Thread Roger Baklund
* Colleen Dick > This stumped them in PHPbuilder... > > I have a table lets call it moms > each row in the moms table can have many kids, > and some "kids" have >1 "mom". I have a kid table > and I have a mxk map table to relate them. > > what I want to do is select all the moms and for each mom I

RE: random access denied

2003-09-19 Thread James M Kupernik
Does anyone think I would have better luck installing MySQL with something other than an RPM?? -Original Message- From: James M Kupernik [mailto:[EMAIL PROTECTED] Sent: Thursday, September 18, 2003 11:59 AM To: 'mos' Cc: [EMAIL PROTECTED] Subject: RE: random access denied

RE: random access denied

2003-09-18 Thread James M Kupernik
nd line to goes through. Jamie -Original Message- From: mos [mailto:[EMAIL PROTECTED] Sent: Thursday, September 18, 2003 11:37 AM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: RE: random access denied At 11:17 AM 9/18/2003, you wrote: >It's not a continued access deni

RE: random access denied

2003-09-18 Thread mos
tes_Per_Hour or Max_Queries_Per_Hour for the user. So he could be prohibited one hour, but next hour he regains access. Mike -Original Message- From: mos [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 17, 2003 5:20 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: RE: random

RE: random access denied

2003-09-18 Thread James M Kupernik
ROTECTED] Sent: Wednesday, September 17, 2003 5:20 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: RE: random access denied At 03:09 PM 9/17/2003, you wrote: >Anything that anyone can suggest that might point me in some direction >would be very helpful. I'm just at a complete lose

RE: random access denied

2003-09-17 Thread mos
At 03:09 PM 9/17/2003, you wrote: Anything that anyone can suggest that might point me in some direction would be very helpful. I'm just at a complete lose right now ... James, See the Google Group search: http://groups.google.ca/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&safe=off&q=mysql+%22Access+denied

RE: random access denied

2003-09-17 Thread James M Kupernik
Anything that anyone can suggest that might point me in some direction would be very helpful. I'm just at a complete lose right now ... -Original Message- From: James M Kupernik [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 16, 2003 3:58 PM To: [EMAIL PROTECTED] Subject: random acces

Re: random record

2003-09-15 Thread Michael Brunson
I just checked... 83 On Mon, 15 Sep 2003 13:54:53 +0100, "Andy Eastham" <[EMAIL PROTECTED]> wrote: | 39? | | > -Original Message- | > From: tuncay bas [mailto:[EMAIL PROTECTED] | > Sent: 15 September 2003 13:32 | > To: mysql | > Subject: random record | > | > | > hi, | > | > why its

Re: random data

2003-09-15 Thread Egor Egorov
"tuncay bas" <[EMAIL PROTECTED]> wrote: > > excuse me > > have can I get from mysql database random 6 data item? Take a look at the RAND() function: http://www.mysql.com/doc/en/Mathematical_functions.html -- For technical support contracts, goto https://order.mysql.com/?ref=ensita Th

Re: {Scanned} RE: random record

2003-09-15 Thread Henry Wong
pls unsubscribe me from this maillist. thanks. - Original Message - From: "Andy Eastham" <[EMAIL PROTECTED]> To: "Mysql List" <[EMAIL PROTECTED]> Sent: Monday, September 15, 2003 8:54 PM Subject: {Scanned} RE: random record > 39? > > > ---

RE: random record

2003-09-15 Thread Andy Eastham
39? > -Original Message- > From: tuncay bas [mailto:[EMAIL PROTECTED] > Sent: 15 September 2003 13:32 > To: mysql > Subject: random record > > > hi, > > why its mysql database over random record use? -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To uns

Re: Random Selects

2003-08-28 Thread Matt W
Hi Jay, There seemed to be a problem with the first use of RAND() on new connections (is this in a script?). It was supposed to be fixed in a recent version of MySQL (I think in 3.23.56 and 4.0.10). Anyway, the workaround I discovered to work is to just call RAND() at least once before using it in

Re: Random Errors in Replication Binlog

2003-08-14 Thread Mark T. Dame
On 08/11/03 09:03, Jason McCormick wrote: I was wondering if someone could shed some light on this problem I'm having. I have 3 slave MySQL servers replication from a master machine. The master machine is running only MySQL while the slave machines are an Apache + Tomcat + MySQL web service.

Re: Random Errors in Replication Binlog

2003-08-14 Thread Egor Egorov
"Mark T. Dame" <[EMAIL PROTECTED]> wrote: > On 08/11/03 09:03, Jason McCormick wrote: >> >> I was wondering if someone could shed some light on this problem I'm >> having. I have 3 slave MySQL servers replication from a master >> machine. The master machine is running only MySQL while the sl

Re: Random Errors in Replication Binlog

2003-08-14 Thread Jason McCormick
> Could you deascribe it more detailed? Which version of MySQL do you > use? If you're talking about my original question, the database is 4.0.13. -- Jason -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: random start to query

2003-05-30 Thread Becoming Digital
- Original Message - From: "Carter, Scott" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, 29 May, 2003 12:35 Subject: RE: random start to query I think I found another answer to my own question. FYI a good way to return resu

RE: random start to query

2003-05-30 Thread Terry Riley
Great!Didn't know you could do that. Cheers Terry --Original Message- > I think I found another answer to my own question. FYI a good way to > return > results in a random order > SELECT user FROM table ORDER BY RAND() > -- MySQL General Mailing List For list archives:

RE: random start to query

2003-05-30 Thread Carter, Scott
eem to have done on this occasion :-} > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Thursday, May 29, 2003 10:50 AM > To: [EMAIL PROTECTED] > Subject: Re: random start to query > > > Scott > > --Original Message

RE: random start to query

2003-05-30 Thread Terry Riley
one on this occasion :-} > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Thursday, May 29, 2003 10:50 AM > To: [EMAIL PROTECTED] > Subject: Re: random start to query > > > Scott > > --Original Message- > &

Re: random start to query

2003-05-30 Thread Terry Riley
Scott --Original Message- > I have a database table with say 100 rows. What I would like is to > preform > a query starting at a random place within the table, that will wrap > around > if I want it to. That is if the query starts returning results at the > 98th > row, then

RE: Random Selects

2003-03-08 Thread Paul DuBois
you'll see that RAND() initialization was modified to be more random for new connections. -Original Message- From: Paul DuBois [mailto:[EMAIL PROTECTED] Sent: Saturday, March 08, 2003 2:33 PM To: Darren Young; [EMAIL PROTECTED] Subject: Re: Random Selects At 12:33 -0600 3/8/03, Darren Young wro

RE: Random Selects

2003-03-08 Thread Darren Young
ng; [EMAIL PROTECTED] Subject: Re: Random Selects At 12:33 -0600 3/8/03, Darren Young wrote: >I have a table called testimonials: > >+--+-+--+-+-++ >| Field| Type

Re: Random Selects

2003-03-08 Thread Paul DuBois
At 12:33 -0600 3/8/03, Darren Young wrote: I have a table called testimonials: +--+-+--+-+-++ | Field| Type| Null | Key | Default | Extra | +--+-+--+-+-++ | id | tinyi

Re: Random 32bit number for columns?

2003-02-26 Thread Tore Bostrup
. - Original Message - From: "1LT John W. Holmes" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; "Scott Brown" <[EMAIL PROTECTED]> Sent: Wednesday, February 26, 2003 3:59 PM Subject: Re: Random 32bit number for columns? > > I am trying to find a

Re: Random 32bit number for columns?

2003-02-26 Thread 1LT John W. Holmes
> I am trying to find a means to create a column that self-populates with > unique random 32bit integers in MySQL. > > Do I need to do this in code, or is there a column spec/extra that I can > use to populate a column with random numbers on an insert? Ideally, the > database itself would manage th

RE: Random ID creation in MySQL /Linux

2003-01-19 Thread Daevid Vincent
What language are you using? In PHP use this: http://www.php.net/manual/en/function.session-id.php You could also experiment with mySQL's built in NOW or CURRENT_TIMESTAMP or UNIX_TIMESTAMP or ENCRYPT or MD5 or SHA or AES_ENCRYPT or RAND And some combination of those (hint hint) > -Original

Re: random select 1 record

2002-09-26 Thread mos
At 02:08 AM 9/20/2002, you wrote: >Hi all, > > >anyone knows a good method to retrieve 1 random selevted record out of >thouseands? > >right now I'm using > >select ID from table ORDER BY rand() LIMIT 1 > >however, this seems like a very slow method, like mysql first organizes a >few thousand reco

Re: random select 1 record

2002-09-20 Thread MySQL
Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm (http://www.ezmlm.org) From: "W. Enserink" <[EMAIL PROTECTED]> Date: Fri, 20 Sep 2002 09:08:53 +0200 anyone knows a good method to retrieve 1 random selevted record out of thouseands? right now I'm using select ID from

Re: random order by id

2002-05-19 Thread Erik Perrhoe \(Computer Consultant\)
ROTECTED]> To: "Jule" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Sunday, May 19, 2002 2:55 AM Subject: Re: random order by id > Jule <[EMAIL PROTECTED]> writes: > > > Hey guys, > > i have a db and a table with id and q

Re: random order by id

2002-05-19 Thread Per Andreas Buer
Jule <[EMAIL PROTECTED]> writes: > Hey guys, > i have a db and a table with id and questions > > now i want these questions to be listed in a random order, is there a way to > format my SQL query or do i need some PHP work to? SELECT foo FROM bar ORDER BY rand(); Just to pick one: SELECT foo

RE: Random Select Statement - help please

2002-01-09 Thread Rick Emery
n subsequent queries? If so when does this variable expire? When you close the connection? -Original Message- From: Roger Baklund [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 09, 2002 2:40 AM To: David V. Edelstein Subject: RE: Random Select Statement?? > Sorry Roger, >

RE: Random Select Statement - help please

2002-01-09 Thread Roger Baklund
* David V. Edelstein > I would like to create a mySQL query that will find the max > user_id, use this value to calculate a random value of the > user_id from [1 thru max], then return the entire row for > that person(user_id) filled in with that persons(row) four > entities, which I can use to po

RE: Random Select Statement??

2002-01-07 Thread Roger Baklund
* David V. Edelstein > I'm trying to create a select statement that will go into a table find the > number of rows in the table then select a single random row and > return it. I > am using Java/mySQL with the mm.mysql JDBC drivers. I've been > playing around > with the following statement but it

Re: Random

2001-12-09 Thread Jason Wong
On Sunday 09 December 2001 12:26, Paul DuBois wrote: > At 3:19 PM -0800 12/8/01, Rob@TH wrote: > >Hmm still nothing :/ > >Any other possibilities? > > The suggestion offered below is a workaround that seems logical given > the lack of ORDER BY RAND() prior to MySQL 3.23. Unfortunately, it > doesn

Re: Random

2001-12-08 Thread Paul DuBois
[EMAIL PROTECTED]> >To: "Rob@TH" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> >Sent: Saturday, December 08, 2001 8:45 AM >Subject: Re: Random > > >> Try >> >> ("select field 1, field2, field3, rand() as rnd >> where blah blah bla

Re: Random

2001-12-08 Thread Jason Wong
]> > Sent: Saturday, December 08, 2001 8:45 AM > Subject: Re: Random > > > Try > > > > ("select field 1, field2, field3, rand() as rnd > > where blah blah blah > > order by rnd limit 1") > > > > On Saturday 08 December 2001 10:35 a

Re: Random

2001-12-08 Thread Shankar Unni
Rob@TH wrote: > Hmm still nothing :/ > Any other possibilities? [ Selecting a random entry from a database ] Generally this is a hard problem. Ordering by rand() is really wasteful because the DB has to select *all* entries, order them, and then pick one. There are more efficient solutions a

Re: Random

2001-12-08 Thread [EMAIL PROTECTED]
Hmm still nothing :/ Any other possibilities? Rob - Original Message - From: "Kodrik" <[EMAIL PROTECTED]> To: "Rob@TH" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Saturday, December 08, 2001 8:45 AM Subject: Re: Random > Try > >

Re: Random

2001-12-08 Thread Kodrik
Try ("select field 1, field2, field3, rand() as rnd where blah blah blah order by rnd limit 1") On Saturday 08 December 2001 10:35 am, [EMAIL PROTECTED] wrote: > Hi, > > I am trying to pull up one random name in mysql 3.22.21 but not having much > luck. > Here is what I have done: > $select=$

RE: Random Selection

2001-07-06 Thread Don Read
On 06-Jul-01 Roger Ramirez wrote: > I have a database of 5.6 million records and I need to choose 5000 random > records. What would that query look like? > SELECT foo from bar ORDER BY RAND() LIMIT 5000 Regards, -- Don Read [EMAIL PROTECTED] -- It's alw

Re: Random Selection

2001-07-06 Thread Greg Donald
> I have a database of 5.6 million records and I need to choose 5000 random > records. What would that query look like? select * from records order by rand() limit 5000; destiney - (des-ti-ny) - n. 1. deity of all things "

Re: Random string for each row in a table

2001-04-23 Thread Thalis A. Kalfigopoulos
Not understanding excactly why you'd need a random string, I'd suggest doing a simple password() call on each row's recipient ALTER TABLE ADD COLUMN rand_string char(16) NOT NULL; UPDATE my_table SET rand_string=password(email); This gives you a 16 char long (I think) random string. Sending thi

Re: random select

2001-04-03 Thread Thalis A. Kalfigopoulos
On Tue, 3 Apr 2001, Marcos wrote: > hi, >i would like to show 5 random field from a total of 100. >id is my primary key > >id name > -- >abmarcos >akjohn > > > how can i show 5 of them randomly? > > thanks in advance, > > marcos Whe

RE: Random record

2001-02-26 Thread Alan Halls
You have to have version 3.23 of mysql and then you can add ORDER BY RAND() to the end of your query. Alan -Original Message- From: joe [mailto:[EMAIL PROTECTED]] Sent: Sunday, February 25, 2018 4:40 PM To: MySQL Subject: Random record Does anyone have any good ideas on how to pull a r

Re: Random record

2001-02-25 Thread ryc
Instead of pulling using equals, ie "select * from table where id = $php_random_variable" you can do this instead "select * from table where id <= $php_random_variable LIMIT 1"... As long is there is atleast one row in the table you will get back a result. Hope that helps. ryan - Original Me

RE: Random record

2001-02-25 Thread Cal Evans
Check the archives. The answer you seek is there. Cal http://www.calevans.com -Original Message- From: joe [mailto:[EMAIL PROTECTED]] Sent: Sunday, February 25, 2018 5:40 PM To: MySQL Subject: Random record Does anyone have any good ideas on how to pull a random record? I've been usi

RE: Random record from a table

2001-02-24 Thread Cal Evans
Check the archives, we had this discussion a few weeks ago and someone came up with a good solution. Cal http://www.calevans.com -Original Message- From: Sheni R. Meledath [mailto:[EMAIL PROTECTED]] Sent: Saturday, February 24, 2001 9:05 AM To: MySQL Masters Subject: Random record from