Tag : Query

ItSolutionStuff.com have tutorials for Query tag, here you can study articles of Query tag, Query tag posts collection, most popular and useful tutorials of Query tag, here you can find list of all relevant posts and example about Query tag, we have lists of tutorials and examples about Query tag. very simple and quick example collection of Latest Query tag.




Laravel 5 - whereIn and whereNotIn with subquery example using query builder

Laravel 5 - whereIn and whereNotIn with subquery example using query builder

As you know laravel is very popular php framework in today. So every point will be require for database related and that important. In this post i would like to share with you how to use subquery with whereIn and whereNotIn clause from scratch. We may sometimes require to use select query with wher.....

By Hardik Savani | March 23, 2017 | Category : Laravel MySql

How to get last record from MySQL table in Codeigniter?

How to get last record from MySQL table in Codeigniter?

In this post we are going to learn how to get last single record from MySQl database table using Codeigniter database library. We sometime require to get only single row result in our Codeigniter application. In this post you can see how to get whole last record using Codeigniter db query. Few day .....

By Hardik Savani | March 9, 2017 | Category : MySql Codeigniter


Laravel - How to search with comma separated values using Query Builder ?

Laravel - How to search with comma separated values using Query Builder ?

Sometimes, we require to manage to take single column for multiple integer ids, for example if we have "posts" table and require to set multiple tags on each post, so at that time we can take just single column and store selected tags ids. this way will use less memory. It is simple to store data in.....

By Hardik Savani | March 2, 2017 | Category : Laravel MySql

How to get filename from file path in MySQL?

How to get filename from file path in MySQL?

Sometimes we require to get filenames from path of table column in MySQL. If you are working on PHP then you can simply use basename() pre-define function of code PHP, But in MySQL you can't use basename() in select query. This mysql function you can use in code PHP, PHP framework like laravel, code.....

By Hardik Savani | November 30, 2016 | Category : PHP MySql

How to connect mysql database in node js with example?

How to connect mysql database in node js with example?

Node.js is very popular in Todays for make chat system, real-time notification, real-time developing etc. So, Today, I am going to give you very simple example of How to use MySQL Query in Node JS. If you use node.js then you can see how it is work and there are several driver for different task li.....

By Hardik Savani | September 29, 2016 | Category : MySql Ubuntu Server SQL Node JS

How to get last 2 days records from table using Mysql Query?

How to get last 2 days records from table using Mysql Query?

We may sometimes require to get few days ago records from table like last 2 days, last 3 days, last 10 days or last 15 days etc. Most of developer choose other logic but we can easily get using mysql query(using CURDATE and INTERVAL). In this example mysql query i have one table "elements" and colu.....

By Hardik Savani | July 22, 2016 | Category : PHP MySql

How to get last record of database table in Laravel?

How to get last record of database table in Laravel?

Sometimes we may require to get only last record of table in our project, we can get several way. We can fetch last record of database table using latest() or orderBy(). In bellow example you can see how i get then last record of table. I have "items" table and i want to get last record of "items" .....

By Hardik Savani | July 14, 2016 | Category : Laravel

How to get current year rows using MySql Query PHP?

How to get current year rows using MySql Query PHP?

If you require to get all the records of current year using mysql query. for example you have one table "items" and columns are id, title, description, created_at and update_at, Now you want to get all records of this year. so you can fetch fields value using DATE_SUB and INTERVAL of mysql. In follo.....

By Hardik Savani | June 14, 2016 | Category : MySql

How to calculate age from date of birth column in mysql?

How to calculate age from date of birth column in mysql?

Sometimes, we require to get age from birthdate using mysql select query, we can do it in programming like php,.net and etc framework but if we can do it using mysql query. In bellow example mysql query you can learn how to get age from date field. We can get age value from using mysql DATEDIFF(). S.....

By Hardik Savani | June 1, 2016 | Category : MySql

How to rename column name foreign key constraint in MySql Query?

How to rename column name foreign key constraint in MySql Query?

This is more one post on mysql query, I don't remember exactly time but i had need to change name of foreign key constraint column field. We can rename field name easily if we didn't set foreign key constraint. But if you set foreign key constraint then you can't rename easily. I had rename directly.....

By Hardik Savani | May 4, 2016 | Category : MySql