phpgroupware-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SV: [Phpgroupware-developers] Re: sitemgr - mssql bugs


From: Sigurd Nes
Subject: SV: [Phpgroupware-developers] Re: sitemgr - mssql bugs
Date: Wed, 29 Jan 2003 09:44:58 +0100

> 
> "Sigurd Nes" <address@hidden> a écrit:
> 
> > 3)
> > I suspect there are some things fishy about the join statements in
the
> > function 'getallblocksforarea' in class.Content_SO.inc.php(63)
> >
> > I think it should be altered to (assuming 'view' is altered to
> > 'viewable'):
> >
> > $sql = "SELECT t1.block_id, area, cat_id, page_id, t1.module_id,
> > app_name, module_name, arguments, arguments_lang, sort_order, title,
> > viewable, actif"
> > . " FROM phpgw_sitemgr_content AS t1 LEFT JOIN "
> > . " phpgw_sitemgr_modules AS t2 on t1.module_id=t2.module_id LEFT
JOIN "
> > . " phpgw_sitemgr_content_lang as t3 ON (t1.block_id=t3.block_id AND
> > lang='$lang') "
> > . " WHERE area = '$area' AND ((page_id = 0 and cat_id = 0)";
> 
> I tested your proposal on mySQL and it seems to work. But I'd like to
> know what you think is wrong with the current SQL statement. It uses
> two different ways to join tables, which both work, and can be
> combined in MySQL. It is the combination of both that does not work in
> MsSQL?
> 
> Michael
> 
When running the original directly on the server - it does in fact work
fine - but running through php - it halts with complaining that the
column prefix 't1' does not match with a table name or alias (which it
should...)

When comparing the two alternatives in "visual mode" they are slightly
different - although they both produce the same result - see
attachments.

Sigurd

Attachment: modified.png
Description: PNG image

Attachment: original.png
Description: PNG image


reply via email to

[Prev in Thread] Current Thread [Next in Thread]