* Vladimir Stavrinov <[EMAIL PROTECTED]> [2006-01-18 11:13:24 +0300]:

Hi Vladimir,

> mantis is incompatible with mysql-server-5.0. The POST
> /mantis/bug_update.php return:
> 
> APPLICATION ERROR #401
> 
> Database query failed. Error received from database was #1054: Unknown
> column 'p.field_id' in 'on clause' for the query: SELECT f.name, f.type,
> f.access_level_r, f.default_value, f.type, s.value
> FROM mantis_custom_field_project_table AS p, mantis_custom_field_table
> AS f
> LEFT JOIN mantis_custom_field_string_table AS s
> ON p.field_id=s.field_id AND s.bug_id='29'
> WHERE p.project_id = '1' AND p.field_id = f.id
> ORDER BY p.sequence ASC, f.name ASC

Ok, could you try this patch and say me that it fixes the bug in your case ?

Cheers.
-- 
Igor Genibel
«Non bene pro toto libertas venditur auro»
Freedom is not sold for all the gold in the world.
Dubrovnik motto
--- mantis-0.19.4.orig/core/custom_field_api.php
+++ mantis-0.19.4/core/custom_field_api.php
@@ -751,10 +751,10 @@
                        $t_custom_field_string_table  = config_get( 
'mantis_custom_field_string_table' );
 
                        $query = "SELECT f.name, f.type, f.access_level_r, 
f.default_value, f.type, s.value
-                                       FROM $t_custom_field_project_table AS 
p, $t_custom_field_table AS f
+                                       FROM $t_custom_field_project_table AS p 
INNER JOIN $t_custom_field_table AS f ON p.field_id = f.id
                                        LEFT JOIN $t_custom_field_string_table 
AS s
-                                               ON  p.field_id=s.field_id AND 
s.bug_id='$c_bug_id'
-                                       WHERE   p.project_id = '$c_project_id' 
AND p.field_id = f.id
+                                               ON p.field_id=s.field_id AND 
s.bug_id='$c_bug_id'
+                                       WHERE p.project_id = '$c_project_id'
                                        ORDER BY p.sequence ASC, f.name ASC";
 
                        $result = db_query( $query );
@@ -1186,4 +1186,4 @@
                return $p_value;
        }
        
-?>
\ No newline at end of file
+?>

Attachment: pgpEmh9gwcD3A.pgp
Description: PGP signature

Reply via email to