Jump to content

[SOLVED] SPOT THE ERROR


teng84

Recommended Posts

there is an error in this code

    if (isset($_GET['sorted_by'])){
	switch($_GET['sorted_by']){
		case "id":
			$sorted_by = " ORDER BY GEN_LIST.LISTINGID ";
			break;
		case"title":
			$sorted_by = " ORDER BY GEN_LIST.TITLE ";
			break;
		case"description":
			$sorted_by = " ORDER BY GEN_LIST.SHORTDESC ";
			break;
		case"category":
			$sorted_by = " ORDER BY GEN_LIST.CATEGORY ";
			break;
		case"subcategory":
			$sorted_by = " ORDER BY GEN_LIST.SUBCATEGORY ";
			break;
		case"posted by":
			$sorted_by = " ORDER BY GEN_LIST.USER ";
			break;
		case"date posted":
			$sorted_by = " ORDER BY GEN_LIST.DATEADDED "
			break;
		case"active":
			$sorted_by = " ORDER BY GEN_LIST.RK, GEN_LIST.DATEADDED  ";
			break;
		case"inactive":
			$sorted_by = " ORDER BY GEN_LIST.RK DESC, GEN_LIST.DATEADDED  ";
			break;
		default:
			$sorted_by = $def_sort;
			break;
	}//end switch
}

Link to comment
https://forums.phpfreaks.com/topic/77240-solved-spot-the-error/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.