PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Database » DB_QueryTool » Bug #5250

Table Name needed in queries

Details

Submitted2005-08-31 05:19 UTC
Fromquaglieri0607 at hotmail dot com
Assignedquipo
StatusClosed
PackageDB_QueryTool
PHP Version4.4.1
OSWindows
Roadmaps(Not assigned)

Comments

[2005-08-31 05:19 UTC] quaglieri0607 at hotmail dot com

Description:
------------
Hi there,

I am reporting an issue similar to Bug #4613. This can be resolved on my end but maybe worth fixing anyway.

I had a field name that was also the same name as a reserved MySQL command 'group'. Consequently when INsert or Update was performed, the query failed.

Its a quick fix as all is required is to prepend the table name to all fields when performing an add() or update().

Test script:
---------------
N/A

Expected result:
----------------
SUCCESSFUL QUERY = UPDATE auth SET auth.username='70000050',auth.title='Mr.',auth.first_name='Test',auth.surname='testing',auth.email='asdf@asdf.com',auth.contact='',auth.group='12' WHERE auth.username=70000050

Actual result:
--------------
FAILED QUERY = UPDATE auth SET username='70000050',title='Mr.',first_name='Test',surname='testing',email='asdf@asdf.com',contact='',group='12' WHERE username=70000050

[2006-06-29 15:13 UTC] steev at anticulture dot co dot uk

I have this problem as well, was wondering if anyone was tackling this, or should i go ahead and submit code changes for review?

My problem is with the keyword 'long' in MySQL 5

http://dev.mysql.com/doc/refman/5.0/en/reserved-words.html

Happy to hack some code and submit for review.

cheers!