$result=db_query("SELECT nid, type FROM node WHERE ".($meta?"attributes LIKE '%".check_input($meta)."%' AND ":"")." promote = '1' AND status = '1' AND created <= '".($date>0?check_input($date):time())."' ORDER BY created DESC LIMIT ".($user->nodes?$user->nodes:variable_get("default_nodes_main",10)));
$result=db_query("SELECT nid, type FROM node WHERE ".($meta?"attributes LIKE '%".check_input($meta)."%' AND ":"")." promote = '1' AND status = '1' AND (static = '1' OR created <= '".($date>0?check_input($date):time())."') ORDER BY static DESC,created DESC LIMIT ".($user->nodes?$user->nodes:variable_get("default_nodes_main",10)));
$result=db_query("SELECT nid, type FROM node WHERE ".($meta?"attributes LIKE '%".check_input($meta)."%' AND ":"")." promote = '1' AND status = '1' AND created <= '".($date>0?check_input($date):time())."' ORDER BY created DESC LIMIT ".($user->nodes?$user->nodes:variable_get("default_nodes_main",10)));
$result=db_query("SELECT nid, type FROM node WHERE ".($meta?"attributes LIKE '%".check_input($meta)."%' AND ":"")." promote = '1' AND status = '1' AND (static = '1' OR created <= '".($date>0?check_input($date):time())."') ORDER BY static DESC,created DESC LIMIT ".($user->nodes?$user->nodes:variable_get("default_nodes_main",10)));