i have a query thats uses a userid to get items out of a db that have a matching userID
and i need to run another query thats uses those numbers to get descriptions outta another table
the basic query is this
SELECT cardID
FROM userscards
WHERE usersID =
the other tables is called "tblcar
dave.
What database are you using?
try..
SELECT usercards.cardID, tblcards.cardID
WHERE usercards.cardID =
cfsqltype="cf_sql_integer">
AND usercards.cardID = tblcards.cardID
Ricardo.
On Fri, 15 Oct 2004 02:09:15 -0400, dave <[EMAIL PROTECTED]> wrote:
> i have a query thats uses a userid to ge
returned
something:
SELECT c.whatever, c.somethingelse, c.cardID
FROM tblcards c
WHERE c.cardID IN (
cfsqltype="cf_sql_integer" list="yes">)
Pascal
> -Original Message-
> From: dave [mailto:[EMAIL PROTECTED]
> Sent: 15 October 2004 08:09
> To: CF-Talk
> Su
i love it when i make it more complicated then it really iz lol
using mysql, its close but i get this error
Error Executing Database Query.
Syntax error or access violation: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax
i think the killer here is that this usercards.cardID = tblcards.cardID could be 1 record or 7000, so maybe have to loop it or maybe qoq
-- Original Message --
From: Ricardo Russon <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Date: Fri, 15 Oct 2004 16:24
i been working since 9am (now 1am) so my train of thought is on the booty call i shoulda went and got, lol dammit!
ok, here i'll try and explain better
1st i invoke a cfc (heres the meat of it) this gets the logged in usersname and gives me their userid.
SELECT userID
FROM users
WHER
7000 records still is peanuts, ... if ... you correctly add indexes and
set the primary keys and relationships. I also execute queries with such
amounts of records and they still execute beneath the 10 ms. If I hadn't
added database functionality I would to have to sit and wait.
Micha Schopman
Have you tried analyzing the execution plan yet (if you are using SQL
Server?) to see where the bottlenecks are?
Micha Schopman
Software Engineer
Modern Media, Databankweg 12 M, 3821 AL Amersfoort
Tel 033-4535377, Fax 033-4535388
KvK Amersfoort 39081679, Rabo 39.48.05.380
[Todays Threads]
[
You are missing the FROM clause
> -Original Message-
> From: dave [mailto:[EMAIL PROTECTED]
> Sent: 15 October 2004 08:35
> To: CF-Talk
> Subject: Re: late night query ?
>
> i love it when i make it more complicated then it really iz lol
>
> using mysql, its
sorry but that completely doesnt help
like i said its mysql, i dont use any m$ crap
this isnt even mine just helping, well trying to help
-- Original Message --
From: "Micha Schopman" <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Date: Fri, 15 Oct 2004 0
I've been working since 9am too.
Pascal
PS Of course, here it's only 10am ;)
> -Original Message-
> From: dave [mailto:[EMAIL PROTECTED]
> Sent: 15 October 2004 09:10
> To: CF-Talk
> Subject: RE: late night query ?
>
> i been working since 9am (now 1am) s
lol
-- Original Message --
From: "Pascal Peters" <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Date: Fri, 15 Oct 2004 10:05:48 +0200
>I've been working since 9am too.
>
>Pascal
>
>PS Of course, here it's only 10am ;)
>
>
[Todays Threads]
[This Message
What have you tried.. ? .. what have you indexed? .. have you checked
your primary keys .. etc.. ?
Micha Schopman
Software Engineer
Modern Media, Databankweg 12 M, 3821 AL Amersfoort
Tel 033-4535377, Fax 033-4535388
KvK Amersfoort 39081679, Rabo 39.48.05.380
[Todays Threads]
[This Messag
ing the FROM clause
>
>> -Original Message-
>> From: dave [mailto:[EMAIL PROTECTED]
>> Sent: 15 October 2004 08:35
>> To: CF-Talk
>> Subject: Re: late night query ?
>>
>> i love it when i make it more complicated then it really iz lol
>>
>>
this was the answer
the from statements usually does help eh! and of course naming the db tables correctly
SELECT *
FROM userscards, tblcards
WHERE userscards.usersID = '#qgetUser.userID#'
AND userscards.cardID = tblcards.CardID
thanks guys
[Todays Threads]
[This Message]
[Subscription]
15 matches
Mail list logo