abc

Share This blog with your friends, so that we can improve more & more . our aim is to easy & simple way of learning.

2/24/2019

MYSQL SELECT UPDATE QUERY & php connect

1) MYSQL Select : - is query use for getting data from  mysql database.
eg: select * FROM abc;  


above statement  get all value from table

using where statement :
select nam, addre from abc where nam ='mayur abc'


above statement use and, or case for conditional statement writing.

select using when statement

SELECT `nam``addre``mobile``city` FROM `abc` WHERE nam  IN ('mayur','mayur kumar')


similarly use update

use update statement

to update one column multiple row use when  statement


PHP CONNECT & INSERT

let us see below example : -
<?php
$con = mysqli_connect('$host','$id','$pass','$database');

if(!$con)
{
echo 'NOT connected';
}
else
{
$q ='insert into abc ('name','address')values('$name','$useaddress')';
$comnd = mysqli_query($con,$q);
if($comnd)
{
echo 'Data sucessfully inserted';
}

}
?>



An Introduction to the Laravel Framework: What It Is and Why You Should Use It

  If you're a PHP developer looking for a modern, efficient, and powerful framework to build web applications, look no further than Lara...