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: 2020-12-10 13:22 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: dharman (profile)
Status: Duplicate Package: PDO MySQL
PHP Version: Irrelevant OS: Windows
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: kanduganesh at gmail dot com
New email:
PHP Version: OS:

 

 [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

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-09-26 21:04 UTC] cmb@php.net
-Package: MySQL related +Package: PDO MySQL
 [2020-12-10 13:22 UTC] dharman@php.net
-Status: Open +Status: Duplicate -Assigned To: +Assigned To: dharman
 [2020-12-10 13:22 UTC] dharman@php.net
Duplicate of https://bugs.php.net/bug.php?id=72416
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 16:01:28 2024 UTC