Welcome Guest, Not a member yet? Register   Sign In
[SOLVED] query with variables
#9

[eluser]predat0r[/eluser]
[quote author="Seb" date="1307821400"]Sorry, I overlooked the alias references in the query.

You can make references if you use "having":

Code:
SELECT
  id, title, xrl, SUBSTRING( date, 1, 4 ) AS year
FROM
  jokes
HAVING
  year = '2011'
ORDER BY
  date
LIMIT
  0 , 10
[/quote]

thx Seb for your answare too


Messages In This Thread
[SOLVED] query with variables - by El Forum - 06-11-2011, 06:24 AM
[SOLVED] query with variables - by El Forum - 06-11-2011, 06:48 AM
[SOLVED] query with variables - by El Forum - 06-11-2011, 07:00 AM
[SOLVED] query with variables - by El Forum - 06-11-2011, 07:43 AM
[SOLVED] query with variables - by El Forum - 06-11-2011, 08:22 AM
[SOLVED] query with variables - by El Forum - 06-11-2011, 08:35 AM
[SOLVED] query with variables - by El Forum - 06-11-2011, 08:43 AM
[SOLVED] query with variables - by El Forum - 06-11-2011, 08:44 AM
[SOLVED] query with variables - by El Forum - 06-11-2011, 08:45 AM



Theme © iAndrew 2016 - Forum software by © MyBB