I'm just editing text on my Mac. My server is FreeBSD. I get a new version of MySQL.
Thanks to everyone for all the help.
You are not logged in. Please login or register.
PunBB Forums → Posts by digimatt
I'm just editing text on my Mac. My server is FreeBSD. I get a new version of MySQL.
Thanks to everyone for all the help.
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
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
Kennel,
Was this developed before MySQL 3.23.17? Is there a change in the way the joins work?
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?
RNilsson wrote:
Do you know what version mysql you have?
3.23.52
For some reason, my system is not liking 'SHOW TABLE STATUS' and 'INNER JOIN'
that let me into the admin section
I'll see what it does
what is the purpose of the SHOW TABLE STATUS query? Could it be commented out?
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.
Kennel wrote:
Try removing them
That didn't do anything.
$db_type = 'mysql';
$db_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.
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
Line 58:
$result = $db->query('SHOW TABLE STATUS FROM `'.$db_name.'`') or error('Unable to fetch table status', __FILE__, __LINE__, $db->error());
admin_index.php gives this error:
An error was encountered
File: /usr/home/quartzsite/public_html/forum/admin_index.php
Line: 58
PunBB reported: Unable to fetch table status
Database reported: You have an error in your SQL syntax near 'TABLE STATUS FROM `punbb`' at line 1 (Errno: 1064)
Line 64:
$result = $db->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 '.$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') or error('Unable to fetch category/forum list', __FILE__, __LINE__, $db->error());
Thanks Kennel. Your code rocks!
Here is what it says:
An error was encountered
File: /usr/home/quartzsite/public_html/forum/index.php
Line: 64
PunBB reported: Unable to fetch category/forum list
Database reported: You have an error in your SQL syntax near 'INNER JOIN forums AS f ON c.id=f.cat_id ORDER BY c.position, cid, f.position' at line 1 (Errno: 1064)
I am now a 'Member'! Wahooooo!!!
I really like this script. I don't want to have to search for another.
fly wrote:
if that doesn't work....i suggest you run around the room screaming and pulling your hair untill it magically comes into your head that you are insane, then call the police so they take you to a big padded room in a small padded box,where you will spend the rest of your days fearing mysql.
Did that too - didn't fix it
did it - same error
PunBB Forums → Posts by digimatt
Powered by PunBB, supported by Informer Technologies, Inc.