Home » Database » DB_QueryTool » Bug #4613
Table Names Not Quoted
Details
| Submitted | 2005-06-16 19:34 UTC |
|---|---|
| From | mulka at umich dot edu |
| Assigned | quipo |
| Status | Closed |
| Package | DB_QueryTool |
| PHP Version | 4.3.5 |
| Roadmaps | (Not assigned) |
Comments
[2005-06-16 19:34 UTC] mulka at umich dot edu
Description:
------------
Table names appear not to be quoted with ` (the backtick I think it is called.)
This should be an easy fix.
The reason I need it quoted is because I have a table named "Fields" but FIELDS is a reserved word in MySQL and the query that the DB_QueryTool is generating gives me an error when I try to run it.
Reproduce code:
---------------
<?php
require_once "DB/QueryTool.php";
$qt =& new DB_QueryTool();
$qt->setTable('Fields');
print $qt->getQueryString();
?>
Expected result:
----------------
SELECT * FROM `Fields`
Actual result:
--------------
SELECT * FROM Fields
[2005-06-16 19:36 UTC] mulka at umich dot edu
Actually... I think all fields, table names, etc should be quoted in the appropriate syntax.