I am attempting to execute the following query:

```
$query = "SELECT O. * AS NUM FROM (ab_order O)
    LEFT JOIN ab_user U ON (O.id_user=U.id)
    WHERE O.id IN ( SELECT OT.id_ab_order FROM ab_order_transaction OT
        LEFT JOIN ab_transaction T ON (OT.id_ab_transaction = T.id)
    LEFT JOIN ab_user U ON (T.id_user = U.id) 
    WHERE T.validated = 1 {$condTrans} ) {$condOrder}
    ORDER BY {$orderCol} LIMIT $from, $numRecords ";
$queryDB = $DB->queryExec($query);

```

On the live server:

* it works with MySql version 3.3.10.
* PHP version 5.2.17.

But I need to use localhost:

* XAMPP for linux, v. 1.7.7
* PHP 5.3.8
* MySql version 5.5.16.

On localhost it says: 

```
MySQL error: 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 'AS NUM
FROM (ab_order O)
LEFT JOIN ab_u' at line 1.

```

Is any easier way then uprgrade the live server Mysql database?