WAP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreWAP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old March 25th, 2005, 12:11 PM
jpixel jpixel is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2005
Posts: 47 jpixel User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 50 m 41 sec
Reputation Power: 4
can anyone see whats wrong with this piece of code?

<cfcontent type="text/vnd.wap.wml"><?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.wapforum.org/DTD/wml_1.1.xml">


<cfquery name="listauction" datasource="#dsn#">
SELECT *
FROM stock
WHERE AuctionCar = 1
</cfquery>

<cfquery name="listfavmake" datasource="#dsn#">
SELECT u.favMake, s.id, s.makeID, s.modelID
FROM
userPref u LEFT JOIN stock s
ON u.favMake=s.makeID

</cfquery>

<wml>


<card title="" id="menu">
<p align="center">
Logged in as <cfoutput>#session.uname#</cfoutput><br/>

</p>
<p>Cars currently available:<br/></p>


<p><cfoutput query="listauction">#id# #makeID# #modelID#<br/></cfoutput></p>
<p><cfoutput query="listfavmake">#s.id#<br/></cfoutput></p>



</card>


</wml>


Basically two SQL queries and two outputs. For some reason it doesn't like the query with the join, when i take it out the page works fine. Are there SQL limitations to WML pages? Because that query works fine on a normal coldfusion page I think...

Reply With Quote
  #2  
Old March 25th, 2005, 01:32 PM
pmcnamee pmcnamee is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Posts: 19 pmcnamee User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 39 m 55 sec
Reputation Power: 0
Send a message via ICQ to pmcnamee
Have you verified the query?

Generally, the syntax for table aliases is
Code:
SELECT u.blah, u.blahblah 
FROM userpref as u...


Does that work?

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreWAP Programming > can anyone see whats wrong with this piece of code?


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 1 hosted by Hostway