![]() |
Problems regarding PHP and MySQL!
Thanks for reading :)
Im trying to intergrate my iste to my vb board and I have a problem. I'm writing an SQL query that looks like this: SELECT column1 FROM table WHERE column2 > (SELECT MAX(column2)-5 FROM table) The problem is that this isn't working because either Php or MySQL doesn't like my subquery. Does anyone know how I can write this to make it work? Can this Query be rewritten so I dont need the SubQuery? :disappointed: |
MySQL doesn't support sub queries, at least not yet.
Just use two queries. Code:
$max = $DB_site->query_first('SELECT MAX(column2) AS maxval FROM table'); |
All times are GMT. The time now is 08:00 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|