我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

SQL Server数据库中的空格而不是空字符串

I have this query :

$this->dbSQLServer->select("nom, '' AS prenom")
                  ->from("users");

return $this->dbSQLServer->get()->result_array();

But instead of returning me '' for the prenom, I end up with ' '.

Any ideas where the problem might come from?

Try the Following instead:

$this->dbSQLServer->select("nom, Null AS prenom")
                  ->from("users");

Instead of empty string use Null

近期文章

  • Laravel - 保存动态输入数据和数组
  • paragonie / Halite库默认使用什么加密协议?
  • 使用insertBefore并处理同名XML PHP的几个节点
  • 当PHP中的shell_exec()执行脚本时,Python open()函数不起作用
  • 包含文件的不同路径
  • 为WP REST API中的输出准备Wordpress Post修订版
  • php foreach无法设置对象的数组属性[重复]
  • PHP会话干扰子域会话
  • 在mysql查询上EXISTS查询优化
  • 如何防止PHP做自动轮大浮?
  • Laravel Eloquent和setTable()在关系中
  • 由于hashed_pa​​ssword,Codeigniter URI变得混乱
  • wordpress - 如何noindex插件文件夹,但不阻止它们
  • 如果未分配用户,则阻止对路由项的访问
  • 将多个mysql数据合并为一个字符串并用php显示
  • 如何使用easyui表单提交数据
  • 如何在mysql查询php中获取minprice的id
  • 细胞内的PHP换行删除引用
  • Yii2 - 如果日历已打开,则停止字段验证
  • PHP和MySQL上的Friendsystem

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华