Hi,
could you enter this in our bug tracker, attaching a small dump with=20
your tables and some sample values?
Marc Delisle
Damon McMahon a =E9crit :
> Greetings,
>=20
> For several versions of PMA and MySQL I have not been able to use the
> export facility to export the result of any query with a SQL function
> - e.g. SUM( ) - it returns error #1064, e.g.:
>=20
> SELECT `account`.`id` AS 'Acct No.', `publication`.`code` AS
> 'Publication', `advorder`.`orderNumber` AS 'Order No.', `businessName`
> AS 'Invoicee', ROUND( SUM( `advbooking`.`quantity` *
> `advbooking`.`rate` * ( 1 - `advbooking`.`discount` /100 ) ) , 2 ) AS
> 'Invoiced ex. GST', ROUND( IFNULL( `payment`.`totalPaid` , 0 ) * ( 100
> / ( IFNULL( `payment`.`taxRate` , 0 ) +100 ) ) , 2 ) AS 'Paid ex.
> GST', ROUND( SUM( `advbooking`.`quantity` * `advbooking`.`rate` * ( 1
> - `advbooking`.`discount` /100 ) ) ) - ROUND( IFNULL(
> `payment`.`totalPaid` , 0 ) * ( 100 / ( IFNULL( `payment`.`taxRate` ,
> 0 ) +100 ) ) , 2 ) AS 'Owing ex. GST'
> FROM `payment`
> RIGHT JOIN `advorder` ON `payment`.`advorder` =3D `advorder`.`id`
> INNER JOIN `advbooking` ON `advorder`.`id` =3D `advbooking`.`advorder`
> LEFT JOIN `account` ON `advorder`.`account` =3D `account`.`id`
> LEFT JOIN `clientContact` ON `account`.`clientContact` =3D `clientConta=
ct`.`id`
> LEFT JOIN `client` ON `clientContact`.`client` =3D `client`.`id`
> LEFT JOIN `publication` ON `advorder`.`publication` =3D `publication`.`=
id`
> WHERE `publication`.`code` =3D 'CODE'
> AND `advbooking`.`issueYear` =3D2006
> GROUP BY `Order No.` , `Acct No.`
> ORDER BY `Invoicee`
> LIMIT 89
>=20
> MySQL said:
> #1064 - You have an error in your SQL syntax; check the manual that
> corresponds to your MySQL server version for the right syntax to use
> near '( SUM ( `advbooking` . `quantity` * `advbooking` . `rate` * ( 1
>=20
> Is this a known issue? I am currently using phpMyAdmin 2.9.0.2 and
> MySQL 4.1.20 on MacOS X 10.3.9.
>=20
> Any advice will be much appreciated.
>=20
> -----------------------------------------------------------------------=
--
> Using Tomcat but need to do more? Need to support web services, securit=
y?
> Get stuff done quickly with pre-integrated technology to make your job =
easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geron=
imo
> http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057&dat=
=3D121642
> _______________________________________________
> Phpmyadmin-users mailing list
> Phpmyadmin-users@...
> https://lists.sourceforge.net/lists/listinfo/phpmyadmin-users
>=20
|