Altering column size in SQL Server ALTER TABLE table_name ALTER COLUMN column_name datatype; LIKE:: ALTER TABLE `product` MODIFY COLUMN `updatedon` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP …
Read MorePHP
mysql – Split value from one field to two
How to split a single column values to multiple column values? For Example: #Current table Field is like:: Name ———— abcd efgh ijk lmn opq …
Read MoreConvert stdClass object to array in PHP
Convert stdClass object to array in PHP The easiest way is to JSON-encode your object and then decode it back to an array: $array = …
Read Morecodeigniter $this->db->like is case sensitive
There is no case insensitive version of the like function. What you can do is transform both sides of the comparison to lower case, so …
Read Morecodeigniter-file-upload-required-validation
We write for validation:: $this->form_validation->set_rules(‘name’, ‘Name’, ‘trim|required’); $this->form_validation->set_rules(‘code’, ‘Code’, ‘trim|required’); $this->form_validation->set_rules(‘userfile’, ‘Document’, ‘required’); Now have to write like, : $this->form_validation->set_rules(‘name’, ‘Name’, ‘trim|required’); $this->form_validation->set_rules(‘code’, ‘Code’, ‘trim|required’); …
Read MoreHTML Input=“file” Accept Attribute File Type (CSV)
<input id=”fileSelect” type=”file” accept=”.csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel” /> # Selective File types to upload / chosen Valid Accept Types: For CSV files (.csv), use: <input type=”file” …
Read MoreCheck if uploaded file is CSV Format or not in php
$csv_mimetypes = array( ‘text/csv’, ‘text/plain’, ‘application/csv’, ‘text/comma-separated-values’, ‘application/excel’, ‘application/vnd.ms-excel’, ‘application/vnd.msexcel’, …
Read MoreCheck if file is csv type
//File type Checking: $mimes = array(‘application/vnd.ms-excel’,’text/plain’,’text/csv’,’text/tsv’); if(!in_array($_FILES[‘sf_admin_file’][‘type’],$mimes)) { $this->form_validation->set_rules(‘sf_admin_file’, ‘Document’, ‘required’); }
Read MoreWhat is Phar in Php?
Phar archives are similar in concept to Java JAR archives, but are tailored to the needs and to the flexibility of PHP applications. A Phar …
Read Morejson_decode in array php
# json_decode in array php http://php.net/manual/en/function.json-decode.php As per the documentation, you need to specify if you want an associative array instead of an object from json_decode, …
Read More