Re: just installed
Line 58:
$result = $db->query('SHOW TABLE STATUS FROM `'.$db_name.'`') or error('Unable to fetch table status', __FILE__, __LINE__, $db->error());
You are not logged in. Please login or register.
PunBB Forums → PunBB 1.2 bug reports → just installed
Line 58:
$result = $db->query('SHOW TABLE STATUS FROM `'.$db_name.'`') or error('Unable to fetch table status', __FILE__, __LINE__, $db->error());
I've tried running 'SHOW TABLE STATUS FROM 'pnubb'' in PHPMyAdmin and I get the same error. I've tried it on several other databases. Do I need to turn something on in MySQL or is the version wrong? MySQL 3.23.52 - PHP 4.2.3 - Apache 1.3.27
Hmm, very odd. I doubt it's a permissions problem. What dbtype do you have defined in config.php? And what prefix?
I've never seen these quote marks before: FROM `'.$db_name.'`')
the ones outside of '.$db_name.' , I'm on Mac OSX and I'm wondering if I'm translating a windows character incorrectly.
Try removing them :)
$db_type = 'mysql';
$db_prefix = '';
Try adding the following line just above the query on line 64 in index.php:
dump('SELECT c.id AS cid, c.cat_name, f.id AS fid, f.forum_name, f.forum_desc, f.moderators, f.num_topics, f.num_posts, f.last_post, f.last_post_id, f.last_poster, f.closed FROM '.$db->prefix.'categories AS c INNER JOIN '.$db->prefix.'forums AS f ON c.id=f.cat_id'.$extra.' ORDER BY c.position, cid, f.position');
And then paste the results here.
Kennel wrote:
Try removing them
That didn't do anything.
Hmm. I have no idea. I can't see anything wrong with this query:
SELECT c.id AS cid, c.cat_name, f.id AS fid, f.forum_name, f.forum_desc, f.moderators, f.num_topics, f.num_posts, f.last_post, f.last_post_id, f.last_poster, f.closed FROM categories AS c INNER JOIN forums AS f ON c.id=f.cat_id WHERE c.admmod_only!='1' AND f.admmod_only!='1' ORDER BY c.position, cid, f.position
This stinks. I really like your forum and I want to use it. I stayed up all night looking for something on hotscripts.com and nothing fits my needs like yours. I really want to make this work.
what is the purpose of the SHOW TABLE STATUS query? Could it be commented out?
It calculates how many rows and how much space the DB takes up. You can safely comment it out, but if you do, comment out the whole if there.
I'll see what it does
that let me into the admin section
For some reason, my system is not liking 'SHOW TABLE STATUS' and 'INNER JOIN'
Do you know what version mysql you have?
RNilsson wrote:
Do you know what version mysql you have?
3.23.52
MySQL Manual:
You should generally not have any conditions in the ON part that are used to restrict which rows you have in the result set (there are exceptions to this rule). If you want to restrict which rows should be in the result, you have to do this in the WHERE clause.
Note that in versions before Version 3.23.17, the INNER JOIN didn't take a join_condition!
Is this relevant?
I saw that in a previous post now *must get glasses *
I'm using Postgres on my own host (i actually just couldn't get mysql installed properly, so i went with pg istead
The only thing i can think of is if there's some restrictions in privileges or something, otherwise i don't have any suggestions other then to try reinstall.
Kennel,
Was this developed before MySQL 3.23.17? Is there a change in the way the joins work?
I doubt it. Anyway, you're running 3.23.52 (same as this forum), so it shouldn't affect anything.
Edit: And there are no conditions in the ON part that are used to restrict rows.
Try running a few simple JOINs from mysqladmin:
SELECT users.username, posts.poster FROM users INNER JOIN posts ON posts.poster_id=users.id
SELECT u.username, p.poster FROM users AS u INNER JOIN posts AS p ON p.poster_id=u.id
SELECT u.username, p.poster FROM users u INNER JOIN posts p ON p.poster_id=u.id
Kennel wrote:
Try running a few simple JOINs from mysqladmin:
SELECT users.username, posts.poster FROM users INNER JOIN posts ON posts.poster_id=users.id
SELECT u.username, p.poster FROM users AS u INNER JOIN posts AS p ON p.poster_id=u.id
SELECT u.username, p.poster FROM users u INNER JOIN posts p ON p.poster_id=u.id
SQL-query :
SELECT users.username, posts.poster FROM users INNER JOIN posts ON posts.poster_id=users.id LIMIT 0, 30
MySQL said:
You have an error in your SQL syntax near 'ON posts.poster_id=users.id LIMIT 0, 30' at line 1
SQL-query :
SELECT u.username, p.poster FROM users AS u INNER JOIN posts AS p ON p.poster_id=u.id LIMIT 0, 30
MySQL said:
You have an error in your SQL syntax near 'INNER JOIN posts AS p ON p.poster_id=u.id LIMIT 0, 30' at line 1
SQL-query :
SELECT u.username, p.poster FROM users u INNER JOIN posts p ON p.poster_id=u.id LIMIT 0, 30
MySQL said:
You have an error in your SQL syntax near 'INNER JOIN posts p ON p.poster_id=u.id LIMIT 0, 30' at line 1
From ssh session:
SELECT users.username, posts.poster FROM users INNER JOIN posts ON posts.poster_id=users.id
ERROR 1064: You have an error in your SQL syntax near 'ON posts.poster_id=users.id' at line 1
PunBB Forums → PunBB 1.2 bug reports → just installed
Powered by PunBB, supported by Informer Technologies, Inc.