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
WBOYOriginal
2016-06-23 13:36:081010browse

这个问题出在哪里??

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;


回复讨论(解决方案)

你的 php 版本低于 5.4

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

好,十分感谢!

Statement:
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