20 Posts
cedTV
10 years ago
5
Topic

Hi , i write a free sql query on select dynamic cascade, and i need to get id of current user for use it in where clause. I try tu use [userid] ,#userid# but don't work. How can i do for it? i read this post: http://www.seblod.com/community/forums/fields-plug-ins/select-dynamic-with-fields-variables but here i must hack the plug in. Anyway I try it to hack , i insert the code , but maybe i modify  not well the file select_dynamic_cascade.php on plugins/cck_field. Is there anyone that do it accurately? thanks

Get a Book for SEBLOD
4229 Posts
Kadministrator
10 years ago
3
Level 1

try $user->id

20 Posts
cedTV
10 years ago
2
Level 2

hi, i try but don't work . Error on query : 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 '>id'.... but i must modify or not code in select_dynamic_cascade.php like say the post that i linked in my post??

this is my free query:

SELECT
i536a_settori.nome_settore AS text,
i536a_settori.id AS value
FROM i536a_users INNER JOIN i536a_settori
ON i536a_users.id_settore_1 = i536a_settori.id OR i536a_users.id_settore = i536a_settori.id
WHERE i536a_users.id =$user->id

thanks

4229 Posts
Kadministrator
10 years ago
1
Level 3

no modifacations, sorry, right syntax should be #$user->id#

20 Posts
cedTV
10 years ago
0
Level 4

sorry ..don't worlk anymore ...

this is message error query 

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 6 SQL=SELECT i536a_settori.nome_settore AS text, i536a_settori.id AS value FROM i536a_users INNER JOIN i536a_settori ON i536a_users.id_settore_1 = i536a_settori.id OR i536a_users.id_settore = i536a_settori.id WHERE i536a_users.id =#$user->id#

why is " empty?

4229 Posts
Kadministrator
10 years ago
0
Level 1

sorry, I missed this is not ordinary select dynamic, I'm afraid this is not yet implemented in dynamic cascade. Please add it to the tracker.

Get a VIP membership