Re: Help with a SELECT query

2006-01-06 Thread Gleb Paharenko
Hello. Usually working with IP addresses in a numeric form is faster. Use INET_NTOA() and INET_ATON() functions to store IP addresses as unsigned ints. To work with subnetworks instead of like 'xxx.xxx.%' use ip_address_in_numeric_form between inet_aton('xxx.xxx.0.0') and

RE: Help with a SELECT query

2006-01-06 Thread Jay Paulson \(CE CEN\)
:[EMAIL PROTECTED] Sent: Fri 1/6/2006 5:28 AM To: mysql@lists.mysql.com Subject: Re: Help with a SELECT query Hello. Usually working with IP addresses in a numeric form is faster. Use INET_NTOA() and INET_ATON() functions to store IP addresses as unsigned ints. To work with subnetworks

Re: Help with a SELECT query

2006-01-06 Thread Michael Stassen
Jay Paulson (CE CEN) wrote: This helps a ton! Thanks! I didn' tknow about the INET_NTOA() or the INET_ATON() functions. That is much quicker to query on them than on a char set of ips. However, I did notice on the mysql web site that these functions are only available in 5.x but the way the page

Re: Help with a SELECT query

2006-01-06 Thread Gleb Paharenko
Hello. These functions are available in 4.1.16 as well: mysql select inet_aton('192.168.0.1'); +--+ | inet_aton('192.168.0.1') | +--+ | 3232235521 | +--+ 1 row in set (0.06 sec) mysql select

Re: Help with a SELECT query

2006-01-06 Thread Stefan Hinz
Michael, thanks for your feedback! Jay Paulson (CE CEN) wrote: This helps a ton! Thanks! I didn' tknow about the INET_NTOA() or the INET_ATON() functions. That is much quicker to query on them than on a char set of ips. However, I did notice on the mysql web site that these functions are

RE: Help with a SELECT query

2006-01-06 Thread Jay Paulson \(CE CEN\)
Message- From: Stefan Hinz [mailto:[EMAIL PROTECTED] Sent: Fri 1/6/2006 12:40 PM To: Michael Stassen Cc: Jay Paulson (CE CEN); Gleb Paharenko; mysql@lists.mysql.com; [EMAIL PROTECTED] Subject: Re: Help with a SELECT query [1] The reasoning behind this: Is it relevant for a 5.0 user to know

Re: Help with a SELECT query

2006-01-06 Thread Stefan Hinz
@lists.mysql.com; [EMAIL PROTECTED] Subject: Re: Help with a SELECT query [1] The reasoning behind this: Is it relevant for a 5.0 user to know that INET_ATON() was introduced in 3.23.15? We don't think it is, and many users had complained that the manual was full of clutter like that. Regards

Help with a SELECT query

2006-01-05 Thread Jay Paulson \(CE CEN\)
Below is a query I'm trying to create and the sql for the table I'm pulling the information out of. The query is definitely not the best query out there especially since I'm still pretty new with sql. I know there has to be a better way of getting the information I want. A little background.

Re: I need help with a Select Query

2005-04-23 Thread Ed Reed
Try this SELECT * FROM applications LEFT JOIN rejected ON application.appid = rejected.appid WHERE rejected.appid Is Null ORDER BY application.appid DESC; Wade [EMAIL PROTECTED] 4/23/05 3:12:37 PM 04232005 1707 GMT-6 I need to do something like this: $sql = SELECT * FROM application WHERE

Help with a SELECT Query

2004-07-12 Thread shaun thornburgh
Hi, I use the following query to extract information about a practice in my database. However if the practice system id hasnt been set then the query won't work. SELECT P.*, S.System_Name FROM Practices P, Systems S WHERE P.Practice_ID = '.$_SESSION['ses_practice_id'].' AND S.System_ID =

NEWBIE!! need help with nested select query

2003-11-15 Thread Becky OGrady
Hi- I have 2 queries that I know work in SQL Server, but I can't figure out why they won't work with mySQL. SELECT email, comments, (select count(*) from guests where decision=3) as total, (select count(*) from guests where decision=2) as secondtotal FROM guests AND SELECT email, comments,

Re: NEWBIE!! need help with nested select query

2003-11-15 Thread Nitin
Subqueries aren't supported in MySql prior to ver 4.1. - Original Message - From: Becky OGrady [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, November 15, 2003 12:28 PM Subject: NEWBIE!! need help with nested select query Hi- I have 2 queries that I know work in SQL Server

Re: help me with select query

2001-07-11 Thread Rolf Hopkins
='word3' AND c1.id=c2.id AND c1.id=c3.id - Original Message - From: Jaime Teng [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, July 11, 2001 13:03 Subject: help me with select query Hi, I have a table: mysql describe crossref

help me with select query

2001-07-10 Thread Jaime Teng
Hi, I have a table: mysql describe crossref; +---+--+--+-+ | Field | Type | Null | Key | +---+--+--+-+ | word | char(15) | | MUL | | id| int(10) unsigned | | MUL | +---+--+--+-+

RE: help me with select query

2001-07-10 Thread Dmitri Lubinski
crossref a, crossref b where a.id=b.id and a.word='registers' and b.word='tintin' result: 1604 --- Dmitri Lubinski -Original Message- From: Jaime Teng [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 11, 2001 9:04 AM To: [EMAIL PROTECTED] Subject: help me with select query