长话短说,我的按字段排序似乎不适用于我的 MySQL 调用。我在存储中真的找不到模式...
$theorder 正确设置为
, 'People-Wedding Photo', 'People-Kids', 'People-Male/Female', 'Architecture-Exterior', 'Architecture-Interior', 'Animal-Birds', 'Backgrounds'
这是我的代码。如您所见,我正在循环,进行格式转换....但我仍然收到错误的订单...随机订单...。
有什么我想念的吗?
$under_link_query = mysql_query("SELECT DISTINCT(type), type FROM ".$prefix."ProFolio_work WHERE type != 'Backgrounds' ORDER BY FIELD(type" . $theorder .")");
while($u_row = mysql_fetch_assoc($under_link_query)){
$type = html_entity_decode($u_row['type']);
$typeForm = preg_replace('/[^a-z0-9]/i', '_', $type);
?>
<a href="#" id="link_<? echo str_replace(' ', '_', $typeForm); ?>">
<? echo ucfirst($type); ?></a>
<?