ID:               39906
 Updated by:       [EMAIL PROTECTED]
 Reported By:      iab398 at bham dot ac dot uk
-Status:           Open
+Status:           Bogus
 Bug Type:         SQLite related
 Operating System: Unix
 PHP Version:      5.2.0
 New Comment:

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.




Previous Comments:
------------------------------------------------------------------------

[2006-12-20 16:31:59] iab398 at bham dot ac dot uk

Description:
------------
Example within a PHP context:

/* using sqlite 3 database SQLLDB is a define() path to the database
location elsewhere */

if (!($db = new PDO('sqlite:' . SQLLDB))) {

        $error = $db->errorInfo();

        die($error[2]);

}

/* the direction in which to order the query */

$direction = "ASC";

$query = $db->prepare('SELECT * FROM table_name ORDER BY value :dir');

$query->bindParam(':dir', $direction, PDO::PARAM_STR, 4);

$query->execute();

Here, a error stating that the prepare() failed occurs due to acting on
a non-object. Would it be possible to maybe allow place holders for
actual parts of the SQL query, rather than just values?

Cheers

Reproduce code:
---------------
as above.

Expected result:
----------------
for the data to be retrieved from the database and ordered either ASC
or DESC according to the value of $direction

Actual result:
--------------
PDO/SQLite error. As above.


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=39906&edit=1

Reply via email to