SELECT 1 , 'child', RPAD( SUBSTRING(g.level, 1, INSTR(g.level , '0' ) - 1 ) + 1, 7, '0' )
FROM groups as g
WHERE INSTR(g.level , '0' ) - 2 = 0 AND
SUBSTRING( g.level , 2, 1 ) != 9 AND
(NOT EXISTS ( select * from groups as p where p.level = g.level )) AND
g.cluster = 1
ORDER BY LEVEL desc
LIMIT 1[/sql:1:d5758a8059] a problem pojawil sie z NOT EXIST. Nie jset to sprawa tylko tego zapytania poniewaz nawet banal zwraca mi cos takiego:
Cytat
SELECT 1
FROM groups AS p
WHERE NOT
EXISTS (
SELECT *
FROM groups
)
LIMIT 0 , 30
MySQL said:
#1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'EXISTS (
SELECT *
FROM groups )
FROM groups AS p
WHERE NOT
EXISTS (
SELECT *
FROM groups
)
LIMIT 0 , 30
MySQL said:
#1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'EXISTS (
SELECT *
FROM groups )
Pomyslalem ze moze EXIST nie jest jeszcze zaimplementowane w mojej wersji servera mysql ale jakos nie moglem sie dokopac do informacji od ktorej wersji to dziala a ja uzywam prawie nowej 4.0.15 . Moze ktos jest zorientowany jak to wyglada?