General Programming Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingGeneral Programming Help

Closed Thread
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old September 11th, 2003, 05:13 PM
tankdogg tankdogg is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: Ohio
Posts: 7 tankdogg User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Angry PLEASE HELP!!using 2 php variables im mysql_query

I'm going nuts here. Ok this is what I'm trying to do. I have a page where someone picks from 2 different categories to sort data by. say the topic is food & they pick fruit & then subcategory apples. I'm sending this info to the results page as variables $selection & $type. now fruit would be one of my fields in my table & my code looks like this:

// Request the text
$result = mysql_query("SELECT * FROM test WHERE @selection=@type");
if (!$result) {
echo("<P>Error performing query: " .
mysql_error() . "</P>");
exit();
}

What am I doing wrong. Can I not use 2 variables like that in the select statement? I've tried many variations on this same basic idea. If anyone could please help me to fix this or has another suggestion to get these results I would be eternally grateful. I would be happy to clarify anything or provide any further info needed. Sorry if this is stupid but I'm very new to both php & mysql.

*Duplicate Post... Original Thread: http://www.devarticles.com/forum/sh...=&threadid=4975 *

Last edited by tankdogg : September 11th, 2003 at 05:30 PM.

Reply With Quote
Closed Thread

Viewing: Dev Articles Community ForumsProgrammingGeneral Programming Help > Someone PLEASE..HELP!!!!!


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT