LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > General
User Name
Password
General This forum is for non-technical general discussion which can include both Linux and non-Linux topics. Have fun!

Notices



Reply
 
Search this Thread
Old 12-02-2003, 09:50 PM   #1
bpk
Member
 
Registered: Nov 2003
Location: San Francisco, CA
Distribution: FreeBSD, OpenBSD, Gentoo, OS X
Posts: 80

Rep: Reputation: 15
A Simple MySQL Query Question (I have Bad Syntax)


Im re-new to MySQL (haven't touched it in years) and am trying to display email addressed from a database table who's zip code begins with a "94". The Database is named 'mailinglist' and the table with the data is 'maillist'

So I think something like this would work;

Code:
SELECT `PrimaryEmail` FROM 'maillist' WHERE `PrimaryZip` = '94%'
but thats a negative. I've been checking the MySQL.com docs and haven't found examples of what I need.
 
Old 12-02-2003, 10:04 PM   #2
bpk
Member
 
Registered: Nov 2003
Location: San Francisco, CA
Distribution: FreeBSD, OpenBSD, Gentoo, OS X
Posts: 80

Original Poster
Rep: Reputation: 15
Figured it out. And for archival purposes, here is my solution;

Code:
SELECT PrimaryEmail FROM maillist WHERE PrimaryZip LIKE '94%';
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
simple mysql question belorion Linux - Software 1 11-22-2004 06:45 PM
Simple MySQL Query Help xianzai Programming 3 11-01-2004 06:10 AM
PHP MySQL Query Question vi0lat0r Programming 1 07-15-2004 06:02 AM
mysql syntax question pk21 Linux - General 1 05-18-2004 07:30 AM
Simple MySQL question dfownz Linux - Software 5 05-08-2004 10:16 AM


All times are GMT -5. The time now is 08:02 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration