Error
Database query error
Query:
SELECT `sharePhotoFiles`.`medID` as `medID`, `sharePhotoFiles`.`medProfId` as `medProfId`, `sharePhotoFiles`.`medTitle` as `medTitle`, `sharePhotoFiles`.`medUri` as `medUri`, `sharePhotoFiles`.`medDate` as `medDate`, `sharePhotoFiles`.`medViews` as `medViews`, `sharePhotoFiles`.`medExt` as `medExt`, `Profiles`.`NickName` ,gphoto_rating.`gal_rating_count` as `voting_count`, (gphoto_rating.`gal_rating_sum` / gphoto_rating.`gal_rating_count`) AS `voting_rate` FROM `sharePhotoFiles` LEFT JOIN `Profiles` ON `Profiles`.`ID` = `sharePhotoFiles`.medProfId LEFT JOIN gphoto_rating ON (gphoto_rating.`gal_id` = `sharePhotoFiles`.`medID`) WHERE 1 AND `Approved`= 'true' ORDER BY `voting_rate` DESC, `voting_count` DESC, `medDate` DESC LIMIT 0, 10
Mysql error:
Table './db1129477@002dscooterv2/Profiles' is marked as crashed and last (automatic?) repair failed
Found error in file /is/htdocs/wp1129477_VV1CGJ1O8C/www/scooterv/inc/classes/BxDolSharedMedia.php
at line 553. Called db_res function with erroneous argument #0

Debug backtrace:
Array
(
    [1] => Array
        (
            [file] => /is/htdocs/wp1129477_VV1CGJ1O8C/www/scooterv/inc/classes/BxDolSharedMedia.php
            [line] => 553
            [function] => db_res
            [args] => Array
                (
                    [0] => SELECT `sharePhotoFiles`.`medID` as `medID`, `sharePhotoFiles`.`medProfId` as `medProfId`, `sharePhotoFiles`.`medTitle` as `medTitle`, `sharePhotoFiles`.`medUri` as `medUri`, `sharePhotoFiles`.`medDate` as `medDate`, `sharePhotoFiles`.`medViews` as `medViews`, `sharePhotoFiles`.`medExt` as `medExt`, `Profiles`.`NickName` ,gphoto_rating.`gal_rating_count` as `voting_count`, (gphoto_rating.`gal_rating_sum` / gphoto_rating.`gal_rating_count`) AS `voting_rate`  FROM `sharePhotoFiles` LEFT JOIN `Profiles` ON `Profiles`.`ID` = `sharePhotoFiles`.medProfId  LEFT JOIN gphoto_rating ON (gphoto_rating.`gal_id` = `sharePhotoFiles`.`medID`)  WHERE 1 AND `Approved`= 'true' ORDER BY `voting_rate` DESC, `voting_count` DESC, `medDate` DESC LIMIT 0, 10
                )

        )

    [2] => Array
        (
            [file] => /is/htdocs/wp1129477_VV1CGJ1O8C/www/scooterv/browsePhoto.php
            [line] => 52
            [function] => getFilesList
            [class] => BxDolSharedMedia
            [type] => ->
            [object] => BxDolSharedMedia Object
                (
                    [sType] => photo
                    [sCssName] => viewPhoto.css
                    [iViewer] => 0
                    [sViewerPass] => 
                    [aConfigDir] => Array
                        (
                            [root] => /is/htdocs/wp1129477_VV1CGJ1O8C/www//scooterv/
                            [inc] => /is/htdocs/wp1129477_VV1CGJ1O8C/www//scooterv/inc/
                            [profileImage] => /is/htdocs/wp1129477_VV1CGJ1O8C/www//scooterv/media/images/profile/
                            [profileBackground] => /is/htdocs/wp1129477_VV1CGJ1O8C/www//scooterv/media/images/profile_bg/
                            [profileSound] => /is/htdocs/wp1129477_VV1CGJ1O8C/www//scooterv/media/sound/
                            [profileVideo] => /is/htdocs/wp1129477_VV1CGJ1O8C/www//scooterv/media/video/
                            [sharingImages] => /is/htdocs/wp1129477_VV1CGJ1O8C/www//scooterv/media/images/sharingImages/
                            [mediaImages] => /is/htdocs/wp1129477_VV1CGJ1O8C/www//scooterv/media/images/
                            [gallery] => /is/htdocs/wp1129477_VV1CGJ1O8C/www//scooterv/media/images/gallery/
                            [flags] => /is/htdocs/wp1129477_VV1CGJ1O8C/www//scooterv/media/images/flags/
                            [blogImage] => /is/htdocs/wp1129477_VV1CGJ1O8C/www//scooterv/media/images/blog/
                            [sdatingImage] => /is/htdocs/wp1129477_VV1CGJ1O8C/www//scooterv/media/images/sdating/
                            [smiles] => /is/htdocs/wp1129477_VV1CGJ1O8C/www//scooterv/media/images/smiles/
                            [banners] => /is/htdocs/wp1129477_VV1CGJ1O8C/www//scooterv/media/images/banners/
                            [imagesPromo] => /is/htdocs/wp1129477_VV1CGJ1O8C/www//scooterv/media/images/promo/
                            [tmp] => /is/htdocs/wp1129477_VV1CGJ1O8C/www//scooterv/tmp/
                            [cache] => /is/htdocs/wp1129477_VV1CGJ1O8C/www//scooterv/cache/
                            [plugins] => /is/htdocs/wp1129477_VV1CGJ1O8C/www//scooterv/plugins/
                            [base] => /is/htdocs/wp1129477_VV1CGJ1O8C/www//scooterv/templates/base/
                            [classes] => /is/htdocs/wp1129477_VV1CGJ1O8C/www//scooterv/inc/classes/
                        )

                    [aConfigSite] => Array
                        (
                            [ver] => 6.1
                            [build] => 6
                            [title] => ScooterV
                            [url] => http://gooscoot.de/scooterv/
                            [url_admin] => http://gooscoot.de/scooterv/admin/
                            [url_aff] => http://gooscoot.de/scooterv/aff/
                            [profileImage] => http://gooscoot.de/scooterv/media/images/profile/
                            [profileBackground] => http://gooscoot.de/scooterv/media/images/profile_bg/
                            [profileSound] => http://gooscoot.de/scooterv/media/sound/
                            [profileVideo] => http://gooscoot.de/scooterv/media/video/
                            [sharingImages] => http://gooscoot.de/scooterv/media/images/sharingImages/
                            [mediaImages] => http://gooscoot.de/scooterv/media/images/
                            [gallery] => http://gooscoot.de/scooterv/media/images/gallery/
                            [flags] => http://gooscoot.de/scooterv/media/images/flags/
                            [blogImage] => http://gooscoot.de/scooterv/media/images/blog/
                            [sdatingImage] => http://gooscoot.de/scooterv/media/images/sdating/
                            [smiles] => http://gooscoot.de/scooterv/media/images/smiles/default/
                            [banners] => http://gooscoot.de/scooterv/media/images/banners/
                            [imagesPromo] => http://gooscoot.de/scooterv/media/images/promo/
                            [tmp] => http://gooscoot.de/scooterv/tmp/
                            [preCheckout] => http://gooscoot.de/scooterv/checkout/pre_checkout.php
                            [plugins] => http://gooscoot.de/scooterv/plugins/
                            [base] => http://gooscoot.de/scooterv/templates/base/
                            [email] => karol@heavytuned.de
                            [email_notify] => karol@heavytuned.de
                            [bugReportMail] => karol@heavytuned.de
                            [js_init] => 


                            [images] => http://gooscoot.de/scooterv/templates/tmpl_uni/images/
                            [zodiac] => templates/tmpl_uni/images/zodiac/
                            [icons] => http://gooscoot.de/scooterv/templates/tmpl_uni/images/icons/
                            [css_dir] => templates/tmpl_uni/css/
                        )

                    [sFilesPath] => /is/htdocs/wp1129477_VV1CGJ1O8C/www//scooterv/media/images/sharingImages/
                    [sFilesUrl] => http://gooscoot.de/scooterv/media/images/sharingImages/
                    [sPrLinkPar] => permalinks_gallery_photos
                    [sMainTable] => sharePhotoFiles
                    [aTableFields] => Array
                        (
                            [medID] => medID
                            [medProfId] => medProfId
                            [medExt] => medExt
                            [medTitle] => medTitle
                            [medUri] => medUri
                            [medDesc] => medDesc
                            [medTags] => medTags
                            [medDate] => medDate
                            [medViews] => medViews
                            [Approved] => Approved
                        )

                    [sCommentsTable] => CmtsSharedPhoto
                    [sFavoriteTable] => sharePhotoFavorites
                    [aMainActions] => Array
                        (
                            [Fave] => Array
                                (
                                    [icon] => action_fave.gif
                                    [link] => javascript:void(0);
                                    [onClick] => action=favorite__fileID__
                                )

                            [Share] => Array
                                (
                                    [icon] => action_share.gif
                                    [link] => javascript:void(0);
                                    [onClick] => action=share__fileID____fileUrl__
                                )

                            [Report] => Array
                                (
                                    [icon] => action_report.gif
                                    [link] => javascript:void(0);
                                    [onClick] => action=report__fileID____fileUrl__
                                )

                        )

                    [aAddActions] => Array
                        (
                            [Original_Size] => Array
                                (
                                    [icon] => action_download.gif
                                    [link] => http://gooscoot.de/scooterv/media/images/sharingImages/__file__
                                    [onClick] => 
                                    [add] => target="_blank"
                                )

                        )

                    [sViewActionName] => 31
                    [aInfo] => 
                    [aEditInfo] => Array
                        (
                            [medProfId] => 
                            [medTitle] => Title
                            [medTags] => Tags
                            [medDesc] => Description
                            [medUri] => 
                        )

                )

            [args] => Array
                (
                    [0] => Array
                        (
                            [sqlWhere] => WHERE 1 AND `Approved`= 'true'
                            [sqlLimit] => LIMIT 0, 10
                            [sqlOrder] => ORDER BY `voting_rate` DESC, `voting_count` DESC, `medDate` DESC
                            [rateFields] => ,gphoto_rating.`gal_rating_count` as `voting_count`, (gphoto_rating.`gal_rating_sum` / gphoto_rating.`gal_rating_count`) AS `voting_rate` 
                            [rateJoin] =>  LEFT JOIN gphoto_rating ON (gphoto_rating.`gal_id` = `sharePhotoFiles`.`medID`) 
                        )

                )

        )

)
Called script: /scooterv/browsePhoto.php
Request parameters:
Array
(
    [rate] => top
)