Ask a Question related to Coldfusion - Getting Started, Design and Development.
-
heath_edw #1
query trouble
i'm just getting started here, and am having trouble building queries. after
filling in the information tables, i press the 'ok' button, and this pops up a
wndow that says "Type error: this.node has no properties"
i'm wondering what this means and how i can fix this. i've had the same
trouble while doing the tutorials as well, and had to resort to copy/pasting my
way through...
have i missed filling in something, or would it be related to my database?
heath_edw Guest
-
Trouble with sql query
Hi, I'm sending the follwoing query to mysql from a php script: ... -
query of a query trouble
Every time I try and use a col other then the default I get this error spit back at me ?Query Of Queries runtime error. Table named "getIDs" was... -
Trouble with url variable in query
Hi there, I'm having trouble getting a database query that uses url variables to work. The query is <cfquery Name="Display"... -
Trouble with database query
Hi, THIS (Below) error keeps coming. I'm just trying to make a normal login page. It LOOKS fine to me, I've groomed it for bad spaces and... -
Trouble getting data to my DB from the cfinput tag query
if you simply view the screen shots linked here, http://www.e-nationmusic.com/code_views/insert_data.htm which are at the bottom of the entire code... -
LukeDD #2
query trouble
Hell All,
Never done this before. I want to query a table that looks like the
following:\
tournamentID| Playerid|points
2 1 0
2 2 6
2 3 0
2 4 2
2 5 3
2 6 4
2 7 1
2 8 10
3 1 0
3 2 6
3 3 0
3 4 8
3 5 7
3 6 1
3 7 0
3 8 0
I want to create a query that returns each player id with the total of points
for each playerid. I that possible with sql?
for example playerid 2 should have a total of 12.
Thanks
LukeDD Guest
-
SQLMenace #3
Re: query trouble
select playerid,count(*)
from YourTable
group by playerid
SQLMenace Guest
-
philh #4
Re: query trouble
select sum(points) as playerpoints, playerid
from YourTable
GROUP BY playerid, points
philh Guest
-
thesimplerules@gmail.com #5
Query Trouble
I have this query;
SELECT *
FROM shows, cast, characters, producers, producers_shows
WHERE shows.id = characters.showid
AND cast.id = characters.castid
AND producers_shows.producer = producers.id
LIMIT 0 , 30
It works, except each show is repeated 3 times. Here is an XML dump
from PHPMYADMIN:
<!--
- Database: 'sscake'
-->
<sscake>
<!-- Table shows -->
<shows>
<id>1</id>
<title>Home Improvement</title>
<safe_title>Home+Improvement</safe_title>
<start_year>1991</start_year>
<end_year>1999</end_year>
<type>Multi</type>
<genre>Family</genre>
<id>1</id>
<name>Tim Allen</name>
<safe_name>Tim+Allen</safe_name>
<id>1</id>
<showid>1</showid>
<castid>1</castid>
<name>Tim Taylor</name>
<safename>Tim+Taylor</safename>
<id>1</id>
<name>Carmen Finestra</name>
<safe_name>Carmen+Finestra</safe_name>
<id>1</id>
<show>1</show>
<producer>1</producer>
<role>Creator</role>
</shows>
<shows>
<id>2</id>
<title>Roseanne</title>
<safe_title>Roseanne</safe_title>
<start_year>1988</start_year>
<end_year>1997</end_year>
<type>Multi</type>
<genre>Family</genre>
<id>2</id>
<name>Roseanne</name>
<safe_name>Roseanne</safe_name>
<id>2</id>
<showid>2</showid>
<castid>2</castid>
<name>Roseanne Connor</name>
<safename>Roseanne+Connor</safename>
<id>1</id>
<name>Carmen Finestra</name>
<safe_name>Carmen+Finestra</safe_name>
<id>1</id>
<show>1</show>
<producer>1</producer>
<role>Creator</role>
</shows>
<shows>
<id>1</id>
<title>Home Improvement</title>
<safe_title>Home+Improvement</safe_title>
<start_year>1991</start_year>
<end_year>1999</end_year>
<type>Multi</type>
<genre>Family</genre>
<id>1</id>
<name>Tim Allen</name>
<safe_name>Tim+Allen</safe_name>
<id>1</id>
<showid>1</showid>
<castid>1</castid>
<name>Tim Taylor</name>
<safename>Tim+Taylor</safename>
<id>2</id>
<name>Matt Williams</name>
<safe_name>Matt+Williams</safe_name>
<id>2</id>
<show>1</show>
<producer>2</producer>
<role>Creator</role>
</shows>
<shows>
<id>2</id>
<title>Roseanne</title>
<safe_title>Roseanne</safe_title>
<start_year>1988</start_year>
<end_year>1997</end_year>
<type>Multi</type>
<genre>Family</genre>
<id>2</id>
<name>Roseanne</name>
<safe_name>Roseanne</safe_name>
<id>2</id>
<showid>2</showid>
<castid>2</castid>
<name>Roseanne Connor</name>
<safename>Roseanne+Connor</safename>
<id>2</id>
<name>Matt Williams</name>
<safe_name>Matt+Williams</safe_name>
<id>2</id>
<show>1</show>
<producer>2</producer>
<role>Creator</role>
</shows>
<shows>
<id>1</id>
<title>Home Improvement</title>
<safe_title>Home+Improvement</safe_title>
<start_year>1991</start_year>
<end_year>1999</end_year>
<type>Multi</type>
<genre>Family</genre>
<id>1</id>
<name>Tim Allen</name>
<safe_name>Tim+Allen</safe_name>
<id>1</id>
<showid>1</showid>
<castid>1</castid>
<name>Tim Taylor</name>
<safename>Tim+Taylor</safename>
<id>2</id>
<name>Matt Williams</name>
<safe_name>Matt+Williams</safe_name>
<id>3</id>
<show>2</show>
<producer>2</producer>
<role>Creator</role>
</shows>
<shows>
<id>2</id>
<title>Roseanne</title>
<safe_title>Roseanne</safe_title>
<start_year>1988</start_year>
<end_year>1997</end_year>
<type>Multi</type>
<genre>Family</genre>
<id>2</id>
<name>Roseanne</name>
<safe_name>Roseanne</safe_name>
<id>2</id>
<showid>2</showid>
<castid>2</castid>
<name>Roseanne Connor</name>
<safename>Roseanne+Connor</safename>
<id>2</id>
<name>Matt Williams</name>
<safe_name>Matt+Williams</safe_name>
<id>3</id>
<show>2</show>
<producer>2</producer>
<role>Creator</role>
</shows>
</sscake>
thesimplerules@gmail.com Guest
-
Jerry Stuckle #6
Re: Query Trouble
[email]thesimplerules@gmail.com[/email] wrote:
<xml snipped>> I have this query;
> SELECT *
> FROM shows, cast, characters, producers, producers_shows
> WHERE shows.id = characters.showid
> AND cast.id = characters.castid
> AND producers_shows.producer = producers.id
> LIMIT 0 , 30
>
> It works, except each show is repeated 3 times. Here is an XML dump
> from PHPMYADMIN:
>
Well, for one thing you have the following joins:
shows -> characters
characters -> cast
And
producers_shows -> producers
but there's no join between the
shows->characters->cast and producers->shows
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
[email]jstucklex@attglobal.net[/email]
==================
Jerry Stuckle Guest
-
thesimplerules@gmail.com #7
Re: Query Trouble
Thanks.
I got it to work now, but is there a way to stop the whole row from
repeating.
Say when I have multiple rows in cast, producers of characters:
Right now, I get two rows of show Home Improvement because I added two
producers.
Jerry Stuckle wrote:> [email]thesimplerules@gmail.com[/email] wrote:>> > I have this query;
> > SELECT *
> > FROM shows, cast, characters, producers, producers_shows
> > WHERE shows.id = characters.showid
> > AND cast.id = characters.castid
> > AND producers_shows.producer = producers.id
> > LIMIT 0 , 30
> >
> > It works, except each show is repeated 3 times. Here is an XML dump
> > from PHPMYADMIN:
> >
> <xml snipped>
>
> Well, for one thing you have the following joins:
>
> shows -> characters
> characters -> cast
>
> And
>
> producers_shows -> producers
>
> but there's no join between the
>
> shows->characters->cast and producers->shows
>
>
> --
> ==================
> Remove the "x" from my email address
> Jerry Stuckle
> JDS Computer Training Corp.
> [email]jstucklex@attglobal.net[/email]
> ==================thesimplerules@gmail.com Guest
-
Jerry Stuckle #8
Re: Query Trouble
[email]thesimplerules@gmail.com[/email] wrote:
(top posting fixed)> Jerry Stuckle wrote:
>>>>thesimplerules@gmail.com wrote:
>>>>>>>I have this query;
>>>SELECT *
>>>FROM shows, cast, characters, producers, producers_shows
>>>WHERE shows.id = characters.showid
>>>AND cast.id = characters.castid
>>>AND producers_shows.producer = producers.id
>>>LIMIT 0 , 30
>>>
>>>It works, except each show is repeated 3 times. Here is an XML dump
>>>from PHPMYADMIN:
>>>
>><xml snipped>
>>
>>Well, for one thing you have the following joins:
>>
>> shows -> characters
>> characters -> cast
>>
>> And
>>
>> producers_shows -> producers
>>
>>but there's no join between the
>>
>> shows->characters->cast and producers->shows
>>
>>
>>--
>>==================
>>Remove the "x" from my email address
>>Jerry Stuckle
>>JDS Computer Training Corp.
>>jstucklex@attglobal.net
>>==================
>
> Thanks.
>
> I got it to work now, but is there a way to stop the whole row from
> repeating.
> Say when I have multiple rows in cast, producers of characters:
>
> Right now, I get two rows of show Home Improvement because I added two
> producers.
>
>
>
Well, if you have two different producers, then you have two different
combinations of shows and producers, right? So two rows would be
appropriate.
If you only want one copy of the show, don't include producers in your
search.
P.S. Please don't top post.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
[email]jstucklex@attglobal.net[/email]
==================
Jerry Stuckle Guest
-
thesimplerules@gmail.com #9
Re: Query Trouble
OK.
What does top post mean?
Jerry Stuckle wrote:> [email]thesimplerules@gmail.com[/email] wrote:>> > Jerry Stuckle wrote:
> >> >> >>thesimplerules@gmail.com wrote:
> >>
> >>>I have this query;
> >>>SELECT *
> >>>FROM shows, cast, characters, producers, producers_shows
> >>>WHERE shows.id = characters.showid
> >>>AND cast.id = characters.castid
> >>>AND producers_shows.producer = producers.id
> >>>LIMIT 0 , 30
> >>>
> >>>It works, except each show is repeated 3 times. Here is an XML dump
> >>>from PHPMYADMIN:
> >>>
> >>
> >><xml snipped>
> >>
> >>Well, for one thing you have the following joins:
> >>
> >> shows -> characters
> >> characters -> cast
> >>
> >> And
> >>
> >> producers_shows -> producers
> >>
> >>but there's no join between the
> >>
> >> shows->characters->cast and producers->shows
> >>
> >>
> >>--
> >>==================
> >>Remove the "x" from my email address
> >>Jerry Stuckle
> >>JDS Computer Training Corp.
> >>jstucklex@attglobal.net
> >>==================
> >
> > Thanks.
> >
> > I got it to work now, but is there a way to stop the whole row from
> > repeating.
> > Say when I have multiple rows in cast, producers of characters:
> >
> > Right now, I get two rows of show Home Improvement because I added two
> > producers.
> >
> >
> >
> (top posting fixed)
>
> Well, if you have two different producers, then you have two different
> combinations of shows and producers, right? So two rows would be
> appropriate.
>
> If you only want one copy of the show, don't include producers in your
> search.
>
> P.S. Please don't top post.
>
>
>
> --
> ==================
> Remove the "x" from my email address
> Jerry Stuckle
> JDS Computer Training Corp.
> [email]jstucklex@attglobal.net[/email]
> ==================thesimplerules@gmail.com Guest
-
Jerry Stuckle #10
Re: Query Trouble
[email]thesimplerules@gmail.com[/email] wrote:
(Top post fixed again)> Jerry Stuckle wrote:
>>>>thesimplerules@gmail.com wrote:
>>>>>>>Jerry Stuckle wrote:
>>>
>>>
>>>>thesimplerules@gmail.com wrote:
>>>>
>>>>
>>>>>I have this query;
>>>>>SELECT *
>>>>
>>>>>FROM shows, cast, characters, producers, producers_shows
>>>>
>>>>>WHERE shows.id = characters.showid
>>>>>AND cast.id = characters.castid
>>>>>AND producers_shows.producer = producers.id
>>>>>LIMIT 0 , 30
>>>>>
>>>>>It works, except each show is repeated 3 times. Here is an XML dump
>>>>
>>>>>from PHPMYADMIN:
>>>>
>>>><xml snipped>
>>>>
>>>>Well, for one thing you have the following joins:
>>>>
>>>> shows -> characters
>>>> characters -> cast
>>>>
>>>> And
>>>>
>>>> producers_shows -> producers
>>>>
>>>>but there's no join between the
>>>>
>>>> shows->characters->cast and producers->shows
>>>>
>>>>
>>>>--
>>>>==================
>>>>Remove the "x" from my email address
>>>>Jerry Stuckle
>>>>JDS Computer Training Corp.
>>>>jstucklex@attglobal.net
>>>>==================
>>>
>>>
>> > Thanks.
>> >
>> > I got it to work now, but is there a way to stop the whole row from
>> > repeating.
>> > Say when I have multiple rows in cast, producers of characters:
>> >
>> > Right now, I get two rows of show Home Improvement because I added two
>> > producers.
>> >
>> >
>> >
>>(top posting fixed)
>>
>>Well, if you have two different producers, then you have two different
>>combinations of shows and producers, right? So two rows would be
>>appropriate.
>>
>>If you only want one copy of the show, don't include producers in your
>>search.
>>
>>P.S. Please don't top post.
>>
>>
>>
>>--
>>==================
>>Remove the "x" from my email address
>>Jerry Stuckle
>>JDS Computer Training Corp.
>>jstucklex@attglobal.net
>>==================
>
> OK.
>
> What does top post mean?
> Jerry Stuckle wrote:
>
Top posting is posting your answer before the quote you're responding to
(like you did).
This group uses bottom posting (like this) or interwoven posting, where
your response is mixed in with the rest of the post (generally used when
responding to longer posts).
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
[email]jstucklex@attglobal.net[/email]
==================
Jerry Stuckle Guest



Reply With Quote

