Wiki

Articles tagged with "null", sorted by date (updated)X
Displaying 1-2 of 2 result(s).

REST API and null values in XML

Updated 2 months ago by marko60Tips0 comments – viewed 3,416 times – version 2.0
I have been working on a REST API using the excellent tools provided by Yii2. My problem was that I have to differentiate between empty values and null values. In other words, <elem></elem> is different from null as it represents an empty string. Also, although some use <elem/> to represent a null value it should still be interpreted as an empty string. In other cases, the absence of the element is taken to represent a null value, but this may create problem with some parsers.
tags: REST, XML, null

Getting nulls from database instead of empty strings

Updated 5 years ago by samdarkTips2 comments – viewed 11,757 times – ( +13 ) – version 1.1
To get null from database instead of empty strings you need to set up your DB connection as follows:
tags: database, null