Re: MySQL and validation rule

2004-10-11 Thread Philippe Poelvoorde
Jonathan Jesse wrote:
As mentioned previously I am a MySQL newbie.  I have read most of the Paul
DuBois book and portions I have found relevant of the manual to help me out,
however I have not found an answer to this question, maybe it is not even
needed.
I have used MS Access a lot and one of the ways I use it is to track
hostname to username to ip address at work.  In the forms we have a
validation rule on the field ip address which allows only numbers in
XXX.XXX.XXX.XXX format.  Is there such a way to do this in MySQL or would
that be on the application that I would use to open/insert/etc ?
Thanks in advance,
Jonathan

MySQL can't do that check on the fly.
take a look here :
http://dev.mysql.com/doc/mysql/en/String_functions.html
and use inet_hton as proposed in the comments.
--
Philippe Poelvoorde
COS Trading Ltd.
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: MySQL and validation rule

2004-10-11 Thread SGreen
You are correct. That is an application-side rule that you will need to 
enforce using your application code.  MySQL could possibly do this check 
but the overhead involved would be severe and your application's 
performance would suffer.

Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine


Jonathan Jesse [EMAIL PROTECTED] wrote on 10/10/2004 04:35:30 PM:

 As mentioned previously I am a MySQL newbie.  I have read most of the 
Paul
 DuBois book and portions I have found relevant of the manual to help me 
out,
 however I have not found an answer to this question, maybe it is not 
even
 needed.
 
 I have used MS Access a lot and one of the ways I use it is to track
 hostname to username to ip address at work.  In the forms we have a
 validation rule on the field ip address which allows only numbers in
 XXX.XXX.XXX.XXX format.  Is there such a way to do this in MySQL or 
would
 that be on the application that I would use to open/insert/etc ?
 
 Thanks in advance,
 
 Jonathan
 
 
 -- 
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
 


MySQL and validation rule

2004-10-10 Thread Jonathan Jesse
As mentioned previously I am a MySQL newbie.  I have read most of the Paul
DuBois book and portions I have found relevant of the manual to help me out,
however I have not found an answer to this question, maybe it is not even
needed.

I have used MS Access a lot and one of the ways I use it is to track
hostname to username to ip address at work.  In the forms we have a
validation rule on the field ip address which allows only numbers in
XXX.XXX.XXX.XXX format.  Is there such a way to do this in MySQL or would
that be on the application that I would use to open/insert/etc ?

Thanks in advance,

Jonathan


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