How to do a check to see if I update or insert

2004-01-26 Thread Mike Tuller
I am stuck on this problem, and know there has to be a solution. I have a shell script, where I want to check to see if a record exists, and if it does then update the record with new information. If it doesn't then insert the information gathered by a script. How, in MySql, using a shell s

Re: If Else statement

2004-01-26 Thread Egor Egorov
Mike Tuller <[EMAIL PROTECTED]> wrote: > I am trying write a shell script to check to see if a record exists and if > it does, update information, and if it doesn't insert information. Is there > a way to do an if else statement in MySql? > If you have PRIMARY KEY or UNIQU

If Else statement

2004-01-23 Thread Mike Tuller
I am trying write a shell script to check to see if a record exists and if it does, update information, and if it doesn't insert information. Is there a way to do an if else statement in MySql? I'm stuck on how to do this. I don't want to write it in perl. Mike -- MySQL Gener

Re: Question about IF statements...

2004-01-14 Thread Cory Hicks
OUP BY project_id HAVING total>0; > > > > Cory Hicks wrote: > > >Hello, > > > >I must be having a goober moment.I am running the following sql > >query with no problems: > > > >SELECT project_id, > >IF (SUM( time_worked ) > '0.00&#

Re: Question about IF statements...

2004-01-14 Thread Douglas Sims
er_id='clh' AND period_id='27' GROUP BY project_id HAVING total>0; Cory Hicks wrote: Hello, I must be having a goober moment.I am running the following sql query with no problems: SELECT project_id, IF (SUM( time_worked ) > '0.00', SUM( time_worked ),'NU

Re: Question about IF statements...

2004-01-14 Thread Douglas Sims
owing sql query with no problems: SELECT project_id, IF (SUM( time_worked ) > '0.00', SUM( time_worked ),'NULL') AS total FROM time_daily WHERE user_id = 'clh' AND period_id = '27' GROUP BY project_id However, having 'NULL' appear where the total i

RE: Question about IF statements...

2004-01-14 Thread Mike Johnson
From: Cory Hicks [mailto:[EMAIL PROTECTED] > Hello, > > I must be having a goober moment.I am running the following sql > query with no problems: > > SELECT project_id, > IF (SUM( time_worked ) > '0.00', SUM( time_worked ),'NULL') AS total &

Question about IF statements...

2004-01-14 Thread Cory Hicks
Hello, I must be having a goober moment.I am running the following sql query with no problems: SELECT project_id, IF (SUM( time_worked ) > '0.00', SUM( time_worked ),'NULL') AS total FROM time_daily WHERE user_id = 'clh' AND period_id = '27'

Re: How 'if not exists' implemented in MySQL?

2004-01-08 Thread robert_rowe
Stored procedures are MySQL are real new so I don't have much experience with them yet. The manual does seem to include some good info but I haven't delved too deeply. MaxDB is actually a separate DB. It is a re-brand of SAP DB. You might look for SAP DB info. It would probably apply to MaxDB.

Re: How 'if not exists' implemented in MySQL?

2004-01-08 Thread Bing Du
Thanks a bunch for your instance responce. Right now, I'm just testing the stored procedure feature of MySQL 5.0. If that works, we'll see next if the timetable for MySQL 5.0 go production can meet our own timetable. 'Select Into' was also what I figured. Just wanted

Re: How 'if not exists' implemented in MySQL?

2004-01-08 Thread robert_rowe
code. That said, the If Exists is used with Create and Drop statements. I don't think that you can use it to determine the rows returned by a select statement. There may be other techniques but this is what I'd do: Take your select query any convert it to a count(*) query and use Sele

How 'if not exists' implemented in MySQL?

2004-01-08 Thread Bing Du
Greetings, We're trying to migrate an application from MS SQL Sever 2000 to MySQL 5.0. Choosing version 5.0 of MySQL is because its support of stored procedure is needed. We have a stored procedure doing something as shown below on the MS SQL Server 2000: IF NOT EXISTS (SELECT stat

Re: How to find if the value returned is numeric

2004-01-07 Thread Nitin Mehta
I'm using it with PHP, but what I'm looking for is, the query syntax, not the language feature. Thanx anyway - Original Message - From: "robert_rowe" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, January 07, 2004 9:04 PM Subject: Re: How

Re: How to find if the value returned is numeric

2004-01-07 Thread robert_rowe
That depends on what language you are using to return the query results. Visual Basic is an IsNumeric function. I'm sure other languages have something similiar. What are you using? -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.my

How to find if the value returned is numeric

2004-01-07 Thread Nitin Mehta
Hi all, as the subject of the mail says, is there any function to apply in a query, that finds out if the value returned from the database is numeric? thanx for help in advance Nitin

RE: strange warning when using an IF statement

2003-12-15 Thread Jay Blanchard
[snip] I keep getting the following error when I try to run an "if" statement Warning: 2 is not a valid MySQL-Link resource in then give the filename Here is what I am trying to do. if ($bumpnumber<4) { print ("display this"); }else { print ("display that"); }

strange warning when using an IF statement

2003-12-12 Thread Hunter, Jess
I keep getting the following error when I try to run an "if" statement Warning: 2 is not a valid MySQL-Link resource in then give the filename Here is what I am trying to do. if ($bumpnumber<4) { print ("display this"); }else { print ("display that"); } mysql_clo

RE: if function?

2003-12-08 Thread Luc Foisy
UPDATE table SET d='complete' WHERE a=0 AND b=0 and c=0; -Original Message- From: Larry Brown [mailto:[EMAIL PROTECTED] Sent: Monday, December 08, 2003 3:58 PM To: MySQL List Subject: if function? Is there a way to write an if statement in mysql to affect the following?... if

if function?

2003-12-08 Thread Larry Brown
Is there a way to write an if statement in mysql to affect the following?... if field a=0,b=0,c=0 then update d='complete' where the table consists of... a int(1), b int(1), c int(1), d char(8) |a |b |c |d | |1 |0 |0 |null |

DATE / DATETIME in IF(): BUG???

2003-10-07 Thread Rudy Metzger
Dear all,   anyone knows why the following is going wrong (I expect 1 in the columns Total and Open)? I suppose it is because MySQL is internally casting the IF expression (which is DATE vs DATE or DATE vs DATETIME) internally into a STRING before comparison, but not sure about that   (String

Re: 'IF NOT EXISTS' ignored?

2003-09-29 Thread Hassan Schroeder
Director General: NEFACOMP wrote: To me, I think that is a bug and should be reported to MySQL. When the IF condition is false, it should break the rest of the statement. Exactly what I thought :-) and Antony Dovgal responded: For me this is not a bug, just poorly documented feature. So, Hassan

Re: Composit Key - Is it possible, and if so, what is the syntax?

2003-09-29 Thread Randy Chrismon
Try taking out the identifier name for the primary key (pk_foo). The way I read the documentation, MySQL does not support identifiers or names for primary keys although it does for other index types. HTH Randy -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsu

Re: 'IF NOT EXISTS' ignored?

2003-09-29 Thread Antony Dovgal
On Mon, 29 Sep 2003 16:02:23 +0200 "Director General: NEFACOMP" <[EMAIL PROTECTED]> wrote: > For me, I think he may use two statements: > 1. Create the table if it does not exist. > 2. Insert data if that will not create duplicates. Yep, IMHO this is the only solution.

Re: 'IF NOT EXISTS' ignored?

2003-09-29 Thread Director General: NEFACOMP
It is good that we both understand his problem. Do you have a solution for his problem? For me, I think he may use two statements: 1. Create the table if it does not exist. 2. Insert data if that will not create duplicates

Re: 'IF NOT EXISTS' ignored?

2003-09-29 Thread Antony Dovgal
On Mon, 29 Sep 2003 15:16:57 +0200 "Director General: NEFACOMP" <[EMAIL PROTECTED]> wrote: > Now, do you think I was right in my rephrasing? > To me, I think that is a bug and should be reported to MySQL. When the IF > condition is false, it should break the rest of the

Re: 'IF NOT EXISTS' ignored?

2003-09-29 Thread Director General: NEFACOMP
finds that the table *does* already exist. === Is there a problem with 'IF NOT EXISTS' in the following scenario? This statement creates the table as expected ... CREATE TEMPORARY TABLE IF NOT EXISTS showcase ( PRIMARY KEY (product)

Re: 'IF NOT EXISTS' ignored?

2003-09-29 Thread Antony Dovgal
On Mon, 29 Sep 2003 12:30:28 +0200 "Director General: NEFACOMP" <[EMAIL PROTECTED]> wrote: > It seems Victoria didn't understand the real problem: > > I think that query should be stopped as soon as the table exists. > But if it doesn't exist, the query sh

Re: 'IF NOT EXISTS' ignored?

2003-09-29 Thread Director General: NEFACOMP
It seems Victoria didn't understand the real problem: I think that query should be stopped as soon as the table exists. But if it doesn't exist, the query should create it and insert some records. The problem is: WHY is MySQL trying to insert records while the table exists? It should o

Re: 'IF NOT EXISTS' ignored?

2003-09-29 Thread Victoria Reznichenko
Hassan Schroeder <[EMAIL PROTECTED]> wrote: > Is there a problem with 'IF NOT EXISTS' in the following scenario? > > This statement creates the table as expected ... > > CREATE TEMPORARY TABLE IF NOT EXISTS >showcase ( >

Re: ** Composit Key - Is it possible, and if so, what is the syntax?

2003-09-29 Thread Jason k Larson
NTEGER NOT NULL, pri_3 INTEGER NOT NULL, test_data VARCHAR(120) NULL CONSTRAINT pk_foo PRIMARY KEY (pri_1, pri_2, pri_3) ) Type = InnoDB; In MySQL, this would return an error. I'd really appreciate knowing if its possible and (if so) what the syntax is. Regards, Adam -- MySQL General M

** Composit Key - Is it possible, and if so, what is the syntax?

2003-09-28 Thread Fortuno, Adam
pri_3 INTEGER NOT NULL, test_data VARCHAR(120) NULL CONSTRAINT pk_foo PRIMARY KEY (pri_1, pri_2, pri_3) ) Type = InnoDB; In MySQL, this would return an error. I'd really appreciate knowing if its possible and (if so) what the syntax is. Regards, Adam -- MySQL General Mailing List For

'IF NOT EXISTS' ignored?

2003-09-27 Thread Hassan Schroeder
Is there a problem with 'IF NOT EXISTS' in the following scenario? This statement creates the table as expected ... CREATE TEMPORARY TABLE IF NOT EXISTS showcase ( PRIMARY KEY (product) ) SELECT product FROM productList .. but re-running it

Re: Does replication continue if master reboots?

2003-09-23 Thread Victoria Reznichenko
S?ren Neigaard <[EMAIL PROTECTED]> wrote: > What happends if the master reboots, does the slave start replicating again > after the reboot? If master goes down, slave will try to reconnect every master-connect-retry seconds: http://www.mysql.com/doc/en/Replication_Options.ht

Does replication continue if master reboots?

2003-09-23 Thread Søren Neigaard
What happends if the master reboots, does the slave start replicating again after the reboot? Med venlig hilsen/Best regards Søren Neigaard System Architect Mobilethink A/S Arosgaarden Åboulevarden 23, 4.sal DK - 8000 Århus C Telefon: +45 86207800 Direct: +45

Re: Is there a way to find out if a table exists?

2003-09-19 Thread Paul DuBois
BLE STATUS LIKE 'name of table here' and see if you get any row back. -- Paul DuBois, Senior Technical Writer Madison, Wisconsin, USA MySQL AB, www.mysql.com Are you MySQL certified? http://www.mysql.com/certification/ -- MySQL General Mailing List For list archives: http://

Re: Is there a way to find out if a table exists?

2003-09-19 Thread Don Read
$res = @mysql_query("SELECT 1 FROM $tbl"); > return ($res ? true : false); > } > Err ... make that $res = @mysql_query("SELECT 1 FROM $tbl LIMIT 1"); -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if

Re: Is there a way to find out if a table exists?

2003-09-19 Thread Don Read
e); } Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. (53kr33t w0rdz: sql table query) -- MySQL Gener

RE: Is there a way to find out if a table exists?

2003-09-19 Thread Jennifer Goodie
> Is there some way to do something like: > > SELECT * FROM tables WHERE name = "table_name"; > > And get a result I could test for truth, and thus run my script? Show tables like 'table_name'; -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:htt

Re: Is there a way to find out if a table exists?

2003-09-19 Thread Roger Baklund
* Dan Anderson > I am trying to make my PHP script autodetect when a table in a mySQL > database exists, and when it doesn't, create it. > > Is there some way to do something like: > > SELECT * FROM tables WHERE name = "table_name"; > > And get a result I could test for truth, and thus run my scrip

Is there a way to find out if a table exists?

2003-09-19 Thread Dan Anderson
I am trying to make my PHP script autodetect when a table in a mySQL database exists, and when it doesn't, create it. Is there some way to do something like: SELECT * FROM tables WHERE name = "table_name"; And get a result I could test for truth, and thus run my script? Thanks in advance, Da

AW: IF, THEN ELSE statement

2003-09-10 Thread Franz, Fa. PostDirekt MA
Hi Rob, i think to use REPLACE would do, if there is a unique index on myid: REPACE mytable (myid, myname) VALUES (myid, mynewname); The Manual say in chapter 6.4.8: REPLACE works exactly like INSERT, except that if an old record in the table has the same value as a new record on a UNIQUE index

Re: IF, THEN ELSE statement

2003-09-10 Thread Alec . Cawley
See the REPLACE command: http://www.mysql.com/doc/en/REPLACE.html --- I am trying to update/insert a record into the table depending on whether it exists in the table or not. Something along the lines of... IF (SELECT

IF, THEN ELSE statement

2003-09-10 Thread Rob Anderson
I am trying to update/insert a record into the table depending on whether it exists in the table or not. Something along the lines of... IF (SELECT id FROM myable WHERE id="myid") INSERT INTO mytable(id,name) VALUES ("myid", "myname") ELSE UPDA

If the mysql crash,how can I trace the log

2003-08-27 Thread MaFai
Hello, mysql, Yesterday,mysql process disappear sliently. After I check the err-log,no clues found. But the PID file still exising.I think the mysql terminate by some reason.But I still not found why. The error-log mysqld.log wouldn't provide any valueable msg.It j

Re: query: if exists UPDATE else INSERT?

2003-07-14 Thread Sergei Golubchik
Hi! On Jul 13, Alexander Newald wrote: > Hello, > > I have a table with id (char(8)) and value (int(8)) > > To make my problem clear: > > There is no set with id = "20030713" > insert into table values ("20030713","10"); > > The next set is ("20030713","20") but as a set with 20030713 is > alr

Re: query: if exists UPDATE else INSERT?

2003-07-13 Thread Paul Chvostek
On Sun, Jul 13, 2003 at 09:52:10AM -0400, Paul Chvostek wrote: ... > $q = "UPDATE table SET value=value+$value WHERE id='$id';"; > $q .= "INSERT INTO table (id,value) VALUES ('$id',$value)"; > @mysql_query($q); Woop, I forgot this was the mysql list, not a php- list. ;-) The basic thing

Re: query: if exists UPDATE else INSERT?

2003-07-13 Thread Paul Chvostek
On Sun, Jul 13, 2003 at 11:50:40AM +0200, Alexander Newald wrote: > > I'm looking for a solution to write a sql query that inserts a set of data if the > data id is not present and otherwise update the set. We covered some of this in a thread named "Bulk loading data"

Re: query: if exists UPDATE else INSERT?

2003-07-13 Thread Veysel Harun Sahin
Try this: set @w = 0; select @w := value from table where id = "20030713"; delete from table where id = "20030713"; insert into table values ("20030713", @w + 20); [EMAIL PROTECTED] wrote: Hello, I'm looking for a solution to write a sql query that inse

query: if exists UPDATE else INSERT?

2003-07-13 Thread Alexander Newald
Hello, I'm looking for a solution to write a sql query that inserts a set of data if the data id is not present and otherwise update the set. I have a table with id (char(8)) and value (int(8)) To make my problem clear: There is no set with id = "20030713" insert into table va

Can't start mysql if installed outside the 'compile time' directory

2003-03-28 Thread jfontayne
The reason is that if 'basedir' is read from 'my.cfg' then 'bindir' is not set to $basedir/bin but to /compile-time-dir/bin >How-To-Repeat: 1) Install mysql in a directory other than the one for which it was compiled. 2) Config

Check if mysql is already installed

2003-03-27 Thread vrunda divekar
hello, Is there any registry entry of mysql which would help me to check if mysql is already installed or not.I am installing my application with an installer,along with which i also want to install mysql,so i first want to check if it is already installed or not?I want to make this work

Sensible solution if binary logs get too large?

2003-03-07 Thread Manuel Kiessling
Hello, maybe someone who set up a mysql replication cluster can help me here. The problem is that the binary logs of the master server in my cluster are constantly growing, now I want to plan for the day when my disks get full. The binary logs get rotated, so I ask myself wether I can riskless

re: Create table with IF condition not working properly

2003-03-03 Thread Victoria Reznichenko
hen using > the create command with the select command, apparently the IF statement > result (0/1) is being placed into the field instead of the word. > > My Mysql version is: mysql Ver 12.12 Distrib 4.0.3-beta, for pc-linux-gnu > (i686) > > clientid description > --

RE: Very basic If statement problem

2003-03-01 Thread Don Read
en category works fine. I have two fields in > my database called "applique" and "puffyfoam" both are set up as tinyint(1) > because all I'm storing there is a zero for no and a 1 for yes. > > But for the screen output I don't want these codes to show, I'

Create table with IF condition not working properly

2003-02-28 Thread Scott
I have a client word database and I am attempting to create a database with the results from a select that splits the description field based on the spaces. When just executing the select command, the output is correct. When using the create command with the select command, apparently the IF

RE: Very basic If statement still not working VERIFIED VARIABLES

2003-02-28 Thread Roger Davis
In your If statement (if this is still true) you are using... > if(($applique == 1) && ($puffyfoam == 0)) etc. But in your list you are using > {$row['applique']} Applique > {$row['puffyfoam']} P

Very basic If statement still not working VERIFIED VARIABLES

2003-02-28 Thread Stitchin'
se! -Original Message- From: Roger Davis [mailto:[EMAIL PROTECTED] Sent: Friday, February 28, 2003 12:50 PM To: [EMAIL PROTECTED] Subject: RE: Very basic If statement still not working Why don't you verify what the values are in the variables. If the Variables are not

RE: Very basic If statement still not working ????

2003-02-28 Thread Roger Davis
Why don't you verify what the values are in the variables. If the Variables are not getting set then you would always see the "oops" in your statement. Try... echo $applique; echo $puffyfoam; Hope this helps Roger -Original Message- From: Stitchin' [mailto:[EMAIL PRO

Very basic If statement still not working ????

2003-02-28 Thread Stitchin'
e program wasn't recognizing that they were numbers and it still didn't work -Original Message- The PHP logical AND operator is &&. Try if(($applique == 1) && ($puffyfoam == 0)) etc. HTH, Tore. - Original Message - > &

RE: Very basic If statement problem

2003-02-28 Thread Stitchin'
t;applique" and "puffyfoam" both are set up as tinyint(1) because all I'm storing there is a zero for no and a 1 for yes. But for the screen output I don't want these codes to show, I'd like a comment to show up. So I set up this "if" statement to place t

Re: JDBC Driver Bug, does not appear to support auto commit off-selectionsnot detected in while loop if new insertions

2003-02-28 Thread Mark Matthews
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Emma Wansbrough wrote: My code works fine with autcommit on..however it does not support autocommit off. This is quite a big bug, or I have missed something out. Please let me know as I it would be of great interest to me if I was mistaken or correct

JDBC Driver Bug, does not appear to support auto commit off-selections not detected in while loop if new insertions

2003-02-28 Thread Emma Wansbrough
My code works fine with autcommit on..however it does not support autocommit off. This is quite a big bug, or I have missed something out. Please let me know as I it would be of great interest to me if I was mistaken or correct and you will consider fixing it. If I switch off auto commit and

RE: I'm not sure if this is HTML question or PHP...

2003-02-27 Thread Stitchin'
Thank you ... I'm usually pretty good at researching stuff (comes from my prior life as a CPA trying to find IRS tax regulations) but when you don't know the right terminology, all the searching in the world won't turn up a spider if you're using amphibian instead

Re: I'm not sure if this is HTML question or PHP...

2003-02-27 Thread Tore Bostrup
tchin'" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, February 27, 2003 11:48 AM Subject: I'm not sure if this is HTML question or PHP... > I've had great success with my first PHP/mySql project. It's a catalog to > showcase my embroidery des

I'm not sure if this is HTML question or PHP...

2003-02-27 Thread Stitchin'
use of the pictures that come up with each line item of design detail ...I'm concerned that when the member searches for the designs, if it brings up too many on one screen that the users will be able to take a nap while the screen loads. Is there a way for me to tell the web page to only load,

Re: what is the best way to check if primary key exists?

2003-02-20 Thread Roger Baklund
* Jianping Zhu > I need to insert recond to mysql use servlets, > > insert into mytable values('key', 'f1'); > > i need to chech if key is already in mytable. why? > what is a good efficient way to do that? The most obvious answer, do a lookup to che

Re: what is the best way to check if primary key exists?

2003-02-20 Thread 1LT John W. Holmes
> I need to insert recond to mysql use servlets, > > insert into mytable values('key', 'f1'); > > i need to chech if key is already in mytable. > > what is a good efficient way to do that? Insert the value and see if a "DUPLICATE KEY"

what is the best way to check if primary key exists?

2003-02-20 Thread Jianping Zhu
I need to insert recond to mysql use servlets, insert into mytable values('key', 'f1'); i need to chech if key is already in mytable. what is a good efficient way to do that? Thanks - Before posting, p

mysql 3.23.55 broken if compiled with -all-static

2003-02-17 Thread Carlos
0x8096cf6 _Z17add_field_to_listPc16enum_field_typesS_S_jP4ItemS_P10st_typelib + 310 0x8099310 _Z7yyparsev + 3376 0x8091f48 _Z16handle_bootstrapPv + 648 If compiled with dynamic libraries, it works fine. Some info: >uname -a Linux atlas 2.4.20 #1 Sat Feb 1 10:39:59 CET 2003 i586 unknown glibc wit

error if I post a record

2003-02-11 Thread Thomas Berg
Hello everybody, I have a problem with MySQL and an application made with Delphi. If I try to save a modified record in a table, I get the following error: "Record can not be locked because the record is already in use." I don't know if that is the exact translation. The original

Re: group multiple queries.. if one fails all fail

2003-01-23 Thread Steve Edberg
AM 1/23/03 , Ciprian I. Acatrinei wrote: Hi, I looked a lot and I couldn't find a solution to this problem: Ex: I have 5 queries. I run them and one of them fails. The rest are ok. So 4 tables are affected and one is not. Is there a way of testing the queries if they will be successful and o

group multiple queries.. if one fails all fail

2003-01-23 Thread Ciprian I. Acatrinei
Hi, I looked a lot and I couldn't find a solution to this problem: Ex: I have 5 queries. I run them and one of them fails. The rest are ok. So 4 tables are affected and one is not. Is there a way of testing the queries if they will be successful and only if all of them are then they shou

group multiple queries.. if one fails all fail

2003-01-23 Thread Ciprian I. Acatrinei
Hi, I looked a lot and I couldn't find a solution to this problem: Ex: I have 5 queries. I run them and one of them fails. The rest are ok. So 4 tables are affected and one is not. Is there a way of testing the queries if they will be successful and only if all of them are then they shou

RE: myODBC, if left alone, can lock up an Access table

2003-01-14 Thread David Brodbeck
> -Original Message- > From: Steve Quezadas [mailto:[EMAIL PROTECTED]] > I notice that sometimes when I establish a connection with > myODBC with > Microsoft Access, and send it occasional sql statements it > works fine at > first. But if you let it sit for

myODBC, if left alone, can lock up an Access table

2003-01-14 Thread Steve Quezadas
I notice that sometimes when I establish a connection with myODBC with Microsoft Access, and send it occasional sql statements it works fine at first. But if you let it sit for, say, 30 minutes and comes back, the Access table locks up. I am not sure if this is a problem with myODBC (which I

Re: Help - select syntax if else

2003-01-08 Thread Keith C. Ivey
On 8 Jan 2003, at 15:27, Svens Klave wrote: > | image | check | > | 6782 | 0 | > | 2732 | 1 | > | 6734 | 1 | > > so I want to make query > select * from foo1 where [so is it possible to make some if check=1 then > image is image but if chec

Re: Help - select syntax if else

2003-01-08 Thread Zak Greant
| 2732 | 1 | > | 6734 | 1 | > > so I want to make query > select * from foo1 where [so is it possible to make some if check=1 then > image is image but if check=0 then into image goes other content for > example "noimage"] > > > I mean I need

Re: Help - select syntax if else

2003-01-08 Thread Roger Baklund
gt; > so I want to make query > select * from foo1 where [so is it possible to make some if check=1 then > image is image but if check=0 then into image goes other content for > example "noimage"] > > > I mean I need to check if there is 0 or 1 and so if check is 1

Re: Help - select syntax if else

2003-01-08 Thread Brent Baisley
You don't even need the "check" field you can just directly check the contents of the image field. Although I'm not sure if you are trying to set a filter or display something different. If you want to display a conditional on a field then you need to specify that field di

Help - select syntax if else

2003-01-08 Thread Svens Klave
Can anybody help me with select query how to do this: I have table "foo1" with two fields "image" "check" | image | check | | 6782 | 0 | | 2732 | 1 | | 6734 | 1 | so I want to make query select * from foo1 where [so is it possible to ma

RE: How can we tell if we're maxing out MySQL/InnoDB capacity?

2003-01-02 Thread Steven Roussey
main server will be getting a multichannel 10 disk SCSI 15K rpm striped RAID array.) But the real question is: are you CPU or disk bound? If it doesn't point really heavily at either, then it is both. :( -s - Be

Re: How can we tell if we're maxing out MySQL/InnoDB capacity?

2003-01-02 Thread Michael Bacarella
> > However, I can't figure out exactly why it was slow. Key efficiency > > was at 100%, and I *believe* the InnoDB buffer pool was large enough > > as the InnoDB monitor was reporting 1000 / 1000 cache hits. > > > > iostat showed the usual levels of disk I/O. > > > > What other statistics can I

Re: How can we tell if we're maxing out MySQL/InnoDB capacity?

2003-01-02 Thread Jeremy Zawodny
. Did you happen to get a snapshot of vmstat output or even iostat during that time? What's your ratio of read queries to write queries? Are you InnoDB or MyISAM tables more active? Are you using InnoDB transactions or running in auto-commit mode? One thing you can do is split things up

RE: How can we tell if we're maxing out MySQL/InnoDB capacity?

2003-01-02 Thread Steven Roussey
main server will be getting a multichannel 10 disk SCSI 15K rpm striped RAID array.) But the real question is: are you CPU or disk bound? If it doesn't point really heavily at either, then it is both. :( -s - Be

How can we tell if we're maxing out MySQL/InnoDB capacity?

2003-01-02 Thread Michael Bacarella
Hi, Yesterday happened to be one of the busiest days for us ever on our MySQL backed web site. For the entire day MySQL was hit with up to 1200 queries/second, and many queries were being delayed at least 2-15 seconds. We were serving about 300% of our normal load. In my opinion MySQL scaled mo

Re: Is the Max edition of 4.0.7 required if running on a server with RAID?

2003-01-01 Thread Simon Grabowski
> Is the Max edition of 4.0.7 necessary for a server with RAID. > Or can the standara edition be used? By 'a server with RAID' you likely mean a server with a hardware RAID array. In that case you can use any distribution. This is totally independent of MySQL. Your only concern is to make your ope

Is the Max edition of 4.0.7 required if running on a server with RAID?

2002-12-31 Thread Rick Faircloth
27;m still looking for a .zip binary install of 4.0.7-Max gamma version, if there's one available. The standard edition has a .zip binary install for Windows, but so far I haven't found one for the Max edition. Anyone know if there is one out

Re: What, if anything, is wrong with UNIX Epoch time stamps?

2002-12-23 Thread Bruce MacDonald
"Michael T. Babcock" <[EMAIL PROTECTED]> wrote, > But MySQL doesn't guarantee correctness in time values in the first > place. You can still insert "2002-02-31" as a date if you like If you store a date in the database as a unix_timestamp in an unsigned int

RE: What, if anything, is wrong with UNIX Epoch time stamps? [Was: R E: TimeStamp in MySQL reqd NULL]

2002-12-23 Thread Dana Diederich
:-) Cheers. -Dana > -Original Message- > From: Jim Sander [SMTP:[EMAIL PROTECTED]] > Sent: Monday, December 23, 2002 12:58 PM > Cc: [EMAIL PROTECTED] > Subject: Re: What, if anything, is wrong with UNIX Epoch time stamps? > [Was: R E: TimeStamp in MySQL reqd NULL] >

Re: What, if anything, is wrong with UNIX Epoch time stamps? [Was:R E: TimeStamp in MySQL reqd NULL]

2002-12-23 Thread Michael T. Babcock
Csongor Fagyal wrote: I personally prefer TAI64 time (sub-second precision; see http://cr.yp.to/libtai/tai64.html). For a comparison of how this differs from UNIX time, see http://cr.yp.to/proto/utctai.html at the same site. I'm surprised SQL hasn't been updated to support new time formats

Re: What, if anything, is wrong with UNIX Epoch time stamps? [Was:R E: TimeStamp in MySQL reqd NULL]

2002-12-23 Thread Csongor Fagyal
I personally prefer TAI64 time (sub-second precision; see http://cr.yp.to/libtai/tai64.html). For a comparison of how this differs from UNIX time, see http://cr.yp.to/proto/utctai.html at the same site. I'm surprised SQL hasn't been updated to support new time formats yet, but oh well. Well,

Re: What, if anything, is wrong with UNIX Epoch time stamps? [Was:R E: TimeStamp in MySQL reqd NULL]

2002-12-23 Thread Jim Sander
> Can anyone share and/or comment about the use of Epoch time, > especially the hazards? Using timestamps you can synch all your times with the server via 'now()' and the like. If you use the epoch time on the client side you might have problems. What those problems are, I cou

RE: What, if anything, is wrong with UNIX Epoch time stamps? [Was: R E: TimeStamp in MySQL reqd NULL]

2002-12-23 Thread David Brodbeck
... just > > think about leap years. How do you handle that? And there are some > > more "artifacts" in the Gregorian calendar, too... > > > But MySQL doesn't guarantee correctness in time values in the first > place. You can still insert "20

RE: What, if anything, is wrong with UNIX Epoch time stamps? [Was: R E: TimeStamp in MySQL reqd NULL]

2002-12-23 Thread Dana Diederich
: Michael T. Babcock [SMTP:[EMAIL PROTECTED]] > Sent: Monday, December 23, 2002 10:55 AM > To: Dana Diederich > Cc: 'Keith C. Ivey'; [EMAIL PROTECTED]; Akash > Subject: Re: What, if anything, is wrong with UNIX Epoch time stamps? > [Was: R E: TimeStamp in

RE: What, if anything, is wrong with UNIX Epoch time stamps? [Was: RE: TimeStamp in MySQL reqd NULL]

2002-12-23 Thread Dana Diederich
Date/Time is such a tricky thing. I think that's we migrated toward the simplest solution in the first place. For days/weeks/months, I think the math cited below works pretty well. That is, if we're not talking about calendar months. As soon as we need to query based on calendar

Re: What, if anything, is wrong with UNIX Epoch time stamps? [Was:R E: TimeStamp in MySQL reqd NULL]

2002-12-23 Thread Michael T. Babcock
But MySQL doesn't guarantee correctness in time values in the first place. You can still insert "2002-02-31" as a date if you like: mysql> create table temp (date datetime); Query OK, 0 rows affected mysql> insert into temp(date) values ("20

Re: What, if anything, is wrong with UNIX Epoch time stamps? [Was:R E: TimeStamp in MySQL reqd NULL]

2002-12-23 Thread Michael T. Babcock
Dana Diederich wrote: Can anyone share and/or comment about the use of Epoch time, especially the hazards? I'm asking because I want to make sure that I haven't built a comfortable little box that un-necessarily excludes some useful functions. I use Epoch time myself, except where I use TIME

Re: What, if anything, is wrong with UNIX Epoch time stamps? [Was:R E: TimeStamp in MySQL reqd NULL]

2002-12-23 Thread Csongor Fagyal
stamps. They come in handy especially when you need to do many queries with time-based where clauses: indexes help you a lot and IMHO are very fast on integer columns, while they tend to be inefficient on datetime (&friends) columns [just think about ...WHERE TO_DAYS(when)-6 < TO_DAYS(NOW(

What, if anything, is wrong with UNIX Epoch time stamps? [Was: RE: TimeStamp in MySQL reqd NULL]

2002-12-23 Thread Dana Diederich
]] > Sent: Monday, December 23, 2002 9:16 AM > To: [EMAIL PROTECTED] > Cc: Akash > Subject: Re: TimeStamp in MySQL reqd NULL > > On 23 Dec 2002, at 16:11, Akash wrote: > > > According to MySQL implementation, if I give the default value of the >

re: crash if etc/hosts misconfigured

2002-12-22 Thread Egor Egorov
On Friday 20 December 2002 11:01, azerbinati at libero dot it wrote: > I'd a /etc/hosts misconfigured, it told that the machine name was linux200 > with IP 192.168.0.3 but eth0 was configured to use IP 192.168.0.16. In this > enviroment executing this command "mysql -h 192.168.0.16" cause a

<    2   3   4   5   6   7   8   9   10   >