Log In
Sign Up
Why Join Hot Scripts?
Hot Scripts
All Categories
PHP
Python
Tools & Utilities
XML
Ruby on Rails
Ajax
Web Hosting
ASP
ASP.NET
C & C++
CFML
Flash
Java
JavaScript
CGI & Perl
HTML5
Forums
Blog
Scripts
Hosted Apps
Plugins
Design Templates
Forum
Blog
Advertise
Contact Us
Register
FAQ
Rules
Calendar
Search
Today's Posts
Mark Forums Read
RSS Feeds
Current location:
Hot Scripts Forums
»
Programming Languages
»
PHP
» SELECT all Entries beginnign with a number from mysql
SELECT all Entries beginnign with a number from mysql
LinkBack
Thread Tools
Display Modes
#
1
(
permalink
)
10-10-04, 06:21 AM
Klesti
Newbie Coder
Join Date: May 2004
Location: Albania
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
SELECT all Entries beginnign with a number from mysql
Hi
I have writen a music library script but i don't know how to select from the mysql database all entries of the table artist (the field artist is used as WHERE clause) that begin with a number.
Help?
Klesti
View Public Profile
Find all posts by Klesti
#
2
(
permalink
)
10-10-04, 06:57 AM
ben.periton
Wannabe Coder
Join Date: Oct 2004
Posts: 183
Thanks: 0
Thanked 0 Times in 0 Posts
Perhaps the LIKE command will help
Have a look at
http://www.htmlite.com/mysql011.php
__________________
Ben Periton
http://ben.periton.co.uk
ben.periton
View Public Profile
Visit ben.periton's homepage!
Find all posts by ben.periton
#
3
(
permalink
)
10-10-04, 07:14 AM
Sabu
Junior Code Guru
Join Date: Sep 2004
Posts: 458
Thanks: 0
Thanked 0 Times in 0 Posts
Tat's only really good if you know the specific number at the start.
perhaps RLIKE could be your new friend
__________________
define('TRUE', FALSE);
Sabu
View Public Profile
Find all posts by Sabu
#
4
(
permalink
)
10-10-04, 09:46 AM
moronovich
Junior Code Guru
Join Date: Oct 2004
Posts: 460
Thanks: 0
Thanked 0 Times in 0 Posts
you can set the query like this:
PHP Code:
$query
=
"SELECT * FROM `artistTable` WHERE `artistName` REGEXP '^[0-9]'"
;
mysql_query
(
$query
);
__________________
just an ignorant noob with moronic solution...
moronovich
View Public Profile
Find all posts by moronovich
Bookmarks
Digg
del.icio.us
StumbleUpon
Google
«
Check a field?
|
start/stop/restart a service w/ php?
»
Currently Active Users Viewing This Thread: 1
(0 members and 1 guests)
Thread Tools
Show Printable Version
Email this Page
Display Modes
Linear Mode
Switch to Hybrid Mode
Switch to Threaded Mode
Posting Rules
You
may not
post new threads
You
may not
post replies
You
may not
post attachments
You
may not
edit your posts
BB code
is
On
Smilies
are
On
[IMG]
code is
Off
HTML code is
Off
Trackbacks
are
On
Pingbacks
are
On
Refbacks
are
On
Forum Rules
Forum Jump
User Control Panel
Private Messages
Subscriptions
Who's Online
Search Forums
Forums Home
General Community
Announcements
Polls
The Lounge
New Members & Introductions
Script Requests
HotScripts.com Discussion
Hot Scripts Forum Questions, Suggestions and Feedback
General HotScripts Site Discussion
HotScripts Site Bug Reports
General Web Coding
HTML/XHTML/XML
HTML5
JavaScript
CSS
Flash & ActionScript
Programming Languages
PHP
Perl
ASP
ASP.NET
C/C++
Visual Basic
Windows .NET Programming
Everything Java
Other Languages
Other Discussions
Web Servers
Database
Other Topics
Web Design
API
Frameworks
AJAX
Security
Server Administration
Portable Device Programming
Cloud Computing
Ruby on Rails
CFML
Python
Tools and Utilities
Remotely Hosted
Web Hosting
Advertising Forums
General Advertisements
Job Offers & Assistance
Traffic Exchange
Website Reviews
Web Hosting Talk
DBForums.com
Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
PHP and MySQL ?
rob2132
Hot Scripts Forum Questions, Suggestions and Feedback
4
08-29-08
02:22 AM
help with multiple select used with php and mysql
isaacmlee
PHP
2
10-15-04
01:34 PM
mySQL select
tinhdangdo
PHP
1
09-01-04
12:20 AM
MySQL: Can it handle 1 million + entries?
archangel
PHP
3
08-16-04
03:52 AM
Mysql Select IB FORUM PROBLEM
landboy
PHP
4
07-28-04
11:07 AM
All times are GMT -5. The time now is
04:35 AM
.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
LinkBack
LinkBack URL
About LinkBacks
Bookmark & Share
Digg this Thread!
Add Thread to del.icio.us
Bookmark in Technorati
Share on Facebook
Share on Stumble Upon
Share on Twitter