Home > Backend Development > PHP Tutorial > Parse error: syntax error, unexpected '[' in C:AppServwwwgenerate_order.ph

Parse error: syntax error, unexpected '[' in C:AppServwwwgenerate_order.ph

WBOY
Release: 2016-06-23 13:36:08
Original
1008 people have browsed it

这个问题出在哪里??

if (! $dsql->ExecuteNoneQuery ( $inQuery )) {	ShowMsg ( 'Database error!', '-1' );	exit ();}$mid = $dsql->GetOne ( "SELECT * FROM `#@__im_order` WHERE email = '$email' ORDER BY order_id desc" )["order_id"];$OrdId = $mid;
Copy after login


回复讨论(解决方案)

你的 php 版本低于 5.4

改为
$mid = $dsql->GetOne ( "SELECT * FROM `#@__im_order` WHERE email = '$email' ORDER BY order_id desc" );
$OrdId = $mid["order_id"];

好,十分感谢!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template