473,796 Members | 2,703 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Search for entries starting with a non-letter?

We're trying to make a search form, and are wanting to create links for
all the letters a person can click on and will bring up all entries
that start with that letter.
That part is easy:
.... WHERE field LIKE '$letter%'

But we'd like to also have one a person can click on for numbers and
punctuation.
Is there a built-in mySQL querey component where you can search for
entries in a column that start with a non-letter?

Thanks for any feedback!
-Liam

Jan 26 '06 #1
2 2120
<ne**@celticbea r.com> wrote in message
news:11******** **************@ g44g2000cwa.goo glegroups.com.. .
Is there a built-in mySQL querey component where you can search for
entries in a column that start with a non-letter?


I'd use the regular expression matching predicates implemented in MySQL.

For example,
.... WHERE someColumn NOT RLIKE '^[[:upper:]]'

See RLIKE in this page:
http://dev.mysql.com/doc/refman/5.0/...-matching.html
and reference for regular expression syntax in MySQL in this page:
http://dev.mysql.com/doc/refman/5.0/en/regexp.html

Regards,
Bill K.
Jan 27 '06 #2
Bill Karwin wrote:
<ne**@celticbea r.com> wrote in message
news:11******** **************@ g44g2000cwa.goo glegroups.com.. .
Is there a built-in mySQL querey component where you can search for
entries in a column that start with a non-letter?


I'd use the regular expression matching predicates implemented in MySQL.

For example,
... WHERE someColumn NOT RLIKE '^[[:upper:]]'


Ah! I had no idea you could do that in mySQL. almost like using a Perl
regex.
And I see, you can use REGEX in mySQL as well. =)
Thanks for the clue-by-four!
-Liam

Jan 27 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
4506
by: Fabio | last post by:
Hello, does anyone know what could be wrong? There's a lot of similar entries in the SQL Server current log: 2004-01-21 17:54:00.01 spid57 Starting up database 'DB_NAME' 2004-01-21 17:54:06.45 spid57 Starting up database 'DB_NAME' 2004-01-21 17:54:59.13 spid56 Starting up database 'DB_NAME' There are hundreds of similar entries that repeat every few seconds. The
5
3006
by: George | last post by:
Hi, Anyone has the background for explaining? I have made a search on my name and I have got a link to another search engine. The link's title was the search phrase for the other search engine (a wicked phrase). Some but not all of the words of that phrase exist in my website. I reported it and they removed the link but did not give explanations.
0
863
by: John J | last post by:
Thanks for the help in my previous thread, I was able to solve the problem by using some code I'd written into another function. For anyone interested I've included the working code in my last thread. I've now written some similar code to search for the winner of a race. The "entries" in the code below is a pointer to an Entry. Below is the code I've written to search for the winner, which works by checking if (Pl == 1); however, I'm not...
1
2005
by: John J | last post by:
I'm currently writing 3 classes that will accept race entries for yachts and perform various functions on them. Below is the code from 2 classes (Race.cpp and Entry.cpp). I've mostly finished these classes; however, there is a Race::winner() function that is intended to search for entry objects and display the winner of a race. I'd appreciate some advice on why my Race::winner() function is not working correctly. Thanks for any help. ...
5
2639
by: pembed2003 | last post by:
Hi all, I need to write a function to search and replace part of a char* passed in to the function. I came up with the following: char* search_and_replace(char* source,char search,char* replace){ char* result; size_t l = strlen(source), r = strlen(replace), i; int number_of_replaces = 0; for(i = 0; i < l; i++){ if(source == search)
8
3627
by: Huihong | last post by:
Please check out our newly released source code search engine here, http://www.codase.com e.g., search socket method call, http://www.codase.com/search/call?name=socket&owner=&lang=*&type=&parameters=&obj= Rather than treating code as text, Codase understands programming languages, and treats code as code, the way it's supposed to be. This unique and syntax-aware approach provides the most accurate and detailed search results with...
4
22651
by: James | last post by:
Why does my LDAP query from a C# console app limit its results to 1000? When I run the same query from a vb script I get over 6000 results. I have tried to set the SearchRequest.SizeLimit to a value grater than the expected results and still only get 1000 records. I did notice that in the LdapConnection constructor I was required to specify the target server where in the vbs I simply passed an LDAP query to the ADSDSOObject provider. ...
2
1081
by: Sriram | last post by:
Hi, i am developing a search page, basically using datagrid. i have given a column as hyperlink so that when the user clicks on it, it gives the details of the selected item in a seperate page. But i want to add a feature so that it saves the search results. for example even after seeing an item the user should be able to still view the search results so that he may view another item.
2
2277
by: eSolTec, Inc. 501(c)(3) | last post by:
Thank you in advance for any and all assistance. Is there a way to start, pause and resume a recurrsive search exactly where you left off, say in the registry programmatically? -- Michael Bragg, President eSolTec, Inc. a 501(C)(3) organization MS Authorized MAR looking for used laptops for developmentally disabled.
1
2359
by: Reef81 | last post by:
Does anyone know a way to have the search parameters displayed in the query or report? For example, if I set up a parameter to search all entries in my table, is there a way to have the search terms I entered displayed next to those entries? I would like to search with multiple parameters (multiple search words) and have the results show me which entries were found with which corresponding search words. Any help would be greatly...
0
9685
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10461
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10239
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10019
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9057
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5447
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5579
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4122
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2928
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.