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 MoreTag: PHP
Convert 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 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 MoreOpen and Close a ul after every 3rd li in php
<!DOCTYPE html> <html lang=”en”> <head> <title>Bootstrap Example</title> <meta charset=”utf-8″> <meta name=”viewport” content=”width=device-width, initial-scale=1″> <link rel=”stylesheet” href=”https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css“> <script src=”https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js“></script> <script …
Read MoreCheck if image exists in folder or not currupted in php
Check if image exists in folder or not currupted in php:: $full_path = Full Image path; (Like: ../dd/tmp.jpg) if(!file_exists($full_path)){ //Image Not Available or …
Read MoreOptimize Images in Google Page Speed
Optimize Images in Google Page Speed:: This rule triggers when PageSpeed Insights detects that the images on the page can be optimized to reduce their …
Read MorePhp- Remove index.php from url in Codeigniter
Php- Remove index.php from url in Codeigniter RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond $1 !^/(index\.php|assets/|humans\.txt) RewriteRule ^(.*)$ index.php?/$1 [L]
Read MorePhp – Remove index.php from url and redirect to https in Codeigniter
Php – Remove index.php from url and redirect to https in Codeigniter:: RewriteEngine on Rewritebase / RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] …
Read More