Webmaster Forum Rules | Posting Guide | Contact Us | Testimonials | Contributing Geek Program | Advertise on Geek/Talk
Welcome to the GeekTalk Webmaster Discussion Forums from GeekVillage.com

Click Here To Register. It's Free!

Go Back   geek/talk: Web publishing business discussion > YOUR CREATION: Building & Maintaining A Web Site > Web Development - Programming / Coding
User Name
Register FAQ Calendar Search Today's Posts Mark Forums Read

Thread Tools Search this Thread Display Modes
Old 09-30-2001, 11:27 AM   #1
Registered User
pk's Avatar
Join Date: Nov 2000
Location: Toronto, Ontario
Posts: 209
Default mysql HELP!


How can i combine these 2 statements into one?

PHP Code:
select linkID from linkcat where cat='cars'
this will give me this
|12 |
|1 |

PHP Code:
select title from links where linkID=12
will give me
|great cars|

can i combine those 2 statements? so that i will select all titles where cat='cars'?

I tried this
PHP Code:
select links.title from linkcat,links where linkcat.cat='cars'
but it didn't work. It just showed me all records
pk is offline   Reply With Quote
Old 10-01-2001, 01:58 AM   #2
Registered User
Join Date: Aug 2001
Posts: 53

Not sure of your table structure but based on what you wrote you might try something like the following ...

SELECT linkcat.linkID, links.title FROM linkcat, links WHERE linkcat.linkID = links.linkID AND linkcat.cat = 'cars';
JohnKelly is offline   Reply With Quote


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
MySQL installation problems. b2gdotcom Web Development - Programming / Coding 3 11-29-2001 04:00 AM
Tip for heavy MySQL users: CREATE INDEX demae Web Hosting Discussion 4 05-15-2001 04:32 PM
vBullletin - Corrupted MySQL records! Steve_S Web Design and Webmaster Issues 5 02-07-2001 12:44 AM
mysql overload? notibrian Web Design and Webmaster Issues 0 02-01-2001 09:03 PM
mysql help kris Web Design and Webmaster Issues 3 01-01-2001 07:18 PM

Please support our advertisers. They ensure our survival.

All times are GMT -5. The time now is 03:54 PM.

GeekVillage.com is copyright © 1998-2015 Curiosity Cave - Science gifts for clever kids. All rights reserved.
Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.