je comprends......mais je ne fais que subir mon hebergeur.
Je ne pensais pas qu'un subselect dans la clause from puisse poser de problème à une version 3.23
On en apprend tous les jours.
Mais bon, la version 6 est disponible (et nous nous sommes posé la question de mettre la version 5 de MySQL comme minima de PhpWebGallery).
Aujourd'hui, officiellement dans l'équipe nous avons décidé de rester compatible avec la version 4.
8-)
la version de MySql (3.23.58)
ca doit au moins avoir mon age ca!!
il aurait été intéressant de connaitre la version de MySQL quand même....
:-((
bon....ok ....celle la on me l'a deja fait concernant un autre bug manque de chance mon hébergeur ne change pas encore de version.......
merci pour la réponse
Version de MySQL ? Le pb vient de là.
8-(
Bonjour a tous,
j'ai quelques problemes avec certains plug-in.
avec astat:
onglet "Par périodes"
il apparait ceci:
select month as Id, count(id) as NbPages, count(distinct IP) as NbIP, count(image_id) as NbImg, count(distinct category_id) as NbCat , MaxPages, MaxIP, MaxImg from phpwebgallery_history , (select max(n.MaxPages) as MaxPages, max(n.MaxIP) as MaxIP, max(n.MaxImg) as MaxImg
from (select count(id) as MaxPages, count(distinct IP) as MaxIP, count(image_id) as MaxImg
from phpwebgallery_history where year = 2008 group by month ) as n) as n where year = 2008 group by month order by month asc
[mysql error 1064] You have an error in your SQL syntax near '(select max(n.MaxPages) as MaxPages, max(n.MaxIP) as MaxIP, max(n.MaxImg) as Max' at line 1
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/httpd/vhosts/famillerollet.fr/httpdocs/gal/plugins/AStat/admin/AStat_functions.php on line 81
Onglet "Par IP"
j'ai droit a cela:
select SQL_CALC_FOUND_ROWS if(phpwebgallery_history.user_id = 2, IP, if(phpwebgallery_users.username is null, ' [Utilisateur supprimé]', CONCAT(' ', phpwebgallery_users.username))) as IP_USER, count(phpwebgallery_history.id) as NbPages, count(image_id) as NbImg , 0 as MaxPages, 0 as MaxImg from phpwebgallery_history LEFT JOIN phpwebgallery_users ON phpwebgallery_history.user_id = phpwebgallery_users.id , (select max(n.MaxPages) as MaxPages, max(n.MaxImg) as MaxImg
from (select if(phpwebgallery_history.user_id = 2, IP, if(phpwebgallery_users.username is null, '[Utilisateur supprimé]', phpwebgallery_users.username)) as IP_USER, count(phpwebgallery_history.id) as MaxPages, count(image_id) as MaxImg
from phpwebgallery_history LEFT JOIN phpwebgallery_users ON phpwebgallery_history.user_id = phpwebgallery_users.id group by IP_USER ) as n) as n group by IP_USER order by NbPages desc limit 0, 20
[mysql error 1064] You have an error in your SQL syntax near 'if(phpwebgallery_history.user_id = 2, IP, if(phpwebgallery_users.username is nul' at line 1
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/httpd/vhosts/famillerollet.fr/httpdocs/gal/plugins/AStat/admin/AStat_functions.php on line 146
select FOUND_ROWS()
[mysql error 1064] You have an error in your SQL syntax near '()' at line 1
Par catégorie:
select SQL_CALC_FOUND_ROWS category_id, if(category_id > 0, phpwebgallery_categories.name, section) as IdCat,
count(phpwebgallery_history.id) as NbPages, MaxPages.somme, 100*(count(phpwebgallery_history.id)/MaxPages.somme) as PctPages,
count(phpwebgallery_history.image_id) as NbImg, MaxImg.somme, 100*(count(phpwebgallery_history.image_id)/MaxImg.somme) as PctImg, phpwebgallery_categories.nb_images as NbImgCat, (count(phpwebgallery_history.image_id)/phpwebgallery_categories.nb_images) as RatioImg, greatest(100*(count(phpwebgallery_history.id)/MaxPages.somme), 100*(count(phpwebgallery_history.image_id)/MaxImg.somme)) as MaxPct , phpwebgallery_images.path as ThumbPath, phpwebgallery_images.file as ThumbFile, phpwebgallery_images.tn_ext as Extension from (phpwebgallery_history LEFT JOIN phpwebgallery_categories ON phpwebgallery_categories.id = phpwebgallery_history.category_id) LEFT JOIN phpwebgallery_images ON phpwebgallery_categories.representative_picture_id = phpwebgallery_images.id , (select count(id) as somme from phpwebgallery_history) as MaxPages,
(select count(image_id) as somme from phpwebgallery_history) as MaxImg group by category_id, section order by PctImg desc, PctPages desc limit 0, 20
[mysql error 1064] You have an error in your SQL syntax near '(select count(id) as somme from phpwebgallery_history) as MaxPages,
(selec' at line 3
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/httpd/vhosts/famillerollet.fr/httpdocs/gal/plugins/AStat/admin/AStat_functions.php on line 224
select FOUND_ROWS()
[mysql error 1064] You have an error in your SQL syntax near '()' at line 1
Onglet par image:
select SQL_CALC_FOUND_ROWS image_id as ImgId, phpwebgallery_images.name as ImgName,
if(category_id > 0, phpwebgallery_categories.name, section) as CatName,
phpwebgallery_history.category_id as IdCat, count(phpwebgallery_history.image_id) as NbVues,
MaxImg.somme, 100*(count(phpwebgallery_history.image_id)/MaxImg.somme) as PctImg,
phpwebgallery_images.path as ThumbPath, phpwebgallery_images.file as ThumbFile,
MaxImg2.somme as NbVuesMax, phpwebgallery_images.tn_ext as Extension from ((phpwebgallery_history LEFT JOIN phpwebgallery_images ON
phpwebgallery_images.id = phpwebgallery_history.image_id) LEFT JOIN phpwebgallery_categories
ON phpwebgallery_categories.id = phpwebgallery_history.category_id) , (select count(image_id) as somme from phpwebgallery_history where phpwebgallery_history.image_id is not null ) as MaxImg, (select count(image_id) as somme from phpwebgallery_history where phpwebgallery_history.image_id is not null and phpwebgallery_history.image_id is not null group by image_id order by somme desc limit 0,1) as MaxImg2 where phpwebgallery_history.image_id is not null group by image_id, category_id order by CatName asc, ImgName asc, ImgId asc limit 0, 50
[mysql error 1064] You have an error in your SQL syntax near 'as ImgId, phpwebgallery_images.name as ImgName,
if(category_id > 0, phpw' at line 1
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/httpd/vhosts/famillerollet.fr/httpdocs/gal/plugins/AStat/admin/AStat_functions.php on line 301
select FOUND_ROWS()
[mysql error 1064] You have an error in your SQL syntax near '()' at line 1
Que puis je faire? merci d'avance