mysql语句中添加php变量
YouhaveanerrorinyourSQLsyntax;checkthemanualthatcorrespondstoyourMySQLserverversionfo...
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '".$page.",2' at line 1
SELECT Id, state, totalName, property, startTime, amountIn, amountOut, balanceIn, balanceOut FROM contract LIMIT ".$page.",2
以上是问题描述
那句代码是$query = $this->db->query('SELECT Id, state, totalName, property, startTime, amountIn, amountOut, balanceIn, balanceOut FROM contract LIMIT ".$page.",2'); 展开
SELECT Id, state, totalName, property, startTime, amountIn, amountOut, balanceIn, balanceOut FROM contract LIMIT ".$page.",2
以上是问题描述
那句代码是$query = $this->db->query('SELECT Id, state, totalName, property, startTime, amountIn, amountOut, balanceIn, balanceOut FROM contract LIMIT ".$page.",2'); 展开
2个回答
展开全部
一看就是标点符号加错了,试试下面这句
$query = $this->db->query('SELECT Id, state, totalName, property, startTime, amountIn, amountOut, balanceIn, balanceOut FROM contract LIMIT '.$page.',2');
或者
$query = $this->db->query("SELECT Id, state, totalName, property, startTime, amountIn, amountOut, balanceIn, balanceOut FROM contract LIMIT $page,2");
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
TableDI
2024-07-18 广告
2024-07-18 广告
当我们谈到Python与Excel的拆分时,通常指的是使用Python的库来读取Excel文件中的数据,然后根据某种逻辑(如按行、按列、按特定值等)将数据拆分成多个部分或输出到新的Excel文件中。上海悉息信息科技有限公司在处理这类任务时,...
点击进入详情页
本回答由TableDI提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询