timlauer
Posts: 12
|
| Posted: 05/28/2005, 4:52 PM |
|
Hi there,
I have several tables which are linked to each other. Updating works fine but not the display. I know that the section of the " open Method" contains the SQL result instruction. I can write the sql command on its own and it works but not in this codesection. Not all fields are linked, the other fields contain real values in form of text.
I have an working example which does not make any sense to me because it shows the id form table1 and equals it in table 2 without refering to the value behind the id. The result should be the same. It is the same but it works in this table and returns the text of it.
This example is:
$this->CountSQL = "SELECT COUNT(*) " .
"FROM ((((((((bcnode INNER JOIN company ON bcnode.Company_ID = company.CompanyID) INNER JON esipip ON bcnode.EsipIP = esipip.ID) INNER JOIN dfc ON bcnode.DFCID = dfc.DFC_ID) INNER JOIN pages ON bcnode.Pageno = pages.Pageno) INNER JOIN inclips ON bcnode.INclips = inclips.ID) INNER JOIN hardware ON bcnode.Hardware = hardware.Hardware_ID) INNER JOIN comportout ON bcnode.Comportout = comportout.ID) INNER JOIN comportin ON bcnode.Comportin = comportin.ID) INNER JOIN outclips ON bcnode.Outclips = outclips.ID";
$this->SQL = "SELECT * " .
"FROM ((((((((bcnode INNER JOIN company ON bcnode.Company_ID = company.CompanyID) INNER JOIN esipip ON bcnode.EsipIP = esipip.ID) INNER JOIN dfc ON bcnode.DFCID = dfc.DFC_ID) INNER JOIN pages ON bcnode.Pageno = pages.Pageno) INNER JOIN inclips ON bcnode.INclips = inclips.ID) INNER JOIN hardware ON bcnode.Hardware = hardware.Hardware_ID) INNER JOIN comportout ON bcnode.Comportout = comportout.ID) INNER JOIN comportin ON bcnode.Comportin = comportin.ID) INNER JOIN outclips ON bcnode.Outclips = outclips.ID";
I did replicate it in another table but the query did show already that it returns it only as id value on the MySql command line as number and not as text. If I change the query in that way that the result shows the country name, then it does not work in CCS.
The working example with out any change of the result:
$this->CountSQL = "SELECT COUNT(*) " .
"FROM town INNER JOIN countries on countries.CountriesID=town.Id";
$this->SQL = "SELECT * ".
"FROM town INNER JOIN countries on countries.CountriesID=town.Id";
The text value I want to see is behind countries.country.
the correct value is behind this query:
Select countries.country
From town Inner Join countries ON town.Country_ID = countries.CountriesID;
Maybe there is an easier way to edit this section via the properties menu.
Any help would be very much appretiated.
Tom
|
 |
 |
peterr
Posts: 5971
|
| Posted: 05/28/2005, 5:39 PM |
|
Tom,
Sorry, I couldn't understand what doesn't work for you, or why you are trying to make SQL changes in the code.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
 |
 |
timlauer
Posts: 12
|
| Posted: 05/28/2005, 6:12 PM |
|
Quote timlauer:
Hi there,
I have several tables which are linked to each other. Updating works fine but not the display. I know that the section of the " open Method" contains the SQL result instruction. I can write the sql command on its own and it works but not in this codesection. Not all fields are linked, the other fields contain real values in form of text.
I have an working example which does not make any sense to me because it shows the id form table1 and equals it in table 2 without refering to the value behind the id. The result should be the same. It is the same but it works in this table and returns the text of it.
This example is:
$this->CountSQL = "SELECT COUNT(*) " .
"FROM ((((((((bcnode INNER JOIN company ON bcnode.Company_ID = company.CompanyID) INNER JON esipip ON bcnode.EsipIP = esipip.ID) INNER JOIN dfc ON bcnode.DFCID = dfc.DFC_ID) INNER JOIN pages ON bcnode.Pageno = pages.Pageno) INNER JOIN inclips ON bcnode.INclips = inclips.ID) INNER JOIN hardware ON bcnode.Hardware = hardware.Hardware_ID) INNER JOIN comportout ON bcnode.Comportout = comportout.ID) INNER JOIN comportin ON bcnode.Comportin = comportin.ID) INNER JOIN outclips ON bcnode.Outclips = outclips.ID";
$this->SQL = "SELECT * " .
"FROM ((((((((bcnode INNER JOIN company ON bcnode.Company_ID = company.CompanyID) INNER JOIN esipip ON bcnode.EsipIP = esipip.ID) INNER JOIN dfc ON bcnode.DFCID = dfc.DFC_ID) INNER JOIN pages ON bcnode.Pageno = pages.Pageno) INNER JOIN inclips ON bcnode.INclips = inclips.ID) INNER JOIN hardware ON bcnode.Hardware = hardware.Hardware_ID) INNER JOIN comportout ON bcnode.Comportout = comportout.ID) INNER JOIN comportin ON bcnode.Comportin = comportin.ID) INNER JOIN outclips ON bcnode.Outclips = outclips.ID";
I did replicate it in another table but the query did show already that it returns it only as id value on the MySql command line as number and not as text. If I change the query in that way that the result shows the country name, then it does not work in CCS.
The working example with out any change of the result:
$this->CountSQL = "SELECT COUNT(*) " .
"FROM town INNER JOIN countries on countries.CountriesID=town.Id";
$this->SQL = "SELECT * ".
"FROM town INNER JOIN countries on countries.CountriesID=town.Id";
The text value I want to see is behind countries.country.
the correct value is behind this query:
Select countries.country
From town Inner Join countries ON town.Country_ID = countries.CountriesID;
Maybe there is an easier way to edit this section via the properties menu.
Any help would be very much appretiated.
Tom
P.S. I fixed it. You can ignore it.
cheers,
Tom
|
 |
 |
|