database error: There was a error in executing the following SQL:
select default_background_color, default_foreground_color, default_font_face, default_font_size, default_link_color, default_link_color_hover, default_link_underline, nav_arrow_color from member_custom_styles where custom_id=

You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1

User:
Server name: www.artspan.com

Program Name: /buy-original-art/--/original-art.html?page=5


Error:You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1

Trace:
#0 /mnt/www/source/artspan-legacy/includes/db_abstracts.inc(122): ASDB_util->db_query2('select default_...')
#1 /mnt/www/source/artspan-legacy/includes/class_utility.php(2766): db_query('select default_...')
#2 /mnt/www/source/artspan-legacy/includes/class_utility.php(2494): utilityClass->getCustomStyleAndTemplate(NULL, NULL, false)
#3 /mnt/www/source/artspan-legacy/includes/class_memberConfig.php(2089): utilityClass->getTemplateAndStyle('', '', '85522', false)
#4 /mnt/www/source/artspan-legacy/includes/class_image.php(1209): artspanMemberConfig->getTemplateAndStyle('', '')
#5 /mnt/www/source/artspan-legacy/includes/class_artwork.php(330): ArtspanImage->getArtworkPageName(2022282)
#6 /mnt/www/source/artspan-legacy/includes/artspan_search.php(508): artspanArtwork->generateLink(NULL, true, true)
#7 /mnt/www/source/artspan-legacy/includes/artspan_search.php(279): artspan_search->buildSphinxRawDataByArtwork(NULL)
#8 /mnt/www/source/artspan-legacy/includes/artspan_search.php(188): artspan_search->doArtworkSearch(Array, NULL, Array, Array, NULL, 'thumbnail', true, 0, true, 'originals', NULL, Array, false, NULL, Array, false, NULL, NULL)
#9 /mnt/www/source/artspan-legacy/artspan_main/shop-functions.php(639): artspan_search->getArtwork(Array, NULL, Array, Array, NULL, true, 0, true, 'originals', NULL, Array, false, NULL, Array, false, NULL, NULL)
#10 /mnt/www/source/artspan-legacy/artspan_main/shop-originals.php(4): require_once('/mnt/www/source...')
#11 {main}