small help

2007-09-28 Thread RAMYA

ALTER TABLE TimeTracker.TT_ProjectMembers ADD 
CONSTRAINT FK_Roles_Projects FOREIGN KEY 
(
ProjectID
) REFERENCES TimeTracker.TT_Projects (
ProjectID
) ON DELETE CASCADE ,
CONSTRAINT FK_WorksOn_Users FOREIGN KEY 
(
UserID
) REFERENCES TimeTracker.TT_Users (
UserID
)



As iam new to this mysql when i was doing the program mysql shows the error
as

You have an error in your SQL syntax; check the manual that corresponds to
your MySQL server version for the right syntax to use near 'CONSTRAINT
FK_WorksOn_Users FOREIGN KEY 
(
UserID
) REFERENCES TimeTracke' at line 8


what to do if this error comes plz anyone help me


-- 
View this message in context: 
http://www.nabble.com/small-help-tf4532644.html#a12935164
Sent from the MySQL - General mailing list archive at Nabble.com.


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



errors in mysql syntax

2007-09-28 Thread RAMYA

ALTER TABLE TimeTracker.TT_ProjectMembers ADD 
CONSTRAINT FK_Roles_Projects FOREIGN KEY 
( 
ProjectID 
) REFERENCES TimeTracker.TT_Projects ( 
ProjectID 
) ON DELETE CASCADE , 
CONSTRAINT FK_WorksOn_Users FOREIGN KEY 
( 
UserID 
) REFERENCES TimeTracker.TT_Users ( 
UserID 
) 



As iam new to this mysql when i was doing the program mysql shows the error
as 

You have an error in your SQL syntax; check the manual that corresponds to
your MySQL server version for the right syntax to use near 'CONSTRAINT
FK_WorksOn_Users FOREIGN KEY 
( 
UserID 
) REFERENCES TimeTracke' at line 8 


what to do if this error comes plz anyone help me 



-- 
View this message in context: 
http://www.nabble.com/errors-in-mysql-syntax-tf4532650.html#a12935188
Sent from the MySQL - General mailing list archive at Nabble.com.


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: MYSQL CLIENT PROBLEM

2007-09-28 Thread Baron Schwartz

Krishna Chandra Prajapati wrote:

Hi All,

I am using mysql-client 5.0.15 on fedora system. Server is a Debian box with
mysql 5.0.32
After getting connected to the server(192.168.1.7) using the command below
mysql -h 192.168.1.7 -D dip -u dip -p

When a record deleted from a table on server (192.168.1.7) Then that changes
are not reflected on the client session. If i log out and then reconnect to
server then the changes are reflected. Earlier it was working fine.


This is not a bug in the client.  It sounds like you are seeing the 
effects of REPEATABLE READ transaction isolation level.  Did you upgrade 
the server or reconfigure it?  Did you change your storage engine from 
MyISAM to InnoDB?


The next time this happens, try running COMMIT and then run the SELECT 
again.  Do you see the changed data?  If so, it's the transaction 
isolation level.


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



MYSQL CLIENT PROBLEM

2007-09-28 Thread Krishna Chandra Prajapati
Hi All,

I am using mysql-client 5.0.15 on fedora system. Server is a Debian box with
mysql 5.0.32
After getting connected to the server(192.168.1.7) using the command below
mysql -h 192.168.1.7 -D dip -u dip -p

When a record deleted from a table on server (192.168.1.7) Then that changes
are not reflected on the client session. If i log out and then reconnect to
server then the changes are reflected. Earlier it was working fine.

This case happens many time.
Is there is any bug in mysql-client 5.0.15

Thanks,
Krishna


Re: MySQL 5.1.21 won't build on OpenBSD unless...

2007-09-28 Thread Joerg Bruehe

Hi Jake !


Jake Conk wrote:

Hello,

Not sure if this is known or not but I just wanted to let you guys
know that MySQL 5.1.21 fails the make. I've never had this problem on
other versions of mysql. It looks like GNU make worked all the way
through but why won't regular make work anymore?


Thanks for the info !

The MySQL sources use the autotools (autoconf, automake etc) for 
building, so the Makefiles you see in the source tarball are really 
generated from Makefile.am when the source tarball is created.


It is easily possible that automake will create a Makefile which can be 
handled by GNU make, but not by some others - on our build hosts, we 
install GNU make if needed. We did so on our FreeBSD 6.0 host.


I cannot say which change made the Makefiles unusable for BSD make, 
but most likely using GNU make is easier for you than trying to work 
around that change.


As we use GNU make (almost ?) everywhere, changes in the fitness for 
other variants will go by unnoticed for the MySQL build team.



Sorry I cannot offer you any other hint,
Joerg

--
Joerg Bruehe, Senior Production Engineer
MySQL AB, www.mysql.com

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Ouch! ibdata files deleted. Why no catastrophe?

2007-09-28 Thread Joerg Bruehe

Hi !

Jerry Schwartz wrote:

I don't know Linux that well, but I know that HP-UX lets you do most
anything to an open file, including deleting it. The file will continue to
exist as long as it is open by at least one process. 


Yes - that is standard Unix semantics; it should be that way on any 
variety of Unix including Linux, BSD, and the commercial ones.


You can use this for any file system object (including FIFOs) to get an 
automatic cleanup if your process(es) crash(es):

- Create the object (file, FIFO, ...),
- open it (from all processes that need it),
- delete it.
It will continue to exist as long as at least one process has it open, 
but cannot be accessed by its name any longer (so no additional open() 
call is possible).
It will still occupy space on disk, but will not be included in any du 
output (because it is not accessible from any directory).
If du on the root directory of some file system (done by the root 
user) reports less blocks than df on that file system, typically the 
difference are the blocks of such deleted but still open files.



 If I remember
correctly, this is all about the inode use count vs. the directory entry, or
something like that. The file will actually be safe so long as it is not
closed by the last user.

Those files will go away as soon as they are closed, so the database should
be dumped before shutting down mysqld.


Right on both items.

Regards,
Joerg

--
Joerg Bruehe, Senior Production Engineer
MySQL AB, www.mysql.com


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



MySQL 5.0.27 replication problems

2007-09-28 Thread Andrew Braithwaite
Hi,

I keep getting the below in the error log.  I can't see any problems (no
other errors and replication is working) and the master DB is available
the whole time. 
 
070928 12:07:31 [Note] Slave: received end packet from server, apparent
master shutdown:
070928 12:07:31 [Note] Slave I/O thread: Failed reading log event,
reconnecting to retry, log 'mysql-bin.000346' position 69110563
070928 12:07:32 [Note] Slave: connected to master 'username@ip
address:3306',replication resumed in log 'mysql-bin.000346' at position
69110563
070928 12:07:32 [Note] Slave: received end packet from server, apparent
master shutdown:
070928 12:07:32 [Note] Slave I/O thread: Failed reading log event,
reconnecting to retry, log 'mysql-bin.000346' position 69110563
070928 12:07:32 [Note] Slave: connected to master 'username@ip
address:3306',replication resumed in log 'mysql-bin.000346' at position
69110563

Any ideas what is wrong?

Cheers,

Andrew

Sql, query


LOVEFiLM International Limited is a company registered in England and Wales. 
Registered Number: 04392195. Registered Office: No.9, 6 Portal Way, London W3 
6RU, United Kingdom. 

This e-mail is confidential to the ordinary user of the e-mail address to which 
it was addressed. If you have received it in error, please delete it from your 
system and notify the sender immediately.

This message has been scanned for viruses by BlackSpider MailControl - 
www.blackspider.com

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



I keep getting an error as attached

2007-09-28 Thread Michael Mostert
 

Michael Mostert 
 
 

State Manager - WA 

Suite 13, Level 4 
231 Adelaide Terrace 
Perth, WA 6000 
P: (08) 9218 8922 
F : (08) 9218 8755
M : 0401 235 703 


 mailto:[EMAIL PROTECTED] Email: [EMAIL PROTECTED] 
 http://www.cxcglobal.com Web : www.cxcglobal.com 

Disclaimer: The information contained in or attached to this message is
intended
only for the people it is addressed to. If you are not the intended
recipient,
any use, disclosure or copying of this information is unauthorised and
prohibited.
This information may be confidential or subject to legal privilege. It is
not the
expressed view of Consultants Exchange Australasia limited unless that is
clearly
stated. Consultants Exchange cannot accept liability for any virus damage
caused by
this message. This documentation is for your general information, and is not
to be
construed as advice. Clients should not act on the information contained
herein
alone, and should seek the advice of their accountants and lawyers.


 
 

 




cxclogo.jpg---BeginMessage---
Title: PunBB / Error




An error was encountered
Error: Unable to connect to MySQL and select database. MySQL 
reported: Can't connect to local MySQL server through socket 
'/var/lib/mysql/mysql.sock' (13). 

---End Message---

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Storing Devnagari unicode data in MySQL

2007-09-28 Thread C K
Namaskar,

I am using Windows Xp SP2 and Mysql 5.0.45 and MyODBC 3.51.19 with Microsoft
Marathi Indic IME 1 version 5.
I am storing data in both languages i.e. Marathi and English. So I changed
database character set to 'utf8 -- UTF-8 Unicode' and collation to
'utf8_unicode_ci'. Also I changed the field properties charset to 'utf8' and
collation to 'utf8_unicode_ci' for all varchar and text fields. I am using
MS Access 2003 as a front-end. When I am entering data in Marathi I can read
and write data in Access tables, but when I am entering data I can view data
in Marathi but after storing it in MySQL tables, I can not read data and
just see question marks for the characters I entered. This is not happening
only when I am storing data using Access as a front-end, but also I tried it
by using other mysqk GUI tools, but i get same wrong results. Can any one
please help me. Please give the reasons behind it and the solution to it.
Thanks for your sincere help.

Regards,
CPK

-- 
Keep your Environment clean and green.


Re: DB Schema Comparison Utility ?

2007-09-28 Thread Martijn Tonies
Hello John,

 I am new to MySQL.  We have a development environment where we have
 three systems

 1) Developement Database on Machine A
 2) Test Databasae on Machine B
 3) Live Database on Machine C

 So we make changes to the Developement Database, then move them to test
 then to live.  My question is, is there a way of automatically migrating
 the changes from Dev to Test, Test to Live ?

 I have worked with a DB which had an admin function wherein you could
 connect two databases and it would run a comparison between the two
 databases and produce a file of schema differences which you could
 import to make the two DB schema's the same.  Is there something like
 this for MySQL ?

We have developed an IDE for database development that runs on
Windows and it includes a schema compare utility, have a look here:
www.upscene.com/documentation/dbw3/tools_schemacompare.htm

The tool is called Database Workbench, see www.upscene.com


I'm sorry to report that our webhosting service is in the middle of a
hardware update at the moment and the website appears to be down,
but it should be OK later this day.

Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, NexusDB, Oracle 
MS SQL Server
Upscene Productions
http://www.upscene.com
My thoughts:
http://blog.upscene.com/martijn/
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: Count syntax

2007-09-28 Thread Beauford
Thanks - it works, but what does the 1 and 0 do in this -
SUM(IF(supportertype = 'L', 1, 0))

 -Original Message-
 From: Baron Schwartz [mailto:[EMAIL PROTECTED] 
 Sent: September 28, 2007 1:00 PM
 To: Beauford
 Cc: mysql@lists.mysql.com
 Subject: Re: Count syntax
 
 Beauford wrote:
  Hi,
  
  I have the following line of code and I keep getting wrong 
 results from it.
  Can someone let me know what I'm doing wrong here. I just 
 can't quite 
  figure out the syntax that I need.
  
  select count(*) as numrows, count(supportertype) as leadcar from 
  registrar where supportertype = 'L';
  
  What I want to do is count the total number of records and then the 
  total number of records that have L as the supportertype 
 and then display them.
  
  So I should have something like There are 100 total records and 22 
  with Supporter Type L.
 
 Try this:
 
 SELECT COUNT(*), SUM(IF(supportertype = 'L', 1, 0)) FROM registrar;
 
 Baron
 
 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:
 http://lists.mysql.com/[EMAIL PROTECTED]
 
 
 




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: Count syntax

2007-09-28 Thread Weston, Craig \(OFT\)
Beauford, you might find this article on cross joins interesting, it was
something shown to me a few weeks ago that discusses this kind of
function.

http://dev.mysql.com/tech-resources/articles/wizard/print_version.html
Cheers,
craig



This e-mail, including any attachments, may be confidential, privileged or 
otherwise legally protected. It is intended only for the addressee. If you 
received this e-mail in error or from someone who was not authorized to send it 
to you, do not disseminate, copy or otherwise use this e-mail or its 
attachments.  Please notify the sender immediately by reply e-mail and delete 
the e-mail from your system.


-Original Message-

From: Michael Dykman [mailto:[EMAIL PROTECTED] 
Sent: Friday, September 28, 2007 1:36 PM
To: Beauford
Cc: mysql@lists.mysql.com
Subject: Re: Count syntax

1 means that 1 will be added to the sum if the condition tests,
otherwise 0 will be added to the sum.  the condition in this case is
(supportertype = 'L') and will be applied to every row.

On 9/28/07, Beauford [EMAIL PROTECTED] wrote:
 Thanks - it works, but what does the 1 and 0 do in this -
 SUM(IF(supportertype = 'L', 1, 0))

  -Original Message-
  From: Baron Schwartz [mailto:[EMAIL PROTECTED]
  Sent: September 28, 2007 1:00 PM
  To: Beauford
  Cc: mysql@lists.mysql.com
  Subject: Re: Count syntax
 
  Beauford wrote:
   Hi,
  
   I have the following line of code and I keep getting wrong
  results from it.
   Can someone let me know what I'm doing wrong here. I just
  can't quite
   figure out the syntax that I need.
  
   select count(*) as numrows, count(supportertype) as leadcar from
   registrar where supportertype = 'L';
  
   What I want to do is count the total number of records and then
the
   total number of records that have L as the supportertype
  and then display them.
  
   So I should have something like There are 100 total records and
22
   with Supporter Type L.
 
  Try this:
 
  SELECT COUNT(*), SUM(IF(supportertype = 'L', 1, 0)) FROM registrar;
 
  Baron
 
  --
  MySQL General Mailing List
  For list archives: http://lists.mysql.com/mysql
  To unsubscribe:
  http://lists.mysql.com/[EMAIL PROTECTED]
 
 
 




 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]




-- 
 - michael dykman
 - [EMAIL PROTECTED]

 - All models are wrong.  Some models are useful.

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Count syntax

2007-09-28 Thread Baron Schwartz

Beauford wrote:

Hi,

I have the following line of code and I keep getting wrong results from it.
Can someone let me know what I'm doing wrong here. I just can't quite figure
out the syntax that I need.

select count(*) as numrows, count(supportertype) as leadcar from registrar
where supportertype = 'L';

What I want to do is count the total number of records and then the total
number of records that have L as the supportertype and then display them.

So I should have something like There are 100 total records and 22 with
Supporter Type L.


Try this:

SELECT COUNT(*), SUM(IF(supportertype = 'L', 1, 0)) FROM registrar;

Baron

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Count syntax

2007-09-28 Thread Michael Dykman
1 means that 1 will be added to the sum if the condition tests,
otherwise 0 will be added to the sum.  the condition in this case is
(supportertype = 'L') and will be applied to every row.

On 9/28/07, Beauford [EMAIL PROTECTED] wrote:
 Thanks - it works, but what does the 1 and 0 do in this -
 SUM(IF(supportertype = 'L', 1, 0))

  -Original Message-
  From: Baron Schwartz [mailto:[EMAIL PROTECTED]
  Sent: September 28, 2007 1:00 PM
  To: Beauford
  Cc: mysql@lists.mysql.com
  Subject: Re: Count syntax
 
  Beauford wrote:
   Hi,
  
   I have the following line of code and I keep getting wrong
  results from it.
   Can someone let me know what I'm doing wrong here. I just
  can't quite
   figure out the syntax that I need.
  
   select count(*) as numrows, count(supportertype) as leadcar from
   registrar where supportertype = 'L';
  
   What I want to do is count the total number of records and then the
   total number of records that have L as the supportertype
  and then display them.
  
   So I should have something like There are 100 total records and 22
   with Supporter Type L.
 
  Try this:
 
  SELECT COUNT(*), SUM(IF(supportertype = 'L', 1, 0)) FROM registrar;
 
  Baron
 
  --
  MySQL General Mailing List
  For list archives: http://lists.mysql.com/mysql
  To unsubscribe:
  http://lists.mysql.com/[EMAIL PROTECTED]
 
 
 




 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]




-- 
 - michael dykman
 - [EMAIL PROTECTED]

 - All models are wrong.  Some models are useful.

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Count syntax

2007-09-28 Thread Beauford
Hi,

I have the following line of code and I keep getting wrong results from it.
Can someone let me know what I'm doing wrong here. I just can't quite figure
out the syntax that I need.

select count(*) as numrows, count(supportertype) as leadcar from registrar
where supportertype = 'L';

What I want to do is count the total number of records and then the total
number of records that have L as the supportertype and then display them.

So I should have something like There are 100 total records and 22 with
Supporter Type L.

Thanks




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: Storing Devnagari unicode data in MySQL

2007-09-28 Thread Jerry Schwartz
Try upgrading to a version 5 of the ODBC connector. It worked for our
Chinese data.

Regards,

Jerry Schwartz
The Infoshop by Global Information Incorporated
195 Farmington Ave.
Farmington, CT 06032

860.674.8796 / FAX: 860.674.8341

www.the-infoshop.com
www.giiexpress.com
www.etudes-marche.com

 -Original Message-
 From: C K [mailto:[EMAIL PROTECTED]
 Sent: Friday, September 28, 2007 1:55 PM
 To: mysql@lists.mysql.com; [EMAIL PROTECTED]
 Subject: Storing Devnagari unicode data in MySQL

 Namaskar,

 I am using Windows Xp SP2 and Mysql 5.0.45 and MyODBC 3.51.19 with
 Microsoft
 Marathi Indic IME 1 version 5.
 I am storing data in both languages i.e. Marathi and English. So I
 changed
 database character set to 'utf8 -- UTF-8 Unicode' and collation to
 'utf8_unicode_ci'. Also I changed the field properties charset to
 'utf8' and
 collation to 'utf8_unicode_ci' for all varchar and text fields. I am
 using
 MS Access 2003 as a front-end. When I am entering data in Marathi I can
 read
 and write data in Access tables, but when I am entering data I can view
 data
 in Marathi but after storing it in MySQL tables, I can not read data
 and
 just see question marks for the characters I entered. This is not
 happening
 only when I am storing data using Access as a front-end, but also I
 tried it
 by using other mysqk GUI tools, but i get same wrong results. Can any
 one
 please help me. Please give the reasons behind it and the solution to
 it.
 Thanks for your sincere help.

 Regards,
 CPK

 --
 Keep your Environment clean and green.




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Storing Devnagari unicode data in MySQL

2007-09-28 Thread C K
Thanks for your help. I upgraded MyODBC 3.51.19 to 5.1 beta, and tried it
for Devnagari data entry and it worked well. But now a new problem of
showing newly added record as '#Deleted' is there. and even after adding a
time stamp field in the table, this problem exists,(this problem is solved
in 3.51.19). Can any one please help?
Thanks again
CPK

On 9/28/07, Jerry Schwartz [EMAIL PROTECTED] wrote:

 Try upgrading to a version 5 of the ODBC connector. It worked for our
 Chinese data.

 Regards,

 Jerry Schwartz
 The Infoshop by Global Information Incorporated
 195 Farmington Ave.
 Farmington, CT 06032

 860.674.8796 / FAX: 860.674.8341

 www.the-infoshop.com
 www.giiexpress.com
 www.etudes-marche.com

  -Original Message-
  From: C K [mailto:[EMAIL PROTECTED]
  Sent: Friday, September 28, 2007 1:55 PM
  To: mysql@lists.mysql.com; [EMAIL PROTECTED]
  Subject: Storing Devnagari unicode data in MySQL
 
  Namaskar,
 
  I am using Windows Xp SP2 and Mysql 5.0.45 and MyODBC 3.51.19 with
  Microsoft
  Marathi Indic IME 1 version 5.
  I am storing data in both languages i.e. Marathi and English. So I
  changed
  database character set to 'utf8 -- UTF-8 Unicode' and collation to
  'utf8_unicode_ci'. Also I changed the field properties charset to
  'utf8' and
  collation to 'utf8_unicode_ci' for all varchar and text fields. I am
  using
  MS Access 2003 as a front-end. When I am entering data in Marathi I can
  read
  and write data in Access tables, but when I am entering data I can view
  data
  in Marathi but after storing it in MySQL tables, I can not read data
  and
  just see question marks for the characters I entered. This is not
  happening
  only when I am storing data using Access as a front-end, but also I
  tried it
  by using other mysqk GUI tools, but i get same wrong results. Can any
  one
  please help me. Please give the reasons behind it and the solution to
  it.
  Thanks for your sincere help.
 
  Regards,
  CPK
 
  --
  Keep your Environment clean and green.






-- 
Keep your Environment clean and green.


Re: MySQL 5.1.21 won't build on OpenBSD unless...

2007-09-28 Thread Dan Nelson
In the last episode (Sep 27), Jake Conk said:
 Not sure if this is known or not but I just wanted to let you guys
 know that MySQL 5.1.21 fails the make. I've never had this problem on
 other versions of mysql. It looks like GNU make worked all the way
 through but why won't regular make work anymore?

You didn't give much useful information in your message (not even a
line number!), but I bet I found the problem.

Lines 149 and 150 of Makefile.am have spaces instead of tabs as
indentation characters.  Even the documentation for GNU make says that
A tab character must come at the beginning of every command line to
distinguish command lines from other lines in the makefile., so it
really should have failed too.  Fix those two lines before running
./configure and your build should run okay.

-- 
Dan Nelson
[EMAIL PROTECTED]

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: MySQL 5.1.21 won't build on OpenBSD unless...

2007-09-28 Thread Dan Nelson
In the last episode (Sep 28), Dan Nelson said:
 In the last episode (Sep 27), Jake Conk said:
  Not sure if this is known or not but I just wanted to let you guys
  know that MySQL 5.1.21 fails the make. I've never had this problem on
  other versions of mysql. It looks like GNU make worked all the way
  through but why won't regular make work anymore?
 
 You didn't give much useful information in your message (not even a
 line number!), but I bet I found the problem.
 
 Lines 149 and 150 of Makefile.am have spaces instead of tabs as
 indentation characters.  Even the documentation for GNU make says that
 A tab character must come at the beginning of every command line to
 distinguish command lines from other lines in the makefile., so it
 really should have failed too.  Fix those two lines before running
 ./configure and your build should run okay.

You may also need to fix Makefile.in if you don't want to rerun
automake...

-- 
Dan Nelson
[EMAIL PROTECTED]

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: Count syntax

2007-09-28 Thread Beauford
Thanks to all. 

 -Original Message-
 From: Michael Dykman [mailto:[EMAIL PROTECTED] 
 Sent: September 28, 2007 1:36 PM
 To: Beauford
 Cc: mysql@lists.mysql.com
 Subject: Re: Count syntax
 
 1 means that 1 will be added to the sum if the condition 
 tests, otherwise 0 will be added to the sum.  the condition 
 in this case is (supportertype = 'L') and will be applied to 
 every row.
 
 On 9/28/07, Beauford [EMAIL PROTECTED] wrote:
  Thanks - it works, but what does the 1 and 0 do in this - 
  SUM(IF(supportertype = 'L', 1, 0))
 
   -Original Message-
   From: Baron Schwartz [mailto:[EMAIL PROTECTED]
   Sent: September 28, 2007 1:00 PM
   To: Beauford
   Cc: mysql@lists.mysql.com
   Subject: Re: Count syntax
  
   Beauford wrote:
Hi,
   
I have the following line of code and I keep getting wrong
   results from it.
Can someone let me know what I'm doing wrong here. I just
   can't quite
figure out the syntax that I need.
   
select count(*) as numrows, count(supportertype) as 
 leadcar from 
registrar where supportertype = 'L';
   
What I want to do is count the total number of records and then 
the total number of records that have L as the supportertype
   and then display them.
   
So I should have something like There are 100 total 
 records and 
22 with Supporter Type L.
  
   Try this:
  
   SELECT COUNT(*), SUM(IF(supportertype = 'L', 1, 0)) FROM 
 registrar;
  
   Baron
  
   --
   MySQL General Mailing List
   For list archives: http://lists.mysql.com/mysql To unsubscribe:
   http://lists.mysql.com/[EMAIL PROTECTED]
  
  
  
 
 
 
 
  --
  MySQL General Mailing List
  For list archives: http://lists.mysql.com/mysql
  To unsubscribe:
 http://lists.mysql.com/[EMAIL PROTECTED]
 
 
 
 
 -- 
  - michael dykman
  - [EMAIL PROTECTED]
 
  - All models are wrong.  Some models are useful.
 
 -- 
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:
 http://lists.mysql.com/[EMAIL PROTECTED]
 
 
 




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]