Quote:
Originally Posted by omardealo
code 2 working good in my cms
try this
PHP Code:
ob_start(); $blog_get = vB::$db->query_read(" SELECT * from blog order by dateline DESC LIMIT 20"); $output_bits = ''; while($blog = vB::$db->fetch_array($blog_get)) { $output_bits .= '<font color="#ff0000"><b>?</b></font><a href="blog.php?b='.$blog[blogid].'">'.$blog[title].'</a></br /> <a href="member.php?u='.$blog[userid].'"><b>'.$blog[username].'</b><br />'; } $output = $output_bits; ob_end_clean();
|
This code still causes a d/b error.
PHP Code:
Database error in vBulletin 4.0.2:
Invalid SQL:
SELECT * from blog order by dateline DESC LIMIT 20;
MySQL Error : Table 'my_database_name.blog' doesn't exist
Error Number : 1146
Request Date : Wednesday, March 31st 2010 @ 03:18:47 PM
Error Date : Wednesday, March 31st 2010 @ 03:18:50 PM
Script : http://antimisandry.com/content/
Referrer : http://antimisandry.com/australian-mens-news/dysfunctional-feminism-strikes-again-29377.html
IP Address : xxxxxxxxxx
Username : xxxxxxxx
Classname : vB_Database
MySQL Version :
For some reason, and I'm no coder so can't say why, it is still trying to look up a table called my_database_name instead of an existing table within the database. It makes no sense.
Whereas previously (using code2) it would ask for a table called "my_database_name.vb" it now asks for a table, which also does not exist, called "my_database_name.blog"