php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #74769 PDO Related
Submitted: 2017-06-17 06:04 UTC Modified: 2017-09-26 21:04 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: kanduganesh at gmail dot com Assigned:
Status: Open Package: PDO MySQL
PHP Version: Irrelevant OS: Windows
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2017-06-17 06:04 UTC] kanduganesh at gmail dot com
Description:
------------
PHP version 5.6

i am trying to get last 25 row in acceding order from msgs table working in mysql and phpmyadmin but getting error using mysql pdo

Test script:
---------------


$sql = '(SELECT `id`,`msg`,`time`,`sender_id`,`mid` from msgs WHERE mid > 0 and `grp_id` = :grp_id2 ORDER BY id DESC limit 25) ORDER BY id ASC';

$sql_array = array(
	'grp_id2' => $grp_id,
	'user' => $data['user']['id'],
	'grp_id' => $grp_id
);
$stmt = $data['pdo']->prepare($sql);
$stmt->execute($sql_array);



Expected result:
----------------
selected columns of table which is working in mysql and phpmyadmin

Actual result:
--------------
output

Warning: PDO::prepare(): Unknown type 17 sent by the server. Please send a report to the developers in msgs.php on line 174
Fatal error: Call to a member function execute() on boolean in msgs.php on line 176

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-09-26 21:04 UTC] cmb@php.net
-Package: MySQL related +Package: PDO MySQL
 
PHP Copyright © 2001-2018 The PHP Group
All rights reserved.
Last updated: Wed Nov 14 15:01:27 2018 UTC