Re: Query not returning Data

2007-10-13 Thread Brent Baisley
That is a string comparison, so they will never be equal. You don't  
have to put quotes around field names unless you are using reserved  
words, which you shouldn't. If you do use quotes around field  
names, you need to use `backticks`.



On Oct 10, 2007, at 1:15 PM, Martijn Tonies wrote:





Sorry about double post, I am having problems with my ISP.

I have the following query:

SELECT *
FROM Sight_Hearing_Help
WHERE 'type_help' = Eye Exam  Glasses
AND 'board_action_date' BETWEEN 07-01-2007 AND 12-31-2007
LIMIT 0 , 60;

Returns empty row every time. The board_action_date is a varchar  
field.

Not

a date field. I have also tried using form 2007-07-01.

Additional information:
SUSE 10.2, MySQL 5.0.26-14

Any help would be appreciated!


It could be me, but aren't you compareing a string to a string?

'type_help' (with normal single quotes) is a string value.

Eye Exam  Glasses can be a string value as well in MySQL,  
although you

should always use single quotes.

Oh, and a reminder: to solve your strange date-format problems,  
just store a

date in a DATE-type column.

Martijn Tonies
Database Workbench - development tool for MySQL, and more!
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/mysql? 
[EMAIL PROTECTED]





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



CONCEPTS ABOUT PRIVILEGES!

2007-10-13 Thread Wagner Bianchi
Hi friends,

This is the first time i post in this list and send a hello 4 all. I'm 
from Brazil.

So, I have a doubt about the moment when u creat a new user. 
In my high-school course, my teacher is no good with MySQL and he said this:

When u create a new user, that don't have the global privileges!

Maybe, I think is not correctly, cause that new user have a USAGE 
privileges ok, and have the possibles privileges revoked in this moment.
In resuming, the user have all global privileges, but, revoked!

What you think about that?

Thk's.
 
Wagner Bianchi
Diretor de Tecnologia - INFODBA Technologies  Consulting
[EMAIL PROTECTED] - (31) 3272 - 0226 / 8654 - 9510


  Abra sua conta no Yahoo! Mail, o único sem limite de espaço para 
armazenamento!
http://br.mail.yahoo.com/

MySQL only listens on localhost

2007-10-13 Thread Franz Edler
Hello,

Can anyone please give me a hint what I can do that MySQL also listens to
the physical address of the host.
I see that MySQL listen only to 127.0.0.1:3306 and therefore every
connection via the physical interface is reset.

What can I do?

Regards
Franz


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



Re: MySQL only listens on localhost

2007-10-13 Thread Patricio A. Bruna
Check for bind-address in your my.cnf file

- Franz Edler [EMAIL PROTECTED] escribió:
 Hello,
 
 Can anyone please give me a hint what I can do that MySQL also listens
 to
 the physical address of the host.
 I see that MySQL listen only to 127.0.0.1:3306 and therefore every
 connection via the physical interface is reset.
 
 What can I do?
 
 Regards
 Franz
 
 
 -- 
 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]



Res: MySQL only listens on localhost

2007-10-13 Thread Wagner Bianchi
After check the my.cnf, how said by friend Patricio, give the GRANT ALL ON *.* 
TO root@'%'; for thet user do the remote connections.
For some doubts, keep on list!

Bye!  
 
Wagner Bianchi
Diretor de Tecnologia - INFODBA Technologies  Consulting
[EMAIL PROTECTED] - +55 (31) 3272 - 0226 / 8427 - 8803
 



- Mensagem original 
De: Patricio A. Bruna [EMAIL PROTECTED]
Para: Franz Edler [EMAIL PROTECTED]
Cc: mysql@lists.mysql.com
Enviadas: Sábado, 13 de Outubro de 2007 17:07:04
Assunto: Re: MySQL only listens on localhost

Check for bind-address in your my.cnf file

- Franz Edler [EMAIL PROTECTED] escribió:
 Hello,
 
 Can anyone please give me a hint what I can do that MySQL also listens
 to
 the physical address of the host.
 I see that MySQL listen only to 127.0.0.1:3306 and therefore every
 connection via the physical interface is reset.
 
 What can I do?
 
 Regards
 Franz
 
 
 -- 
 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]


  Abra sua conta no Yahoo! Mail, o único sem limite de espaço para 
armazenamento!
http://br.mail.yahoo.com/

Re: Not In join query.

2007-10-13 Thread Baron Schwartz

Hi Chris,

Chris W wrote:

I have 2 queries to give me a list of names.

Q1:
SELECT DISTINCT FName, LName
FROM user u
JOIN userprofile p
USING ( UserID )
JOIN trainingstatus t
USING ( UserID )
WHERE ProgramID =12
ORDER BY LName, FName

Q2
SELECT DISTINCT FName, LName
FROM namelist
WHERE `Date`

What I need is query that will give me a list of names that are in the 
Q2 result but not in the Q1 result. This is easy enough if I am just 
doing the match on one filed I can do this


SELECT Name
FROM
namelist
WHERE `Date` AND Name NOT IN(
SELECT Name
FROM . . . . . . )

What I can't figure out is how to do it if I want to match of FName and 
LName.  I tried to use concat to build the full name and do the not in 
based on the new field MySQL didn't like that query at all.


This is easier to do with an exclusion join:
http://www.xaprb.com/blog/2005/09/23/how-to-write-a-sql-exclusion-join/

It is also much more efficient in current versions of MySQL.

Baron

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



Re: MySQL only listens on localhost

2007-10-13 Thread Jim Ginn
Franz:

Did you setup user access permissions outside of 127.0.0.1 and is port
3306 open on your firewall/router?

Jim Ginn
http://www.Tenant.com


 Hello,

 Can anyone please give me a hint what I can do that MySQL also listens to
 the physical address of the host.
 I see that MySQL listen only to 127.0.0.1:3306 and therefore every
 connection via the physical interface is reset.

 What can I do?

 Regards
 Franz


 --
 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: MySQL only listens on localhost

2007-10-13 Thread Banyan He

Check your my.cf file a /etc/my.cf.

To add the bind-address = ip at the end of the file. Restart your 
mysql. And grant the access to the user who you want to connect your 
database from where you can accept.


Franz Edler wrote:

Hello,

Can anyone please give me a hint what I can do that MySQL also listens to
the physical address of the host.
I see that MySQL listen only to 127.0.0.1:3306 and therefore every
connection via the physical interface is reset.

What can I do?

Regards
Franz


  


--
Banyan He
MailWeb Security
Mobile: +86 13641777622
MSN: [EMAIL PROTECTED]
Skype: banyan.he
Email: [EMAIL PROTECTED]
AntiSpam Test: [EMAIL PROTECTED]
AntiVirus Test: [EMAIL PROTECTED]
Wemaster Mail: [EMAIL PROTECTED]
Website: http://www.rootong.com


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