fetch data from phpmyadmin
//use this for if statements
$sql = "SELECT * FROM table-name WHERE table-column='variable-in-code' "; //sql code
$results = mysqli_query($connection-to-database-variable, $sql); //sends sql code
if(mysqli_num_rows($results) > 0){
$row = mysqli_fetch_assoc($results);
echo $row['column-name'];
}
//check if data is equal to something
if(mysqli_num_rows($results) == $type){
echo text;
}
//use this for while loops
//this will display everything in that column
while($row = mysqli_fetch_array($results)){
echo $row['column-name'];
}
Also in PHP:
- find string php
- date +1 day
- convert dd/mm/yyyy to yyyy-mm-dd in mysql php
- check substring in string php
- check if char exists in string php
- @ dev: `npm run development` npm ERR! Exit status 2 laravel 8
- error_reporting function not working
- clearn route cacje laravel
- browser cache laravel
- Check password match laravel
- acf field without spaces
- console log php variable
- check mail php
- core php redirect to page
- refresh php
- count characters laravel
- create laravel app
- check if result contains something php
- Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) in /var/www/html/system/core/Input.php on line 190
- ci db query error
- $result->result()
- Artisan::call('db:seed', array('--class' => 'YourSeeder Class'));
- console.log php variables $this
- app service provider laravel 191