php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #48426 PDO::exec() never modifies
Submitted: 2009-05-29 06:20 UTC Modified: 2009-05-29 07:02 UTC
From: jengert at gmail dot com Assigned:
Status: Closed Package: Apache2 related
PHP Version: 5.2.9 OS: OS X 10.5
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
15 + 6 = ?
Subscribe to this entry?

 
 [2009-05-29 06:20 UTC] jengert at gmail dot com
Description:
------------
my table looks like this

CREATE TABLE `volunteer` (
  `volunteer_id` integer PRIMARY KEY,
  `origin_id` int(10) NOT NULL,
  `name` varchar(200) NOT NULL,
  UNIQUE (`name`)
);

Works via command line, not through apache (with and w/o entropy)

Reproduce code:
---------------
$db =  new PDO('sqlite:mealdata.sqlite');
$querystring = "INSERT INTO `volunteer` (`origin_id` , `name`) VALUES (3, 'my name')";
$query = $db->exec($querystring);
echo $query;

Expected result:
----------------
1

Actual result:
--------------
0

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-05-29 07:02 UTC] jengert at gmail dot com
permissions set wrong on file
I'm sorry for submitting this!
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 06:01:29 2024 UTC