Category: Mysql

  • How to make like query in pdo mysql?

    , ,

    Hello to all, welcome to therichpost.com. In this post, I will tell you, How to make like query in pdo mysql? PDO means PHP Data Object. PDO is more secure and it is opps based. Here is the working like query in pdo mysql and you can do like this query: <?php //You can define…

    mysql-select-query
  • Laravel custom raw queries example

    , ,

    Hello to all, welcome to the richpost.com. In this post, I will tell you, how to do raw queries in laravel? Laravel is one of the top Mvc php framework. Sometime we do custom queries in simple mysql in core php but In laravel there are some tricky ways to do this. Here is the…

    Laravel 7.2 routing with route group auth guard check with prefix
  • How to change MySQL data in JSON format?

    , ,

    Hello to all, welcome to therichpost.com. In this post, I will tell you How to change MySQL data in JSON format? When we want to send data one page to other page then we can use json formatted data. We will save Mysql data in json format. We can this json formatted data jquery ajax…

    mysql-select-query
  • Mysql query for last 7 days and 30 days

    ,

    Hello to all, welcome to therichpost.com. In this post, I will tell you Mysql query for last 7 days and 30 days. Today in my running project, I made query for getting last 7 days result and last 30 days result. Here is the query code for last 7 days and 30 days: where add_date…

    mysql-select-query
  • Insert query example in mysql using pdo

    , ,

    Hello to all, welcome to therichpost.com. In this post, I will tell you, How to Insert data in mysql using pdo? PDO means PHP Data Object. PDO is more secure and it is opps based. Here is the example code for Insert query example in mysql using pdo: To connect with mysql with pdo, you…

    Php Preg_Match Pattern for Week Days Name
  • How to connect mysql database using pdo?

    , ,

    Hello to all, welcome to therichpost.com. In this post, I will tell you, How to connect mysql database using pdo? PDO means PHP Data Object. PDO is more secure and it is opps based. Here is the example code for connect mysql database using pdo: define(‘DB_SERVER’, ‘localhost’); define(‘DB_USERNAME’, ‘root’); define(‘DB_PASSWORD’, ‘root’); define(‘DB_DATABASE’, ‘testdatabse’); class Connection{…

    Php Preg_Match Pattern for Week Days Name