I went through tutorial on this site...
http://net.tutsplus.com/tutorials/php/h ... ment-83258
It doesn't work for me I get errors.
I get errors…..
Warning: mysqli_query() expects at least 2 parameters, 1 given in /home/a6964267/public_html/Template/SimpleBlog/includes/includes.php on line 20
line 20 is…….
$query = mysqli_query(”SELECT * FROM blog_posts ORDER BY id DESC”);
Warning: mysqli_fetch_assoc() expects parameter 1 to be mysqli_result, null given in /home/a6964267/public_html/Template/SimpleBlog/includes/includes.php on line 24
line 24 isss….
while ($row = mysqli_fetch_assoc($query))
any help or suggestions?
Also another question posted.....link here...
viewtopic.php?f=1&t=103526
building basic blog and getting errors
Moderator: General Moderators
- superdezign
- DevNet Master
- Posts: 4135
- Joined: Sat Jan 20, 2007 11:06 pm
Re: building basic blog and getting errors
mysqli_query requires a mysqli object as the first parameter. This means that your variable $query will not be a mysqli_result object since mysqli_query() never successfully executes.
Re: building basic blog and getting errors
hmmmm ok I am tired now, but I will look at code again tomorrow. Thanks! 