Use $db->sql_build_query() please