Bueno ya me voy acercando a que funcione sin problemas.
El que creo yo último problema que tengo es este:
DB Error: Bad SQL Query: SELECT a.image_id, a.cat_id, a.image_name, a.image_active, a.image_thumb_file, b.auth_viewcat, b.auth_viewimage FROM 4images_images a, 4images_categories b WHERE a.image_active=1 AND a.image_id = AND a.cat_id = b.cat_id AND b.auth_viewcat!=9 AND b.auth_viewimage!=9 LIMIT 1
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND a.cat_id = b.cat_id AND b.auth_viewcat!=9 AND b.auth_viewi' at line 5
Me aparece en el index nomas, pero no encuentro donde tengo que cambiar... (creo que debe tener con una modificación que hice para que muestre más imágenes en el index)
está así:
$sql = "SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits".$additional_sql.", c.cat_name".get_user_table_field(", u.", "user_name")."
FROM (".IMAGES_TABLE." i, ".CATEGORIES_TABLE." c)
LEFT JOIN ".USERS_TABLE." u ON (".get_user_table_field("u.", "user_id")." = i.user_id)
WHERE i.image_active = 1 AND c.cat_id = i.cat_id AND i.cat_id IN (".get_auth_cat_sql("auth_viewcat").")
ORDER BY RAND()
LIMIT $num_new_images";
// end new
Recordemos que tengo. MYSQL: 5.0.22 y PHP Version 4.4.4