|
|
|
Ошибка DECLARE/
|
|||
|---|---|---|---|
|
#18+
не могу понять в чем ошибка. помогите #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 '' at line 3 CREATE function catPath(curid int) RETURNS TEXT begin declare result text; DECLARE curcat INT; DECLARE part char(20); SET result=''; DECLARE firstcat CURSOR for SELECT catid FROM sh73n_content WHERE id=curid; OPEN firstcat; FETCH firstcat into curcat; WHILE curcat<>1 DO DECLARE q CURSOR for SELECT CONCAT_WS('::',id,title),parent_id FROM sh73n_categories WHERE id=curcat; OPEN q; FETCH q INTO part,curcat; SET result=CONCAT(result,part,'|||'); END WHILE; RETURN result; END; ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 30.08.2013, 12:40:52 |
|
||
|
Ошибка DECLARE/
|
|||
|---|---|---|---|
|
#18+
делимитер не забыли? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 30.08.2013, 13:20:45 |
|
||
|
Ошибка DECLARE/
|
|||
|---|---|---|---|
|
#18+
да уже сам догадался, только теперь ругается на OPEN #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 'DECLARE firstcat CURSOR for SELECT catid FROM sh73n_content WHERE id=curid; O' at line 9 ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 30.08.2013, 13:50:50 |
|
||
|
Ошибка DECLARE/
|
|||
|---|---|---|---|
|
#18+
Насколько я помню, все DECLARE должны идти первыми после строки BEGIN. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 30.08.2013, 13:53:22 |
|
||
|
|

start [/forum/topic.php?fid=47&msg=38382308&tid=1836147]: |
0ms |
get settings: |
8ms |
get forum list: |
17ms |
check forum access: |
4ms |
check topic access: |
4ms |
track hit: |
30ms |
get topic data: |
8ms |
get forum data: |
2ms |
get page messages: |
38ms |
get tp. blocked users: |
1ms |
| others: | 203ms |
| total: | 315ms |

| 0 / 0 |
