1

Topic: Simple sample how to be

It is necessary to make sampling that the goods with the price less than 3000 were deduced, made tables, filled with the goods, specified the prices, and through php I do not know as to deduce this sampling, help if not difficult
p.s: The beginner in a DB
Now produces the such:
Warning: mysqli_num_rows () expects parameter 1 to be mysqli_result, boolean given in A:\denwer\www\denwer\home.php on line 13
The goods are not found!
Here my code

<? php
$connection = mysqli_connect ("localhost", "shop_user", "12345qwerty", "inet_magaz");
if (connection == false)
{
echo ' it was not possible it will be connected to a DB! <br> ';
echo mysqli_connect_error ();
exit ();
}
$result = mysqli_query ($connection, "SELECT * FROM ' products ' WHERE ' price ' <3000");
if (mysqli_num_rows ($result) == 0)
{
echo ' the Goods are not found! ';
} else
{?>
<ul>
<? php
while (($cat = mysqli_fetch_assoc ($result)))
{
echo ' <li> '. $cat [' tittle ']. ' </li> ';
}
?>
</ul>
<? php
}
?>
<? php
mysqli_close ($connection);
?>

2

Re: Simple sample how to be

Vdushkin wrote:

Warning: mysqli_num_rows () expects parameter 1 to be mysqli_result, boolean given in A:\denwer\www\denwer\home.php on line 13

Read attentively error messages and the documentation on used functions.
MySQL here generally at anything.

3

Re: Simple sample how to be

miksoft;
The message is stated about that that by me whether the category was registered not correctly $result = mysqli_query ($connection, "SELECT * FROM ' categories '"); and here that I will not register a place ' categories ' one horse-radish this error

4

Re: Simple sample how to be

Vdushkin , at you in request categories is a string literal. Instead of a table name as you fondly suppose.
Not all inverted commas are equally useful...