查询字符串和时间旅行 [英] queries strings and time travel

查看:66
本文介绍了查询字符串和时间旅行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用ORDER BY的查询

我希望它通过在查询结束时的一些子查询后生成的字符串进行排序。

有没有一个很好的技巧来做到这一点,还是我需要找到一种方法来获取查询之前的字符串?

I have a query that uses ORDER BY
I would like it to order by a string that is made after some sub queries at the end of the query.
Is there a nice trick to do this or do I need to find a way to get the string made before the query?

推荐答案


我有一个使用ORDER BY的查询

我希望它通过在查询结束时的一些子查询之后生成的字符串来订购。

有一个很好的技巧可以做到这一点,还是我需要找到一种方法来获取查询之前的字符串?
I have a query that uses ORDER BY
I would like it to order by a string that is made after some sub queries at the end of the query.
Is there a nice trick to do this or do I need to find a way to get the string made before the query?



一招......?你对子查询的查询是什么样的?

A trick...? What does your query with the sub query look like?


感谢volectricity,这是一个减少,我已经删除了一些其他子'和html

[PHP]<?php
Thanks volectricity, this is a cutdown, I''ve removed some other sub''s and html

[PHP]<?php


query1 =(" SELECT DISTINCT(teamname),conference_team.id AS teamid

来自conference_team

INNER JOIN conference_results

ON conference_results.hometeam = conference_team.id

赛季

LIKE' '2005-06''

ORDER BY''
query1 = ("SELECT DISTINCT(teamname),conference_team.id AS teamid
FROM conference_team
INNER JOIN conference_results
ON conference_results.hometeam = conference_team.id
WHERE season
LIKE ''2005-06''
ORDER BY ''


这篇关于查询字符串和时间旅行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆