Closed bergie closed 13 years ago
We ran into the "SQL reserved words" problem (#47) when using midgard_query_select.
The php code is:
$q = new midgard_query_select($storage);
$relations = $q->execute();
The error in midgard2.log is:
midgard-core (pid:3074):(WARNING):Execute error - near "from": syntax error
And the referring property in mgdschema is
<property name="from" type="unsigned integer" link="com_meego_package:id" parentfield="from" field="frompackage" />
Fixed.
In MgdSchema there is a way to specify a different database column to be used than name of the property. This is useful when using SQL reserved words for property names (see #47).
Example:
Then doing a query with QB:
Causes a "Invalid query" error.
Same thing happens with QuerySelect.