251 Posts
Viktor Iwan
8 years ago
2
Topic

Hello,

i'm thinking to build a custom SQL query, let's call it $db.

And this $db object can be use in the Form Field as default value OR any custom SQL Queries...

Is it possible ?

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

You can use SQL pack plugin as live value http://www.seblod.com/store/extensions/19162

251 Posts
Viktor Iwan
8 years ago
0
Level 2

if i need to do a single query and the result will be shared for 3 field... it wouldn't be possible, right ?

Let say the main query is "SELECT id, title, catid from #__content where created_by=$user->id "

with SQL Pack, i need to build 3 query, right ?

"SELECT id from #__content where created_by=$user->id LIMIT 1" 

"SELECT title from #__content where created_by=$user->id LIMIT 1"

"SELECT catid from #__content where created_by=$user->id LIMIT 1"


It will be resource efficient if i create single query and use by those 3 field, right ? is it possible ?

Get a Book for SEBLOD