Lets take an example that we have two table one have record of students and other have id which have to delete in table 1, so we write query like this:- DELETE FROM table_1 WHERE id IN (SELECT id FROM table_2); Above query will delete all the record from table 1 which have id in […]
No input file specified – Codeigniter issues:- this issue sometimes caused by the .htaccess file, so change your .htaccess file to the below code RewriteEngine onRewriteBase /RewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-dRewriteRule ^(.*)$ index.php?/$1 [L] Also some time this will work in CodeIgniter After adding the above code in the .htaccess file everything will work fine. […]
In this tutorial, you will know how to export a query result in excel CSV from MySQL PHPMyAdmin. Sometime we need to just export the query result in excel or csv for reports purpose or for any purposes, so this will help you out to achieve this. You can use this below query:- The above […]
Sometime while working with function in php, we want to know that how many argument is passing in a function or a variable parameter. For solving this situation we need to count the variable parameter by this function func_num_args() – it will return the number of argument pass to this function. Example:- func_get_args — This […]
Sometimes we need to convert an array into a string with some separator parameter, and also convert a set of comma-separated string into an array, to make this possible PHP has two functions:- Explode Function Implode Function Explode Function:– The explode function split the string in to array. It will break the string in to […]
In this tutorial, we are going to know how to send emails using Sendgrid in PHP. SendGrid is a customer communication platform marketing email. For PHP, SendGrid also provides its library that can be used for calling the SendGrid API. Here is the Step you have to follow for API Setup on SendGrid:- Before using […]
In this tutorial, we are going to learn, how to use JWT in Codeigniter for creating API Authorization token. We will use a JWT Class in CodeIgniter for encoding and decoding. Purpose of Authorization token is to an authorized API call to secure access. JWT:- JSON Web Token proposed in December 2010 for HTTP Authorization headers […]
In this tutorial, we are going to upload an excel file and parse its data and store it in a database by using SimpleXLSX. SimpleXlsx Class Parse and retrieve data from Excel XLSx files, and put them in an array. We are going to show you how to How to upload excel and CSV files […]
In Php, we can create a unique id in PHP using uniqid() function. This is the best way to generate unique id in PHP, However we can say php generate unique id for mysql, php unique id generator anything. Examples For Creating a Unique Id:- 1. //creates a unique id $id = uniqid(); echo $a; echo […]
In this tutorial, We are going to know how can we get the IP address of the client in PHP, IP address is very important for the client that make personalize the experience of a client who is visiting the site. We have $_SERVER super global variable which holds information about headers, paths, and script locations. […]