bugs report

2002-09-07 Thread Ole Andersen


I got this and I think You must have it. 


You seem to have found a bug in the SQL parser.
Please submit a bug report with the data chunk below:
--BEGIN CUT--
JElkOiBzcWxwYXJzZXIubGliLnBocCx2IDEuMTUgMjAwMi8wNy8yNiAxODozMDo1OSBsZW05IEV4
cCAkPGJyIC8+CldoeSBkaWQgd2UgZ2V0IGhlcmU/IDQ2OSA0NzAgODE3PGJyIC8+CkxlZnRvdmVy
OiD4PGJyIC8+CkE6IDQ2OSA0NzA8YnIgLz4KU1FMOiBDUkVBVEUgVEFCTEUga2F0YWxvZyAoIElE
IGludCgxMCkgdW5zaWduZWQgTk9UIE5VTEwgYXV0b19pbmNyZW1lbnQsIG5yIGZsb2F0IGRlZmF1
bHQgTlVMTCwgc29ydCB2YXJjaGFyKDI1NSkgZGVmYXVsdCBOVUxMLCBkZWNpbWFsa2wgdmFyY2hh
cigyNTUpIGRlZmF1bHQgJyZuYnNwOycsIEZlbHQ0IHZhcmNoYXIoMjU1KSBkZWZhdWx0ICcmbmJz
cDsnLCB0aXRlbCB2YXJjaGFyKDI1NSkgZGVmYXVsdCAnJm5ic3A7JywgYnRpdGVsIHZhcmNoYXIo
MjU1KSBkZWZhdWx0ICcmbmJzcDsnLCBiZXN0bnIgdmFyY2hhcigyNTUpIGRlZmF1bHQgJyZuYnNw
OycsIGZvcmxhZyB2YXJjaGFyKDI1NSkgZGVmYXVsdCAnJm5ic3A7JywgY29weWRhbiB2YXJjaGFy
KDI1NSkgZGVmYXVsdCAnJm5ic3A7JywgYmVza3IgdmFyY2hhcigyNTUpIGRlZmF1bHQgJyZuYnNw
OycsIGxpeCB2YXJjaGFyKDI1NSkgZGVmYXVsdCAnJm5ic3A7JywgdGlsYmVo+HIgdmFyY2hhcigy
NTUpIGRlZmF1bHQgJyZuYnNwOycsIEZlbHQxMyB2YXJjaGFyKDI1NSkgZGVmYXVsdCAnJm5ic3A7
JywgaXNibiB2YXJjaGFyKDI1NSkgZGVmYXVsdCAnJm5ic3A7Jywgc3Byb2cgdmFyY2hhcigyNTUp
IGRlZmF1bHQgJyZuYnNwOycsIHNwcm9nYmVzayB2YXJjaGFyKDI1NSkgZGVmYXVsdCAnJm5ic3A7
JywgbeVsZ3JwX01NIHZhcmNoYXIoMjU1KSBkZWZhdWx0ICcmbmJzcDsnLCBpbmRob2xkIGxvbmd0
ZXh0LCBt5WxncnAgdmFyY2hhcigyNTUpIGRlZmF1bHQgJyZuYnNwOycsIGxpbmtlZGUgdmFyY2hh
cigyNTUpIGRlZmF1bHQgTlVMTCwgUFJJTUFSWSBLRVkgKElEKSApIFRZUEU9TXlJU0FN
---END CUT---



-- 
Med venlig hilsen Ole Andersen
Amtscentret for Undervisning - Aalborg


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Help with WHERE string searching

2002-09-07 Thread David Lloyd


H,

  Suppose I have a field named title that contains
  one
  of these
  I am a Man
  I am a Woman
  We are Men
  We are Women

Why not split this into two fields:

pronoun enum('I','WE')
gender enum('MAN','WOMAN')

OR a SET

title SET(I,WE,MAN,MEN,WOMAN,WOMEN)

...and then get your application to parse the various sentences and
store the data correctly.

(mysql,query)

DSL
-- 
Con te partiro, su navi per mari
 Che io lo so, no, no non esistono piu
Con te io li vivro.
 (Sartori F, Quarantotto E)

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Need to cleanly uninstall

2002-09-07 Thread spiros

I  tried to upgrade from 4.01 to 4.03 -apparently I did something wrong and 
now got a bad server. Anyone can givew advice on how to cleanly unistall 
now(e.g. rm /usr/bin/mysql*)?

 linux:/home/db/TMPOUT # rpm -e   MySQL-4.0.3-0.i386.rpm
error: package MySQL-4.0.3-0.i386.rpm is not installed
linux:/home/db/TMPOUT # rpm -i   MySQL-4.0.3-0.i386.rpm
package MySQL-4.0.3-0 is already installed
linux:/home/db/TMPOUT # rpm -e   MySQL-4.0.3-0.i386.rpm
error: package MySQL-4.0.3-0.i386.rpm is not installed
linux:/home/db/TMPOUT #


Thanks, S.Alexiou

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Fail to run version 4.0.3

2002-09-07 Thread Heikki Tuuri

Hi!

- Original Message -
From: TH Leung [EMAIL PROTECTED]
Newsgroups: mailing.database.mysql
Sent: Saturday, September 07, 2002 6:44 AM
Subject: FW: Fail to run version 4.0.3


  Hi,
 
  I am using 4.0.2 with Innodb in Windows 98 platform, and I have
downloaded
  4.0.3 and install it without uninstalling 4.0.2. However, when I start
the
  winmysqladmin.exe, it takes several minutes without any response, then a
  general failure error dialog box appears. I could not even kick away
this
  box. So, would anyone give me a hint of the problem. Thank you very
much.

Try starting mysqld.exe from an MS-DOS prompt:

C:\mysql\bin mysqld --console

What does it print?

Use mysql.exe and mysqladmin.exe from an MS-DOS prompt to query and
administer the server. These have better diagnostics than graphical tools.

Best regards,

Heikki Tuuri
Innobase Oy
---
Order technical MySQL/InnoDB support at https://order.mysql.com/
See http://www.innodb.com for the online manual and latest news on InnoDB

sql query





-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Need to cleanly uninstall

2002-09-07 Thread David Lloyd


You could do something like:

  linux:/home/db/TMPOUT # rpm -e   MySQL-4.0.3-0.i386.rpm
 error: package MySQL-4.0.3-0.i386.rpm is not installed

Don't add the RPM on the end.

Also, what does:

* rpm -qa | grep MySQL

...show. It will be in there. Use that name.

mysql,query

DSL
-- 
Con te partiro, su navi per mari
 Che io lo so, no, no non esistono piu
Con te io li vivro.
 (Sartori F, Quarantotto E)

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Help with WHERE string searching

2002-09-07 Thread Steve Edberg

I'd try using MySQL's regular expression functions:


Select  where title regexp '[[::]]m[ae]n[[::]]'

or if you are generating this query programmatically, it might be 
simpler to do something like

Select

where
title regexp '[[::]]man[[::]]' or
title regexp '[[::]]men[[::]]'

The [[::]]... [[::]] patterns match word boundaries, including 
beginning- and end of lines. See

http://www.mysql.com/doc/en/Regexp.html

for more info.

You might also want to consider a fulltext index on the title:

http://www.mysql.com/doc/en/Fulltext_Search.html

-steve



At 7:38 PM -0700 9/6/02, Rob Gambit wrote:
Hello MySQL mailing list.

I am having trouble creating a SQL statement for
searching.

Suppose I have a field named title that contains one
of these
I am a Man
I am a Woman
We are Men
We are Women

Now I am trying to search that field using keywords,
for example, I want to return any that contain the
word man or men but not woman or women

WHERE (title LIKE 'man') OR (title LIKE 'men')

but that doesn't return anything. I tried

WHERE (title LIKE '%man%') or (title like '%men%')

but that returns everything. I tried using the _
instead of % but the word may or may not be at the end
or beginning of the line.

Can someone point me in the right direction (or tell
me how to do it)

Thanks.  Sorry for the newbie question.

Robert


-- 
++
| Steve Edberg  [EMAIL PROTECTED] |
| University of California, Davis  (530)754-9127 |
| Programming/Database/SysAdmin   http://pgfsun.ucdavis.edu/ |
++
| The end to politics as usual:  |
| The Monster Raving Loony Party (http://www.omrlp.com/) |
++

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Separate dbs on separate partitions?

2002-09-07 Thread hudson kingery

I would like to make use of multiple physical drives.
Is there a way to have one mysqld but have databases on separate partitions?

OS is linux.

Thanks
Hudson


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Innodb error on windows ME platform

2002-09-07 Thread Matt Hargraves

My guess on your problem is that you're running a database in WinME.  It is
the worst, buggiest product out from a company that is famous for their
buggy OSs.  Microsoft doesn't even support it worth a damn anymore, I'd
suggest going and getting a real OS.  Nothing against you, many people don't
actually know what a steaming pile of crap WinME is.

Matt

- Original Message -
From: Heikki Tuuri [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, September 07, 2002 2:03 PM
Subject: Re: Innodb error on windows ME platform


 Neil,

 - Original Message -
 From: Neil Malkani [EMAIL PROTECTED]
 Newsgroups: mailing.database.mysql
 Sent: Saturday, September 07, 2002 7:46 PM
 Subject: Innodb error on windows ME platform


  Hi,
 
  I have just installed and setup MySQL unfortunately I do not seem to be
 able
  to resolve this issue concerning the Innodb functionality in MySQL. Any
 help
  would be much appreciated.

 the assertion means that InnoDB cannot create an event semaphore. I have
not
 seen this assertion fail before. Maybe Windows has run out of some
 resources?

 Is there a Task Manager in Windows ME with which you could look how much
 resources (handles, memory, etc.) are currently used? Do you have free
disk
 space?

 I will add better diagnostics to 3.23.53.

 Below is the source code. CreateEvent returns a NULL value, and the
 assertion ut_a(event) fails.

 /*
 Creates an event semaphore, i.e., a semaphore which may
 just have two states: signaled and nonsignaled.
 The created event is manual reset: it must be reset
 explicitly by calling sync_os_reset_event. */

 os_event_t
 os_event_create(
 /**/
 /* out: the event handle */
 char*   name)   /* in: the name of the event, if NULL
 the event is created without a name */
 {
 #ifdef __WIN__
 HANDLE  event;

 event = CreateEvent(NULL,   /* No security attributes */
 TRUE,   /* Manual reset */
 FALSE,  /* Initial state nonsignaled */
 name);
 ut_a(event);

 return(event);

  Thanks,
 
  Neil Malkani


 Best regards,

 Heikki Tuuri
 Innobase Oy
 ---
 InnoDB - transactions, row level locking, and foreign key support for
MySQL
 See http://www.innodb.com, download MySQL-Max from http://www.mysql.com






  020907 17:24:29  InnoDB: Assertion failure in thread 4294335835 in file
  E:\build-3.23.52\innobase\os\os0sync.c line 52
  InnoDB: We intentionally generate a memory trap.
  InnoDB: Send a detailed bug report to [EMAIL PROTECTED]
  020907 17:24:29  C:\MYSQL\BIN\MYSQLD~2.EXE: Got signal 11. Aborting!
 
  020907 17:24:29  Aborting
 
  020907 17:24:29  InnoDB: Warning: shutting down a not properly started
   InnoDB: or created database!
  020907 17:24:29  C:\MYSQL\BIN\MYSQLD~2.EXE: Shutdown Complete
 
 
 
  _
  MSN Photos is the easiest way to share and print your photos:
  http://photos.msn.com/support/worldwide.aspx
 
 
  -
  Before posting, please check:
 http://www.mysql.com/manual.php   (the manual)
 http://lists.mysql.com/   (the list archive)
 
  To request this thread, e-mail [EMAIL PROTECTED]
  To unsubscribe, e-mail
 [EMAIL PROTECTED]
  Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
 



 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)

 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail
[EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Simple MySQL client in C ... Help please.

2002-09-07 Thread Jean-Marc Godart

Hello everyone,


First of all, I am new to this list, so please let me introduce myself
quickly : I am Jean-Marc and I work in research in a university in Belgium.

I would like to make a very simple and basic C program that would just list
the data I have in a field of a table. Even though I can already make such a
program in PHP, I have no idea where to start in C : I don't know what
includes and libraries I should use. Can anyone help me ? I am no
programming specialist (I am business engineer !!!) and that would help me
much if I could find an example of a very simple C program (just a few
lines) that accesses a MySQL database.

By advance, thank you !

Best regards from Belgium,


Jean-Marc



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Separate dbs on separate partitions?

2002-09-07 Thread hudson kingery

I would like to make use of multiple physical drives.
Is there a way to have one mysqld but have databases on separate partitions?

OS is linux.

Thanks
Hudson 


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Separate dbs on separate partitions?

2002-09-07 Thread Paul DuBois

At 16:58 -0400 9/7/02, hudson kingery wrote:
I would like to make use of multiple physical drives.
Is there a way to have one mysqld but have databases on separate partitions?

Shut down the server.
Copy the database directory to the other drive
Make a symlink to the moved directory in the server's data directory
Restart the server

Doesn't work for InnoDB tables, which are managed in the InnoDB tablespace.


OS is linux.

Thanks
Hudson


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




The Rest of a JOIN

2002-09-07 Thread Toni Hermoso

Hello group!

I'm using MySQL 3.23.47 and I got this question.

I have got two tables which share a same field - somewhat one is a foreign key of 
another.
Values of the field in one table are a subset of values of the same field of the other.

Ex
TABLE A
ID   Name Information   
1
.
.
.
100

TABLE B
ID  Relationships
1
.
.
.
10

For extracting NAME and INFORMATION from TABLE B ID entries, I perform a simple JOIN:

SELECT TableA.* from TableA, TableB where TableA.ID = TableB.ID

But if I do want to extract NAME and INFORMATION from TABLE A ID entries not common 
with TABLE B ID (11..100), I got no easy alternative...

I could make a first select on TABLE B and then many selects to all entries which are 
not included in retrieved TABLE ID.
I think that it is equivalent to a SUBSELECT in other DBMS (in MySQL 4.x is available, 
isn't it?)

So, is there any simple alternative without having to make 'such many queries (or 
looping thru' my interface prog language)' as implied in first possibility, or  is 
there no other option than moving to MySQL 4?

Thanks!
-- 
Toni Hermoso Pulido
--
web: http://www.arrakis.es/~toniher
email: [EMAIL PROTECTED]
   [EMAIL PROTECTED]

pgp_public_key: 
http://www.arrakis.es/~toniher/toniher.pgp
    
    *** Cífratelo, cífraselo ***
--

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: MIT-Pthreads

2002-09-07 Thread Tod Harter

On Friday 06 September 2002 05:39 pm, Ilyas Keser wrote:
 What I also not understand is that one can also compile Mysql with
 MIT-Pthreads. What is a MIT-Pthread? Where can I read more about this?

 Thanks

 ilyas

'PThreads' is short for POSIX Threads, which is the Posix API specification 
for multi-threading. Threading can be implemented in a wide variety of ways, 
and an implementation of the PThreads API was done at MIT, thus 'MIT 
PThreads'. 

Since any PThreads implementation in theory implements the same API they 
SHOULD be interchangeable. In theory... In practice no such thing is even 
close to true because of various factors, but MySQL does claim to link and 
run against several threads libraries.

My guess would be that you are almost always better off using whatever the 
default threading is for your platform. It would require a deep knowledge of 
the implementation to have any idea what linking against some other thread 
library will do. At the very best you might get better performance or avoid 
some bugs, at worst you get a broken or flakey and/or inefficient binary. 
Leave it to experts! 


 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)

 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail
 [EMAIL PROTECTED] Trouble
 unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




adding function, module to database

2002-09-07 Thread Mehdi Roomi

  Hi,
suppose there is a database with lots of tables.
I want to add a function to this database to return the following SQL query:

SELECT SUM(IF(HOUR(start)'02:00:00' AND
HOUR(stop)='08:00:00',50*sessiontime,0)+IF(HOUR(start)'08:00:00' AND
HOUR(stop)='14:00:00',100*sessiontime,0)+IF(HOUR(start)'14:00:00' AND
HOUR(stop)='02:00:00',150*sessiontime,0)) from YOUR_TABLE WHERE
username='mehdi' AND start BETWEEN '2002-08-12' AND '2002-08-16';

is it possible to define some thing like functions (or something like MS-SQL 
Server's Store Procedure) in mysql to do such a work ?
if yes, please let me have a sample and let me know how to call such a 
fuction after creating it.
p.s. a sample table that the above query defined for it is like:
++-+--+---+
|username|start|stop  |sessiontime|
++-+--+---+
|mehdi   | 2002-08-12 00:22:20 | 2002-08-12 00:24:20  |120|
++-+--+---+
|mehdi   | 2002-08-13 01:10:20 | 2002-08-13 01:40:20  |1800   |
++-+--+---+
|mehdi   | 2002-08-14 08:30:20 | 2002-08-14 09:30:20  |3600   |
++-+--+---+
|mehdi   | 2002-08-15 15:22:20 | 2002-08-15 17:22:20  |7200   |
++-+--+---+


Best Regards,
M. Roomi



_
Send and receive Hotmail on your mobile device: http://mobile.msn.com


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Select all with an excpetion

2002-09-07 Thread David Dillon

Hello,

   I am sorry if this is a painfully easy question, but I have been 
looking everywhere, and I cannot find out how to do what I need. My 
query is simply have: select * from table build_stats where stat_date 
like blah blah
My only problem is that I dont want the field stat_date to show up in 
the results. Is there any such thing like and except clause or something 
along those lines. Even if someone could point me in the direction of a 
good resource where I might be able to find it, that would be much 
appreciated. Thank you very much for your time.

   -Dave-


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Master MySQL server rdist db to public MySQL servers

2002-09-07 Thread Jeremy Zawodny

On Fri, Sep 06, 2002 at 04:25:42PM -0400, Mark Hennessy wrote:

 Is there any way to just force the MySQL server to reload from the
 table data on disk?  The recipient servers are read-only, and the
 sending server has a relatively infrequent rate of change, but just
 enough that it's important to make sure that things are flushed on
 the recipient servers every time there's an update.

FLUSH TABLES WITH READ LOCK may do what you need.

Jeremy
-- 
Jeremy D. Zawodny |  Perl, Web, MySQL, Linux Magazine, Yahoo!
[EMAIL PROTECTED]  |  http://jeremy.zawodny.com/

MySQL 3.23.51: up 32 days, processed 657,485,780 queries (234/sec. avg)

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: how do I add 2weeks to a datetime?

2002-09-07 Thread Gurhan Ozen

Are you even reading the manual before posting questions?
http://www.mysql.com/doc/en/Date_and_time_functions.html

SELECT NOW() + INTERVAL 14 DAY AS exp_date;

Gurhan

On Fri, 2002-09-06 at 21:40, Clemson Chan wrote:
 hi guys,
 
 I have a column expire_date DATETIME.
 How do I add 2 weeks to now() and put it in the database?
 
 MySQL update table_name set expire_date = now()+1209600 where id = 1;
 
 I know now()+30 is now plus 30 seconds.
 2 weeks = 60x60x24x14 = 1209600 seconds.
 
 But when do the above command, the value become -00-00 00:00:00.
 And get 1 warning in the warning count. No warning displayed.
 
 Someone, please help. Thanks.
 
 --Clemson
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail [EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
 




-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: binary or source

2002-09-07 Thread Stephen

Ilyas try this site, Marc has great instructions on setting everything up
and all the downloads you need...
http://www.entropy.ch/software/macosx/mysql/



-- 
* Stephen Rosenberg
* http://www.lifug.org
* [EMAIL PROTECTED]
* [EMAIL PROTECTED]




On 9/6/02 5:36 PM, Ilyas Keser [EMAIL PROTECTED] wrote:

 At www.mysql.com I can download the source or the binary for macosx.
 My question is what is the difference between the source and the
 binary? I haven't found a description of the installation with the
 binary or with the sourcecode.
 
 Thanks for any help...
 
 ilyas
 
 -
 Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)
 
 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail [EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
 
 


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Master MySQL server rdist db to public MySQL servers

2002-09-07 Thread Jeremy Zawodny

On Fri, Sep 06, 2002 at 04:29:24PM -0400, Mark Hennessy wrote:

 I don't want to use replication as IIRC it would require that the
 sending MySQL server be listening externally.

Why not setup an SSH tunnel, since you're planning to use SSH anyway.
Then you can use MySQL's native replication.

Jeremy
-- 
Jeremy D. Zawodny |  Perl, Web, MySQL, Linux Magazine, Yahoo!
[EMAIL PROTECTED]  |  http://jeremy.zawodny.com/

MySQL 3.23.51: up 32 days, processed 657,492,130 queries (234/sec. avg)

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




NEWBIE: normalization question/help/lost :)

2002-09-07 Thread Thoenen, Peter Mr. EPS

Hello,

After a year of doing database programming, try to actually normalize.  Read
a couple online tutorials (phpbuilder, devshed) and the book mysql 2nd
edition and it just can't seem to stick.  Understanding the concept/theory
but freeze up every time I try to implement.  Trying to go from 0NF--3NF
(though I can't even really get to 1NF :) ... not worried about 4NF or 5NF.

Currently I have the following 0NF table
--  ID 
ID  |   ColA|   ColB|   ColC|
1   |   A   |   A.A |   A.A.A   |   
2   |   A   |   A.A |   A.A.B   |
3   |   A   |   A.B |   A.B.A   |
4   |   A   |   A.B |   A.B.B   |
5   |   A   |   A.A |   A.A.B   |
6   |   B   |   B.A |   B.A.A   |
{ . repeat , values in ColA|ColB|ColC are dependent on each other
but arbitrary in assignment .. could pick 1 X | X.M | X.M.X followed by 2 |
X | X.M | X.M.X if you really want .. only thing unique is ID}

Where:
ID(unique)-ColA (one-one)
ColA--ColB (one-Many)
ColB--ColC(one-Many)

(basically ColB is a subset of values dependent on the value chosen for ColA
and Colc is a subset of values dependent on the value chosen for ColB, ID
the only unique value)

Now as this goes on and on repeating, will start to see plenty of redundancy
in ColA, ColB, ColC (tickets get assigned the same values to ColA, ColB,
ColC) and I am lost as where to go from here to be honest.



**

The following is my WRONG attempt to normalize :)

For the information allow to be chosen for ColA, ColB, ColC I have
additional tables defined

-- ColA --
VALUE
A
B
C
D
...

then a table is created for EACH value in ColA 

A- (repeat this for B, C, D, )
VALUE
A.A
A.B
A.C
A.D
...

and then additional I create a table for EACH value in TABLE A, B, C,
...

---A.A- (repeat for all All A.A, A.B... to include B.A, B.B...,
arb_value.sub_value..
VALUE
A.A.A
A.A.B
A.A.C

Form based and not pretty :)

basically:

SELECT value FROM ColA

List values
Choose ColA_value

SELECT value FROM $ColA_value   #var holding table name for subset of A

List ColA_value
Choose ColA_value_sub

SELECT value FROM $ColA_value_sub   #var holding table name from subset
of A.A

List ColA_value_sub
Choose ColA_value_sub_sub

INSERT INTO id(ColA, ColB, ColC) VALUES (ColA_value, ColA_value_sub,
ColA_value_sub_sub)

This only works since I have about 20 tables  I am pretty sure this is
wrong ... might as well use flat text files if I am going to do it this way.


*


Anybody want to help walk me through this or point to any GOOD FULL EXAMPLES
of normalizing a database.

Cheers,

-Peter

##
Peter Thoenen - Systems Programmer
Commercial Communications
Camp Bondsteel, Kosovo
##

Stumbled Upon...heh (Score:5, Funny) /.
by $carab on 23:00 23 August 2002 (#4131637)

ForensicTec officials said they stumbled upon the military networks about
two months ago, while checking on network security for a private-sector
client.

Someone new to a Dvorak probably tried to type in lynx
http://www.google.com; but instead got nmap -v -p 1-1024 -sS -P0 army.mil
-T paranoid.

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail mysql-unsubscribe-##L=##[EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: adding function, module to database

2002-09-07 Thread Gelu Gogancea

Hi,
From my experience with MySQL, i think you can create a function(UDF - you
can look in documentation at 9.2.2 Adding a New User-definable
Function.Also you can find samples in MySQL source distribution) to avoid
this conditional filtering and not to create/generate this SQL query.
In this moment(ver 4.x) if you wish to create Store Procedures and make it
to run with several tables , it's not so easy.
Anyway,you can use this method of filtering and with several tables and the
performance are very good.

Regards,

Gelu
_
G.NET SOFTWARE COMPANY

Permanent e-mail address : [EMAIL PROTECTED]
  [EMAIL PROTECTED]
- Original Message -
From: Mehdi Roomi [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Saturday, September 07, 2002 7:15 PM
Subject: adding function, module to database


   Hi,
 suppose there is a database with lots of tables.
 I want to add a function to this database to return the following SQL
query:

 SELECT SUM(IF(HOUR(start)'02:00:00' AND
 HOUR(stop)='08:00:00',50*sessiontime,0)+IF(HOUR(start)'08:00:00' AND
 HOUR(stop)='14:00:00',100*sessiontime,0)+IF(HOUR(start)'14:00:00' AND
 HOUR(stop)='02:00:00',150*sessiontime,0)) from YOUR_TABLE WHERE
 username='mehdi' AND start BETWEEN '2002-08-12' AND '2002-08-16';

 is it possible to define some thing like functions (or something like
MS-SQL
 Server's Store Procedure) in mysql to do such a work ?
 if yes, please let me have a sample and let me know how to call such a
 fuction after creating it.
 p.s. a sample table that the above query defined for it is like:
 ++-+--+---+
 |username|start|stop  |sessiontime|
 ++-+--+---+
 |mehdi   | 2002-08-12 00:22:20 | 2002-08-12 00:24:20  |120|
 ++-+--+---+
 |mehdi   | 2002-08-13 01:10:20 | 2002-08-13 01:40:20  |1800   |
 ++-+--+---+
 |mehdi   | 2002-08-14 08:30:20 | 2002-08-14 09:30:20  |3600   |
 ++-+--+---+
 |mehdi   | 2002-08-15 15:22:20 | 2002-08-15 17:22:20  |7200   |
 ++-+--+---+


 Best Regards,
 M. Roomi



 _
 Send and receive Hotmail on your mobile device: http://mobile.msn.com




-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: need help on a SQL query: need LEFT JOIN?

2002-09-07 Thread Luís Fernando

You wrote:

 I apologize for asking such a basic SQL question, but I am failing in
finding
 the solution...
 Consider the following table:

 id | option
 ---
 1  | a
 2  | a
 2  | b

 I want to find the ids with only a specific set of options.
 For example, if I wanted to get the ids which have option a only, the
query
 should give me 1 as a result, not 1 and 2.

 I suspect I need to use a LEFT JOIN on the same table, but I have failed
 miserably so far...

 Many thanks in advance to the SQL experts ;-).

 Jean-Luc (http://jfontain.free.fr/moodss/)


There are no need to use the left join in this query. The best way to do
what you wanna is within the following query:

SELECT id FROM table GROUP BY id HAVING COUNT(option) = 1;

You can change the count value to take the ids that have
specified number of options.

Luís Fernando


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: newbie help

2002-09-07 Thread Tod Harter

On Friday 06 September 2002 05:50 pm, Marcelo Simon wrote:

Well, I'm not 100% certain since I don't know what environment you're working 
in, but a typical example from perl might be something like

my $query = INSERT INTO foo 
VALUES(.$cgi-param('myintfield').,'.$cgi-param('mydatefield').');

Now if the integer field is empty then the result of 
$cgi-param('myintfield') is going to be an empty string and the result is 

INSERT INTO foo VALUES(,'whatever was in datefield')

which is NOT legal SQL... 

You would need to check your input parameter and it is an empty string 
replace that with the string 'NULL' (if you want a null there). As for the 
date field, once again an empty quoted string will not insert properly into a 
database.

NOW having said all of this, DO NOT EVER INSERT FORM FIELD VALUES DIRECTLY 
INTO A DATABASE THIS WAY WITHOUT FIRST PREPROCESSING THEM. You are creating a 
GIANT security hole in your system if you do!

If you're using PHP, basically the exact same comments etc apply.

One simple way to fix your problem in perl at least, is to use placeholders 
and bind params. Its much safer and much easier.



 Hi,

 First time here, hope someone can understand me and help me.

 I have a field wich type that is int(4), and I'm updating it from a form.
 it is working ok, unless the formfield is empty. When it's empty I'm
 receiving an SQL error number 51().

 In the db the field is setup to receive empty values.
 In the query the field is not surranded by ' ' ( since it's a number ).

 does anyone can explain to me what is happening ? how can I leave that
 field empty on the form.

 Also the same thing is happening with a date field. ! anyclues ?

 TIA
 Marcelo Simon


 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)

 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail
 [EMAIL PROTECTED] Trouble
 unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Innodb error on windows ME platform

2002-09-07 Thread Heikki Tuuri

Neil,

- Original Message -
From: Neil Malkani [EMAIL PROTECTED]
Newsgroups: mailing.database.mysql
Sent: Saturday, September 07, 2002 7:46 PM
Subject: Innodb error on windows ME platform


 Hi,

 I have just installed and setup MySQL unfortunately I do not seem to be
able
 to resolve this issue concerning the Innodb functionality in MySQL. Any
help
 would be much appreciated.

the assertion means that InnoDB cannot create an event semaphore. I have not
seen this assertion fail before. Maybe Windows has run out of some
resources?

Is there a Task Manager in Windows ME with which you could look how much
resources (handles, memory, etc.) are currently used? Do you have free disk
space?

I will add better diagnostics to 3.23.53.

Below is the source code. CreateEvent returns a NULL value, and the
assertion ut_a(event) fails.

/*
Creates an event semaphore, i.e., a semaphore which may
just have two states: signaled and nonsignaled.
The created event is manual reset: it must be reset
explicitly by calling sync_os_reset_event. */

os_event_t
os_event_create(
/**/
/* out: the event handle */
char*   name)   /* in: the name of the event, if NULL
the event is created without a name */
{
#ifdef __WIN__
HANDLE  event;

event = CreateEvent(NULL,   /* No security attributes */
TRUE,   /* Manual reset */
FALSE,  /* Initial state nonsignaled */
name);
ut_a(event);

return(event);

 Thanks,

 Neil Malkani


Best regards,

Heikki Tuuri
Innobase Oy
---
InnoDB - transactions, row level locking, and foreign key support for MySQL
See http://www.innodb.com, download MySQL-Max from http://www.mysql.com






 020907 17:24:29  InnoDB: Assertion failure in thread 4294335835 in file
 E:\build-3.23.52\innobase\os\os0sync.c line 52
 InnoDB: We intentionally generate a memory trap.
 InnoDB: Send a detailed bug report to [EMAIL PROTECTED]
 020907 17:24:29  C:\MYSQL\BIN\MYSQLD~2.EXE: Got signal 11. Aborting!

 020907 17:24:29  Aborting

 020907 17:24:29  InnoDB: Warning: shutting down a not properly started
  InnoDB: or created database!
 020907 17:24:29  C:\MYSQL\BIN\MYSQLD~2.EXE: Shutdown Complete



 _
 MSN Photos is the easiest way to share and print your photos:
 http://photos.msn.com/support/worldwide.aspx


 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)

 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail
[EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Can't link with C API

2002-09-07 Thread Ben Goodwin

Based on the prefix for your MySQL installation (--prefix=/usr/local/mysql
'), you're not using the right paths.  You need to set the -Idirectory to
be where your mysql.h file is, and the -Ldirectory to be where your
libmysqlclient.so (or .a if compiling static) file is.  I'd recommend trying
the following values

MYSQLFLAGS = -I/usr/local/mysql/include/mysql
MYSQLLIBS = -L/usr/local/mysql/lib/mysql -lmysqlclient

That may not be quite right - check for the locations of the above-mentioned
files and adjust if need be.

Good luck!

-=| Ben

- Original Message -
From: Steve Cogorno [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, September 07, 2002 12:19 AM
Subject: Can't link with C API


 Description:
 I must be missing something terribly obvious, but I cannot get
 my client program to link. I get messages like this:
 ild: (undefined symbol) mysql_free_result -- referenced in the text
segment of dbinterface.o

 The reference manual says to make sure the -lmysqlclient and -L
 path settings are provided to the linker, which they are.  I've
 moved these around. I've tried setting the compile to static instead
 of dynamic link.  None of these seems to help.

 I'm using the SUNWspro/CC compiler.  I've tried switching to gcc,
 but I get the same result.

 I know that the linkers is finding the MySQL libraries because I can
 see the libmysqlclient.a file being opened when I trace the process
 with truss.

 I appreciate any advice you can provide!

 Here's the make file:

 CC = cc

 CFLAGS = -Dsvr4 -g

 MYSQLFLAGS =  -I /work/doctools/mysql/include
 MYSQLLIBS = -L /work/doctools/mysql-3.23.52/lib -lmysqlclient

 INCFLAGS = -I /usr/local/include


 all: TEST

 clean:
 rm *o TEST

 TEST: dbinterface.o TEST.o
 $(CC) $(CFLAGS) $(INCFLAGS) $(MYSQLLIBS) dbinterface.o TEST.o  -o TEST

 TEST.o: TEST.c
 $(CC) $(CFLAGS) $(INCFLAGS) $(MYSQLFLAGS) -c TEST.c -o TEST.o

 dbinterface.o: dbinterface.c
 $(CC) $(CFLAGS) $(INCFLAGS) $(MYSQLFLAGS) -c dbinterface.c  -o
dbinterface.o
 9


 How-To-Repeat:

 Fix:


 Submitter-Id: submitter ID
 Originator:
 Organization:
   Steve Cogorno
 
 MySQL support: none
 Synopsis: Can't link to API
 Severity: serious
 Priority: medium
 Category: mysql
 Class: support
 Release: mysql-3.23.52-max (Official MySQL-max binary)
 Server: ./mysqladmin  Ver 8.23 Distrib 3.23.52, for sun-solaris2.8 on
sparc
 Copyright (C) 2000 MySQL AB  MySQL Finland AB  TCX DataKonsult AB
 This software comes with ABSOLUTELY NO WARRANTY. This is free software,
 and you are welcome to modify and redistribute it under the GPL license

 Server version 3.23.52-max
 Protocol version 10
 Connection Localhost via UNIX socket
 UNIX socket /tmp/mysql.sock
 Uptime: 4 hours 46 min 41 sec

 Threads: 1  Questions: 452  Slow queries: 0  Opens: 675  Flush tables: 1
Open tables: 2 Queries per second avg: 0.026
 Environment:
 Compiled: Sun CC 5.0
 System: SunOS village 5.9 Generic sun4u sparc SUNW,Ultra-60
 Architecture: sun4

 Some paths:  /usr/bin/perl /usr/ccs/bin/make
/net/suntools/export/tools/sparc/bin/gmake
/net/suntools/export/tools/sparc/bin/gcc
/ws/on81-tools/SUNWspro/SC5.0/bin//cc
 GCC: Reading specs from
/net/newsuntools.sfbay/export/tools/sparc/lib/gcc-lib/sparc-sun-solaris2.7/2
.95/specs
 gcc version 2.95 19990728 (release)
 Compilation info: CC='gcc'  CFLAGS='-O3 -fno-omit-frame-pointer'
CXX='gcc'

CXXFLAGS='-O3 -fno-omit-frame-pointer -felide-constructors -fno-exceptions -
fno-rtti'  LDFLAGS=''
 LIBC:
 -rw-r--r--   1 root bin  1828460 Apr  6 12:46 /lib/libc.a
 lrwxrwxrwx   1 root root  11 Jun 18 18:13 /lib/libc.so -
./libc.so.1
 -rwxr-xr-x   1 root bin   855484 Apr  6 12:46 /lib/libc.so.1
 -rw-r--r--   1 root bin  1828460 Apr  6 12:46 /usr/lib/libc.a
 lrwxrwxrwx   1 root root  11 Jun 18 18:13 /usr/lib/libc.so -
./libc.so.1
 -rwxr-xr-x   1 root bin   855484 Apr  6 12:46 /usr/lib/libc.so.1
 Configure command: ./configure --prefix=/usr/local/mysql
'--with-comment=Official MySQL-max
binary' --with-extra-charsets=complex --with-server-suffix=-max --enable-thr
ead-safe-client --enable-local-infile --enable-assembler --disable-shared --
with-berkeley-db --with-innodb CC=gcc 'CFLAGS=-O3 -fno-omit-frame-pointer'
'CXXFLAGS=-O3 -fno-omit-frame-pointer -felide-constructors -fno-exceptions -
fno-rtti' CXX=gcc


 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)

 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail
[EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail 

Innodb error on windows ME platform

2002-09-07 Thread Neil Malkani

Hi,

I have just installed and setup MySQL unfortunately I do not seem to be able 
to resolve this issue concerning the Innodb functionality in MySQL. Any help 
would be much appreciated.

Thanks,

Neil Malkani


020907 17:24:29  InnoDB: Assertion failure in thread 4294335835 in file 
E:\build-3.23.52\innobase\os\os0sync.c line 52
InnoDB: We intentionally generate a memory trap.
InnoDB: Send a detailed bug report to [EMAIL PROTECTED]
020907 17:24:29  C:\MYSQL\BIN\MYSQLD~2.EXE: Got signal 11. Aborting!

020907 17:24:29  Aborting

020907 17:24:29  InnoDB: Warning: shutting down a not properly started
 InnoDB: or created database!
020907 17:24:29  C:\MYSQL\BIN\MYSQLD~2.EXE: Shutdown Complete



_
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Select all with an excpetion

2002-09-07 Thread olinux

Specify the fields you want in your query.

example:
SELECT stat_id, stat_name, stat_data FROM build_stats
WHERE stat_date LIKE ...

I would also recommend you pick up this book. It will
save you hours and intro you to some simple but
powerful SQL functions.

Sams Teach Yourself SQL in 10 Minutes
http://www.amazon.com/exec/obidos/tg/detail/-/0672321289/102-8456958-9824163

olinux



--- David Dillon [EMAIL PROTECTED] wrote:
 Hello,
 
I am sorry if this is a painfully easy question,
 but I have been 
 looking everywhere, and I cannot find out how to do
 what I need. My 
 query is simply have: select * from table
 build_stats where stat_date 
 like blah blah
 My only problem is that I dont want the field
 stat_date to show up in 
 the results. Is there any such thing like and except
 clause or something 
 along those lines. Even if someone could point me in
 the direction of a 
 good resource where I might be able to find it, that
 would be much 
 appreciated. Thank you very much for your time.
 
-Dave-
 
 

-
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list
 archive)
 
 To request this thread, e-mail
 [EMAIL PROTECTED]
 To unsubscribe, e-mail
 [EMAIL PROTECTED]
 Trouble unsubscribing? Try:
 http://lists.mysql.com/php/unsubscribe.php
 


__
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
http://finance.yahoo.com

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Problem compiling mysql-3.23.52

2002-09-07 Thread Javier Suarez

Hello

Im having a problem compiling the version of the subject, the problem is 
with the gethotsbyname function and the message is the next:

libmysql.c: In function `mysql_real_connect':
libmysql.c:1325: warning: passing arg 5 of `gethostbyname_r' from 
incompatible pointer type
libmysql.c:1325: too few arguments to function `gethostbyname_r'
libmysql.c:1325: warning: assignment makes pointer from integer without a cast
make[2]: *** [libmysql.lo] Error 1
make[2]: Leaving directory `/opt/src/apache/mysql-3.23.52/libmysql'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/opt/src/apache/mysql-3.23.52'
make: *** [all-recursive-am] Error 2

The system is Suse 8.0 and the Glibc is the glibc-2.2.5-38
Any solution or should I install the RPM from Suse? :-(

Thanks

Javier Suarez 


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Have A problem

2002-09-07 Thread Chuck \PUP\ Payne

Hi,

I got a small problem I can't seem to do a sql statement that will pick on
the first letter of word in a feild. I have over 700 record in a database,
but I like to be able only to see those that let say start with D. How can
I do a statement that will let me do that.

Chuck Payne
Magi Design and Support.


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Have A problem

2002-09-07 Thread Jocelyn Fournier

Hi,

Try :

SELECT * FROM yourtable WHERE word LIKE 'D%';

Regards,
  Jocelyn
- Original Message -
From: Chuck PUP Payne [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, September 08, 2002 2:42 AM
Subject: Have A problem


 Hi,

 I got a small problem I can't seem to do a sql statement that will pick on
 the first letter of word in a feild. I have over 700 record in a database,
 but I like to be able only to see those that let say start with D. How
can
 I do a statement that will let me do that.

 Chuck Payne
 Magi Design and Support.


 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)

 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail
[EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php






-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Select all with an excpetion

2002-09-07 Thread David Lloyd


Hmmm...

 Specify the fields you want in your query.
 
 example:
 SELECT stat_id, stat_name, stat_data FROM build_stats
 WHERE stat_date LIKE ...

I think you miss the point of the question. What if you have table with
50 fields and you just don't want field 45, 46 and 48? It would be much
easier to use an except clause here rather than have to specify 47
fields...

DSL

(this mysql query spam filter is spam)

-- 
Con te partiro, su navi per mari
 Che io lo so, no, no non esistono piu
Con te io li vivro.
 (Sartori F, Quarantotto E)

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




A programming question

2002-09-07 Thread Chuck \PUP\ Payne

Hi,

I would like to know if there is a way that I can pass on an information
from a pull down menu into a sql query. Right now I have to right a PHP page
for each piece I am wanting to pass on. Example I have a movie database and
now if I want to see what is in my Anime Category that starts with A I
have to create a page like this:

Select * FROM database WHERE category = 'anime' AND title like 'A%'

I know I have to do an array? Would it be like this?

$category 
$letter 

Select * FROM database WHERE category = '$category' and title is like
'$letter'

But it get to the sql statement is where I am lost.

Chuck Payne
Magi Design and Support


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: A programming question

2002-09-07 Thread David Lloyd


You may want to check out CPAN for:

Apache::DBIx

...

(kill the mysql query spam thingo)

DSL

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Replications...

2002-09-07 Thread Jeremy Zawodny

On Fri, Sep 06, 2002 at 03:52:24PM +, Sam Przyswa wrote:
 Hi,
 
 Does the next MySQL 4.x version will support cross replications
 between several master servers in cluster ?

Multi-master replication works as well in 4.x as it does in 3.23.xx.

Jeremy
-- 
Jeremy D. Zawodny |  Perl, Web, MySQL, Linux Magazine, Yahoo!
[EMAIL PROTECTED]  |  http://jeremy.zawodny.com/

MySQL 3.23.51: up 32 days, processed 662,362,680 queries (233/sec. avg)

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Replications...

2002-09-07 Thread Sam Przyswa

Jeremy Zawodny ([EMAIL PROTECTED]) écrivait:

On Fri, Sep 06, 2002 at 03:52:24PM +, Sam Przyswa wrote:
 Hi,

 Does the next MySQL 4.x version will support cross replications
 between several master servers in cluster ?

Multi-master replication works as well in 4.x as it does in 3.23.xx.

Does multi-master mean master to master, imagine you have 3 MySQL servers, A, B,
C, with a load balancer in front end, if we make an update on A, is it possible to
replicate/sync the change on B and C ?

Sam.


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Replications...

2002-09-07 Thread Jeremy Zawodny

On Sun, Sep 08, 2002 at 03:30:35AM +, Sam Przyswa wrote:
 Jeremy Zawodny ([EMAIL PROTECTED]) écrivait:
 
 On Fri, Sep 06, 2002 at 03:52:24PM +, Sam Przyswa wrote:
  Hi,
 
  Does the next MySQL 4.x version will support cross replications
  between several master servers in cluster ?
 
 Multi-master replication works as well in 4.x as it does in 3.23.xx.
 
 Does multi-master mean master to master, imagine you have 3 MySQL
 servers, A, B, C, with a load balancer in front end, if we make an
 update on A, is it possible to replicate/sync the change on B and C
 ?

You want to do this?

http://jeremy.zawodny.com/mysql/managing-mysql-replication_files/slide0121.htm

Just make B a slave of A, C a slave of B, and A a slave of C.

Beware of using auto-increments in that scanario, though.  You'll be
rather surprised and frustrated as explained in the manual.
-- 
Jeremy D. Zawodny |  Perl, Web, MySQL, Linux Magazine, Yahoo!
[EMAIL PROTECTED]  |  http://jeremy.zawodny.com/

MySQL 3.23.51: up 32 days, processed 662,833,682 queries (233/sec. avg)

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php