Radicore Forum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » RADICORE » RADICORE Installation Issues » Fatal Error on Popup
Fatal Error on Popup [message #703] Wed, 21 March 2007 17:02 Go to next message
jzjames is currently offline  jzjames
Messages: 2
Registered: March 2007
Junior Member
I am running through the Radicore tutorial, version 1.22.0, on a Windows XP machine with a local Apache 2.2.4.0 server, PHP 5.2.1, and PostgreSQL 8.2.3. I get a fatal PostgreSQL error whenever I click the popup button in the Add Relationship form, the one that specifies the junior table. Here is the PostgreSQL error message:

Fatal Error: pg_query() [function.pg-query]: Query failed: ERROR: 42703: column "column_count" does not exist at character 272 LOCATION: transformColumnRef, parse_expr.c:403 (# 256).

SQL query: SELECT count(*) FROM dict_table LEFT JOIN dict_column ON (dict_table.database_id=dict_column.database_id AND dict_table.table_id=dict_column.table_id) WHERE dict_table.database_id='test' GROUP BY dict_table.database_id, dict_table.table_id, dict_table.table_desc HAVING column_count > 0

Error in line 295 of file 'C:\Apache2.2\includes\dml.pgsql.class.inc'.

Thinking that there might be an error in my "test" data structure, I tried the same form using the "xample" schema and got the same error.

I couldn't find any mention of this problem in the forum archive or in the "Creating a PostgreSQL Driver.." article.
Re: Fatal Error on Popup [message #704 is a reply to message #703] Wed, 21 March 2007 20:20 Go to previous messageGo to next message
AJM is currently offline  AJM
Messages: 2371
Registered: April 2006
Location: Surrey, UK
Senior Member
You've found one of those circumstances where MySQL is more forgiving than PostgreSQL and Oracle. MySQL will allow the statement:

SELECT ..., count(dict_column.table_id) AS column_count FROM ... HAVING column_count > 0

but both PostgreSQL and Oracle will only accept the following:

SELECT ..., count(dict_column.table_id) AS column_count FROM ... HAVING count(dict_column.table_id) > 0

Attached is an updated file containing this correction.


Re: Fatal Error on Popup [message #705 is a reply to message #704] Wed, 21 March 2007 20:28 Go to previous messageGo to next message
AJM is currently offline  AJM
Messages: 2371
Registered: April 2006
Location: Surrey, UK
Senior Member
You will also need the attached file otherwise a SELECT count(*) ... GROUP BY ... will not return the right row count.

Re: Fatal Error on Popup [message #724 is a reply to message #705] Wed, 28 March 2007 16:24 Go to previous messageGo to next message
jzjames is currently offline  jzjames
Messages: 2
Registered: March 2007
Junior Member
Thank you for your prompt reply. I tried replacing the two files, and it worked. However, I got the same fatal error farther along in the tutorial, when I was generating the PHP script (a). I searched the dict_table.class.inc file and found another instance of column_count in a HAVING clause, on line 119. I changed the string "column_count" to "count(dict_column.table_id)", and the fatal error went away. Was this the right thing to do?
Re: Fatal Error on Popup [message #725 is a reply to message #724] Wed, 28 March 2007 16:43 Go to previous message
AJM is currently offline  AJM
Messages: 2371
Registered: April 2006
Location: Surrey, UK
Senior Member
Yes. I shall make the same fix and include it in the next release.

Previous Topic: Fatal Error after login
Next Topic: Fatal Error: eregi() [function.eregi]: REG_BADRPT (# 1049)
Goto Forum:
  


Current Time: Thu Nov 28 03:23:09 EST 2024

Total time taken to generate the page: 0.01130 seconds