PHP MySQL Integration (Step 2)
1 min readDec 18, 2018
Lets run MySQL Queries on PHP codes
- Making a Connection ( step 1 )
- This Article ( step 2 )
Prerequisites
- PHP MySQL Connection ( Described in STEP 1 Article )
- MySQL Database with few/more data ( read my get strated with MYSQL CLI Article )
Movies Table structure
PHP CODE to select all (*) from movies table
Use fetch_assoc() instead of fetch_object() to hold your SQL result in a associative Array, As shown below
References
http://php.net/manual/en/mysqli.query.php