Skip to main content
added 224 characters in body
Source Link

Try to get the user id like this:

   $user = JFactory::getUser();
   $id= $user->id; 

Try to directly add it onto your sql statement:

$query = $fieldParams->get('query', ''); // Run the query with a having condition because it supports aliases $db->setQuery($query . ' AND created_by =' . $db->q('.$id.' ));

also check permissions and everything.

  1. You can try unistalling the plugin.

  2. Fix the database by going to:

Extension > Manage > Database and click "fix".

  1. Manually clean the tables releated to your plugin if there's still leftovers.

  2. Clean the cache.

  3. Verify if all files are there.

  4. Verify if it's the correct database.

  5. Install the plugin again.

PLUS:

Instead of editing

plugins/fields/sql/tmpl/sql.php

try to edit the helper and the view file. Those are responsible for manipulating the database. That's probably the cause of the error you are getting.

Try to get the user id like this:

   $user = JFactory::getUser();
   $id= $user->id; 

Try to directly add it onto your sql statement:

$query = $fieldParams->get('query', ''); // Run the query with a having condition because it supports aliases $db->setQuery($query . ' AND created_by =' . $db->q('.$id.' ));

also check permissions and everything.

  1. You can try unistalling the plugin.

  2. Fix the database by going to:

Extension > Manage > Database and click "fix".

  1. Manually clean the tables releated to your plugin if there's still leftovers.

  2. Clean the cache.

  3. Verify if all files are there.

  4. Verify if it's the correct database.

  5. Install the plugin again.

Try to get the user id like this:

   $user = JFactory::getUser();
   $id= $user->id; 

Try to directly add it onto your sql statement:

$query = $fieldParams->get('query', ''); // Run the query with a having condition because it supports aliases $db->setQuery($query . ' AND created_by =' . $db->q('.$id.' ));

also check permissions and everything.

  1. You can try unistalling the plugin.

  2. Fix the database by going to:

Extension > Manage > Database and click "fix".

  1. Manually clean the tables releated to your plugin if there's still leftovers.

  2. Clean the cache.

  3. Verify if all files are there.

  4. Verify if it's the correct database.

  5. Install the plugin again.

PLUS:

Instead of editing

plugins/fields/sql/tmpl/sql.php

try to edit the helper and the view file. Those are responsible for manipulating the database. That's probably the cause of the error you are getting.

deleted 5 characters in body
Source Link

Try to get the user id like this:

   $user = JFactory::getUser();
   $id= $user->id; 

Try to directly add it onto your sql statement:

$query = $fieldParams->get('query', ''); // Run the query with a having condition because it supports aliases $db->setQuery($query . ' AND created_by =' . $db->q('.$id.' ));

also check permissions and everything.

  1. You can try unistalling the plugin.

  2. Fix the database by going to:

Extension > Manage > Database and click "fix".

  1. Manually clean the tables releated to your plugin if there's still leftovers.

  2. Clean the cache.

  3. Installing the plugin again .

  4. Verify if all files are there.

  5. Verify if it's the correct database.

  6. Install the plugin again.

Try to get the user id like this:

   $user = JFactory::getUser();
   $id= $user->id; 

Try to directly add it onto your sql statement:

$query = $fieldParams->get('query', ''); // Run the query with a having condition because it supports aliases $db->setQuery($query . ' AND created_by =' . $db->q('.$id.' ));

also check permissions and everything.

  1. You can try unistalling the plugin.

  2. Fix the database by going to:

Extension > Manage > Database and click "fix".

  1. Manually clean the tables releated to your plugin if there's still leftovers.

  2. Clean the cache.

  3. Installing the plugin again .

  4. Verify if all files are there.

  5. Verify if it's the correct database.

Try to get the user id like this:

   $user = JFactory::getUser();
   $id= $user->id; 

Try to directly add it onto your sql statement:

$query = $fieldParams->get('query', ''); // Run the query with a having condition because it supports aliases $db->setQuery($query . ' AND created_by =' . $db->q('.$id.' ));

also check permissions and everything.

  1. You can try unistalling the plugin.

  2. Fix the database by going to:

Extension > Manage > Database and click "fix".

  1. Manually clean the tables releated to your plugin if there's still leftovers.

  2. Clean the cache.

  3. Verify if all files are there.

  4. Verify if it's the correct database.

  5. Install the plugin again.

added 1 character in body
Source Link

Try to get the user id like this:

   $user = JFactory::getUser();
   $id= $user->id; 

Try to directly add it onto your sql statement:

$query = $fieldParams->get('query', ''); // Run the query with a having condition because it supports aliases $db->setQuery($query . ' AND created_by =' . $db->q('.$id.' ));

also check permissions and everything.

  1. You can try unistalling the plugin.

  2. Fix the database by going to:

Extension > Manage > Database and click "fix".

  1. Manually clean the tables releated to your plugin if there's sillstill leftovers.

  2. Clean the cache.

  3. Installing the plugin again .

  4. Verify if all files are there.

  5. Verify if it's the correct database.

Try to get the user id like this:

   $user = JFactory::getUser();
   $id= $user->id; 

Try to directly add it onto your sql statement:

$query = $fieldParams->get('query', ''); // Run the query with a having condition because it supports aliases $db->setQuery($query . ' AND created_by =' . $db->q('.$id.' ));

also check permissions and everything.

  1. You can try unistalling the plugin

  2. Fix the database by going to

Extension > Manage > Database and click "fix"

  1. Manually clean the tables releated to your plugin if there's sill leftovers.

  2. Clean the cache

  3. Installing the plugin again

  4. Verify if all files are there.

  5. Verify it's the correct database

Try to get the user id like this:

   $user = JFactory::getUser();
   $id= $user->id; 

Try to directly add it onto your sql statement:

$query = $fieldParams->get('query', ''); // Run the query with a having condition because it supports aliases $db->setQuery($query . ' AND created_by =' . $db->q('.$id.' ));

also check permissions and everything.

  1. You can try unistalling the plugin.

  2. Fix the database by going to:

Extension > Manage > Database and click "fix".

  1. Manually clean the tables releated to your plugin if there's still leftovers.

  2. Clean the cache.

  3. Installing the plugin again .

  4. Verify if all files are there.

  5. Verify if it's the correct database.

added 119 characters in body
Source Link
Loading
added 227 characters in body
Source Link
Loading
Source Link
Loading