thanks, laserlight
I later found out on the web, that just about what you say is the case regarding NULL.
As any type of column can be declared NULL or NOT NULL
it has to be that NULL fits in most places.
At least for MySQL.
About MySQLi $stmt: prepare-bind_param-execute-bind_result-fetch.
There lots of steps and coding lines between prepare and get result fetched.
I am sure there are situations where prepared Statements are absolutely great.
But most of the time I will use normal methodMySQLi: query-fetch
It works well.
thanks again 🙂
I mark resolved.
<?php
require 'mysqli.php';
$db = new mysqli();
//where name has 'brian'
$like = '%brian%';
$like = $db->real_escape_string($like);
//start
$stmt = $db->prepare("SELECT name,band FROM bands WHERE name LIKE ?");
$stmt->bind_param('s', $like);
$stmt->execute();
$stmt->bind_result($name,$band);
$stmt->fetch();
$stmt->close();
echo $name.' '.$band; // Output: Brian Jones The Rolling Stones
//finished
echo '<br />';
//start
$row = $db->rowObject("SELECT name,band FROM bands WHERE name LIKE '$like'");
echo $row->name.' '.$row->band; // Output: Brian Jones The Rolling Stones
//finished
?>