27, May 2012
Select AS question - webmaster forum
Navigation
Webdigity Services
Pagerank Monitor
Whois Tool
Web Design Gallery
Webmaster Forums
Webmaster Directory
Tutorials Database
Webmaster Forums
WebDigity Community
Topsites network news ...
Forum Contests
Forum Lounge
New Member Introductions
Tech News
User Forums
aStatSpam forum
Computers
3rd-Party Scripting
Leet Link Directory
The 100 Lists Website ...
Design and Layout
Newbie webmaster
Graphics & Multimedia
Adobe Photoshop
Macromedia Flash & Act...
Web Page Design
HTML & XHTML
CSS
Accesibility issues
Website & Graphic Revi...
Web Development
PhP
ASP & .NET
Java & JSP
Official Java News
JavaScript
XML - XSLT
Databases
MySQL
Security
Web hosting talk
Hosting companies
Domain names
Configuring your server
Apache web server
Marketing your site
CPC programs
Chitika eMiniMalls
CPM programs
Affiliate programs & o...
Web site promotion
Promotion techniques
Search Engine Optimiza...
Google SEO
Promoting & building a...
Marketplace
Advertise your services
Sell your site
Sell a domain name
Request services
Hire people
Link trading requests
[
Home
|
Help
|
Search
|
Forum's Shop
|
Archive
|
Login
|
Register
|
Webmaster Directory
]
Web
www.webdigity.com
Hide the search bar
Whois database search :
Domain :
Use the whois database tool to retrieve information on any top level domain you are interested in.
Webdigity Webmaster Forums
>
Web Development
>
Databases
Topic:
Select AS question
« previous
next »
Pages: [
1
]
Author
Topic: Select AS question (Read 1826 times)
Google dot what?
Posts: 2
16 credits
Members referred : 0
«
on:
Oct 02, 2009, 03:58:51 am »
Hello to All,
I've been trying something like this and it doesn't work:
SELECT *,idcat AS cat,idsubcat AS subcat FROM products WHERE 11 IN (cat) AND 34 IN (subcat) AND active!='no'
This is the error it gives me: Unknown column 'cat' in 'where clause'
Any suggestions would be greatly appreciated!
To give you more details this works:
SELECT * FROM products WHERE FIND_IN_SET('$idcat', idcat) AND FIND_IN_SET('$idsubcat', idsubcat) AND active!='no'
But I've read it can return false positives so that's why I was trying to find a workaround... Any comments?
Thank you!
Andie
I am a metal monkey!
Administrator
Community Supporter
?
Jedai Sword Master
Gender:
Posts: 5799
46391 credits
Members referred : 3
«
Reply #1 on:
Oct 10, 2009, 01:39:23 pm »
The part "WHERE 11 IN (cat)" should be "WHERE cat IN (11)" or even better "WHERE cat = 11"
Trial and Error my two best teachers
Join us @ facebook
or
twitter
Last blog :
Butterfly Marketing 2.0
Google dot what?
Posts: 2
16 credits
Members referred : 0
«
Reply #2 on:
Oct 10, 2009, 03:49:22 pm »
Thanks for the reply, but cat and subcat are comma separated values pulled from the database so I can't do it the way you mention.
Cyberpunk Wannabe
Posts: 38
246 credits
Members referred : 0
«
Reply #3 on:
Nov 05, 2010, 12:36:26 pm »
why not try:
SELECT idcat AS cat && idsubcat AS subcat FROM products WHERE 11 IN (cat) AND 34 IN (subcat) AND active!='no'
i dont know if it'll help.. just sharing my thoughts
I feel pretty...
Posts: 180
1120 credits
Members referred : 0
«
Reply #4 on:
Jan 05, 2011, 09:06:52 am »
What RDMS you are using?? May be you have to search it on Google...
What a dork
Posts: 17
102 credits
Members referred : 0
«
Reply #5 on:
Jan 18, 2011, 05:34:59 pm »
can you please show me the values of table?
My Name is Enigo Montoya
Posts: 32
192 credits
Members referred : 0
«
Reply #6 on:
Apr 24, 2011, 10:17:38 am »
've been trying something like this and it doesn't work:
SELECT *,idcat AS cat,idsubcat AS subcat FROM products WHERE 11 IN (cat) AND 34 IN (subcat) AND active!='no'
This is the error it gives me: Unknown column 'cat' in 'where clause'
Any suggestions would be greatly appreciated!
Novice Spammer
Posts: 102
652 credits
Members referred : 0
«
Reply #7 on:
Dec 26, 2011, 05:44:00 pm »
this is very much nice to have such an important source of information to have...
Trackback URI for this entry :
http://www.webdigity.com/trackback.php?topic=9172
Tags :
mysql
SELECT AS
IN
FIND_IN_SET
Bookmark this thread :
Digg
Del.icio.us
Dzone
more....
Pages: [
1
]
Webdigity Webmaster Forums
>
Web Development
>
Databases
Topic:
Select AS question
« previous
next »
Jump to:
=>Personal Messages
=>My Subscriptions
=>Profile Settings
=>Account Settings
=>Look and Layout Settings
=>Unread Posts
=>Unread Replies To My Posts
=>Affiliate Program
=>Forum's Shop
=>Arcade
Category: WebDigity Community
=> HumanWorks network news & feedback
===> Clickbank Contextual Script Support
=> Forum Contests
=> Forum Lounge
===> New Member Introductions
===> Tech News
===> Google Forum
=> User Forums
Category: Design and Layout
=> General webmaster discussions
=> Graphics & Multimedia
===> Adobe Photoshop
===> Macromedia Flash & Actionscript
=> Web Page Design
===> HTML & XHTML
===> CSS
===> Accesibility issues
=> Website & Graphic Reviews
Category: Web Development
=> PhP
===> PHP classes @finalwebsites.com
=====> Easy PHP Upload
=====> Access_user Class
=====> Validate_fields Class
=====> DB_cart Class
=====> Miscellaneous scripts or snippets
=====> PHP Whois script
=====> 3rd party modifications
===> Php User Class
=> JavaScript
=> Databases
===> MySQL
=> Security
=> Miscellaneous Languages
===> ASP & .NET
===> Java & JSP
=====> Official Java News
Category: Web hosting talk
=> Hosting companies
=> Domain names
=> Configuring your server
===> Apache web server
Category: Monetizing your site
=> General Business
=> CPC programs
===> Adsense
===> Chitika eMiniMalls
=====> Official news from Chitika
=====> Ad placement reviews
=====> eMiniMalls feedback and suggestions
=> CPM programs
=> Affiliate programs & other revenue models
Category: Web site promotion
=> Promotion techniques
=> Search Engine Optimization
===> Google SEO
=> Promoting & building a forum
===> SMF moding & promoting
Category: Marketplace
=> Advertise your services
===> Web Hosting Deals
=> Sell your site
=> Sell a domain name
=> Request services
=> Hire people
=> Link trading requests
User Area
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
May 27, 2012, 08:39:45 pm
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Donate to our community, and get a permanent link back to your site!
Forum Statistics
Total Posts:
62.814
Total Topics:
11.028
Total Members:
21.451
Tutorials
:
58
Resources
:
929
Designs
:
395
Latest Member:
sobbin
127 Guests, 1 User online :
Googlebot
12 users online today:
sobbin
,
Nikolas
,
skbj329
,
w66266507
,
nathan.joshua
,
bizwiz
,
john12
,
champion118
,
asifreza
,
kkajlsimath
,
texas78
,
shahaz
Recent topics
Re: How to
Is the Website Review Secti...
Re: Bing adds features to b...
Re: Google docs, connected ...
Google Chrome Crashes on so...
So.CL Microsoft's new Socia...
Which was your favorite Dis...
Re: Favorite cartoon as a k...
HumanWorks Network
Technology news
Webmaster articles
Sublime web directory
RSS Feed directory and viewer
Web Design Gallery
·
Whois Lookup
·
Pagerank
·
Tag Browsing
·
Lo-fi version
·
Syndication
·
Webmaster forum history
·
Advertise
Developed by
HumanWorks
© 2005 - 2012
Webdigity webmaster community
·
sublime directory
Webdigity Webmaster Forums | Powered by
SMF 1.0.12
. © 2001-2005,
Lewis Media
. All Rights Reserved.