Answer the question
In order to leave comments, you need to log in
Always writes that there is no such record?
Help please, I use PDO mysql and send a query to the database. If such an entry is found, it will display what was found, if not, it will display what was not found. But nothing works! How to fix ?
$query = $link->query("SELECT * FROM `BetGamesOne` WHERE `tirazh` = '$tirazh'");
$row = $query->rowCount();
if($row > 0)
{
echo "Найдено!";
}
else {
echo "Не найдено!";
}
Answer the question
In order to leave comments, you need to log in
If $tirazh is a variable then
$query = $link->query("SELECT * FROM `BetGamesOne` WHERE `tirazh` = '"+$tirazh+"'");
$row = $query->rowCount();
if($row > 0)
{
echo "Найдено!";
}
else {
echo "Не найдено!";
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question