[英]Simple Update Query Not working - MySQL
Here is my Update Query in Laravel 这是我在Laravel中的更新查询
$do = DB::table('pipo_orders')
->where('id', 1)
->update(array('clientcopyimage' => 1));
The Table name is pipo_orders
while i execute the query no change is happening to that particular coloumn. 表名是
pipo_orders
而我执行查询时,该特定列没有任何变化。
Is there any basic mistake in the Query 查询中是否有任何基本错误
If field data type varchar
or enum
then need to quote input value. 如果字段数据类型为
varchar
或enum
则需要引用输入值。
->update(array('clientcopyimage' => "1"));
otherwise Library will behave input value as numeric
. 否则,Library将把输入值视为
numeric
。
Please check your where chain method 请检查您的地方链方法
should have equal sign '=', 应该有等号“ =”,
$do = DB::table('pipo_orders')
->where('id','=',1)
->update(array('clientcopyimage' => 1));
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.