Hi
I'm using PHP 4.4.1 and MySQL 5.0.16 in localhost (Windows XP SP2).
Now i sent the database to web server, And the SQL statements not correctly on web server.
Note: (Web Server) using MySQL 4.xx
for example i can't use the (inner):
SELECT
posts.post_id,
IF(posts.user_id != -1, users.full_name, posts.poster_name) AS name,
DATE_FORMAT(posts.post_time + INTERVAL 3 HOUR, '%d/%m/%Y %H:%i:%s') AS post_time,
posts.title,
cats.title AS cat_title,
posts.head,
IF(posts.img != NULL && posts.img != '', NULL, posts.img ) AS img,
posts.img_width_thumb,
posts.img_height_thumb,
posts.sum_read,
posts.how_see,
users.user_id
FROM
portal_posts AS posts NATURAL LEFT JOIN portal_users AS users
INNER JOIN portal_categories AS cats USING(cat_id)
WHERE
posts.visibility = 1 && posts.is_accept = 1
&& (lang = 'all' || lang = 'arabic')
ERROR is:
ERROR 1052 (23000): Column 'lang' in where clause is ambiguous
I deleted the lang from where clause but the following error show:
ERROR 1054 (42S22): Unknown column 'portal_portal.users.cat_id' in 'on clause'
I don't know why! The error from MySQL version or from what??
Please help..
Note: It's working in localhost + windows OS + MySQL 5.xx without any error
Thanks