![]() In this project any person can order drinking water bottle online. For example, the user_id field details of the Users table is returned as follows.In WSMS we use PHP and Mysql database. This information array will be returned as an object which includes properties like table name, field name, field maximum length, primary key flag offset and etc. And, this function also fetches one field per call and needs loop implementation for getting more fields. Unlike the above functions, mysqli_fetch_field() is for getting the MySQL Database table’s field information instead of record data. Obviously, the object properties array and the length array are returned as shown above that could be cross-checked manually to ensure the property value length is correct as expected. So, before calculating the string length, any one of the above MySQL fetch functions need to be invoked.įor example, the following program is to fetch single row data using mysqli_fetch_object() and to print the corresponding length array to the browser. This PHP function is used to return the string length of each column value of the recently fetched row. Or else after object fetch, it would be, user_name For example, if we are required to access user_name, after array fetch, it will be done by, So, the way of accessing these data will also differ. mysqli_fetch_object() returns object whereas mysqli_fetch_assoc() returns array. Mysqli_fetch_object() function will return MySQL data with same structure as returned by mysqli_fetch_assoc(), but its type is different. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |