Row before and after?

2008-11-12 Thread Waynn Lue
I'm trying to find the first row before and the first row after a specific row. Essentially I want to do these two queries, and get each row. SELECT * FROM Users WHERE UserId = userId ORDER BY UserId DESC LIMIT 1; SELECT * FROM Users WHERE UserId = userId ORDER BY UserId LIMIT 1; Is there any

Re: About innodb's max_rows attribute.

2008-11-12 Thread Moon's Father
I'm sorry to mistake the wrong storage engine. On Wed, Nov 12, 2008 at 3:52 PM, Moon's Father [EMAIL PROTECTED]wrote: Hi. I got an error when I use alter statement to modify an innodb's table structure. The error no is 1114 and the detail information is ERROR 1114 (HY000): The table

Re: Row before and after?

2008-11-12 Thread Waynn Lue
Whoops, just realized I made a mistake in the examples. What I'm really looking for is these two queries: SELECT * FROM Users WHERE UserId *userid*; SELECT * FROM Users WHERE UserId *userid*; Waynn On Wed, Nov 12, 2008 at 12:14 AM, Waynn Lue [EMAIL PROTECTED] wrote: I'm trying to find the

Re: Row before and after?

2008-11-12 Thread Micah Stevens
Select the UserId one less, and then ORDER ASC LIMIT 3. Assuming your UserId's are sequential, it's easy, given userID X SELECT * FROM Users WHERE UserId = X-1 ORDER BY UserId ASC LIMIT 3; If they're not sequential due to deletions, etc, it becomes a bigger problem. You could do a subquery, but

Re: Row before and after?

2008-11-12 Thread Peter Brawley
Micah, I'm trying to find the first row before and the first row after a specific row Here's one way: drop table if exists t; create table t(userid int, data int); insert into t values(1,10),(3,20),(6,30),(8,50),(10,60), (13,80); -- retrieve rows just before and just after userid=8: select

Single query possible?

2008-11-12 Thread Frank Rust
Hi there, I'm just trying to solve a little problem: There are two tables (simplified): CREATE TABLE article (ID int, Title varchar, ...other_data ); CREATE TABLE author (ID int,name varchar,article_ID int,...other_data ); Now I have a lot of articles. They have one or more autors, e.g. INSERT

Re: Row before and after?

2008-11-12 Thread Dan Nelson
In the last episode (Nov 12), Waynn Lue said: I'm trying to find the first row before and the first row after a specific row. Essentially I want to do these two queries, and get each row. SELECT * FROM Users WHERE UserId = userId ORDER BY UserId DESC LIMIT 1; SELECT * FROM Users WHERE

Server Setup Question

2008-11-12 Thread Shain Miley
Hello all, I was wondering if anyone had any good insight into running the 32 bit and 64 bit versions of MySQL? We are going to be using a replication setup within my organization very shortly. We intend to a have at least one master (writable) DB and several (let's say 3 for this

Re: Server Setup Question

2008-11-12 Thread Shain Miley
Thanks a lot for all the infolooks like we will put the 64 bit plan into place. Does anyone know of any good links to information on tuning Linux before a MySQL install? I see that there are lot of MySQL tuning guides...but I assume there are things I can do to Linux that will help with

Re: Server Setup Question

2008-11-12 Thread Olaf Stein
I have no links but the best way of tuning linux is to only install what you actually need. Standard installer like to install all kinds of deamons and other programms you might not need on db server ... On 11/12/08 2:20 PM, Shain Miley [EMAIL PROTECTED] wrote: Thanks a lot for all the

SqlYog question

2008-11-12 Thread steve grosz
I'm trying to get used to visually mapping out my db design using the SqlYog SchemaDesigner. Once I have the PK/FK setup, how can I export that design to SQL code to create the tables, etc?? -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:

Re: Server Setup Question

2008-11-12 Thread Simon J Mudd
[EMAIL PROTECTED] (Shain Miley) writes: Hello all, I was wondering if anyone had any good insight into running the 32 bit and 64 bit versions of MySQL? We are going to be using a replication setup within my organization very shortly. We intend to a have at least one master (writable) DB

RE: Row before and after?

2008-11-12 Thread Jerry Schwartz
-Original Message- From: Waynn Lue [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 12, 2008 3:14 AM To: MySQL List Subject: Row before and after? I'm trying to find the first row before and the first row after a specific row. Essentially I want to do these two queries, and get each

Re: Server Setup Question

2008-11-12 Thread Daniel P. Brown
On Wed, Nov 12, 2008 at 12:35 PM, Shain Miley [EMAIL PROTECTED] wrote: Hello all, I was wondering if anyone had any good insight into running the 32 bit and 64 bit versions of MySQL? We are going to be using a replication setup within my organization very shortly. We intend to a have at

com_* status variables seem to reset in mysql 5

2008-11-12 Thread Jim Lyons
I have been trying to compute query cache utilization in mysql 5 but cannot because the com_select status variable is always 1 when I start a new mysql session. This probably holds for all the com_* variables and maybe others, but I've only been working with com_select. They're supposed to be

Incorrect value for default-time-zone

2008-11-12 Thread Moon's Father
Hi. I got an error message when I adjust the system variable named default-time-zone.I don't how to adjust this variable. Hope to get help here.Thanks. Here is my error log. 081113 15:24:43 InnoDB: Started; log sequence number 0 423199200 081113 15:24:43 [Note] Recovering after a crash using