7
votes
Accepted
How do I use custom fields in Drupal views?
Saw the same issue here.
We noticed that the field appeared twice in the list of fields. We'd selected it as CiviCRM Contact: My Field - but it also appeared as CiviCRM Custom: My Field.
When we ...
6
votes
Accepted
Ran direct SQL update to bulk update contact names, changes not appearing until editing and saving
It sounds like you imported the first_name and last_name values - but the value at the top of the record is the display_name. You have two options:
Use your SQL script to update the display_name ...
6
votes
Accepted
How to get "Last contribution amount" and "Last contribution date" into report?
The way we have approached this in the past is to install/enable the Summary Fields extension, and set that up so it calculates the Last Date and Last amount, which are then available as custom fields ...
5
votes
Accepted
How to remove "Extended Demographics"?
The easiest would be if you can find it in the CiviCRM custom groups? Using Administer/Customize Data and Screens/Custom Fields. If that does not work, check the table civicrm_custom_group. You will ...
4
votes
Accepted
Error occurs : Unknown column 'relationship_civireport.contact_id_a' however not for "Super User" users
I just ran into this issue (on current Drupal, current CiviCRM setup) and confirmed that the way it's set now, a non-admin user needs the permission "access deleted contacts" to run this report.
Hope ...
4
votes
Accepted
How to find CiviCRM version in SQL from a database backup
You could use phpmyadmin and look in table 'civicrm_domain' at field 'version' - the version is stored there.
4
votes
Accepted
SQL Syntax Error - When starting civicrm with joomla
it seems php 7.2 is not compatible with 5.x.x
or i do not know how to do the configuration
i think downgrade the php would be the best solution
but i wonder if there is other answer, and how to do it....
3
votes
Trouble saving changes to a report
Check Drupal permissions at http://site/admin/people/permissions. It might be "CiviReport: save Report Criteria".
3
votes
Trouble saving changes to a report
Although it's not ultimately an answer to why the code is blowing up, the simplest solution to my problem was found in the report's settings. Under the Sorting tab, the report was set to sort on ...
3
votes
Accepted
For an extension, to modify database data, is it better to use SQL or API
Generally, it is wisest to always use the API. Many necessary updates actually touch multiple tables and the API takes care of it nicely. This is especially true with financial updates. The API also ...
3
votes
Accepted
Is there a function that will execute multiple SQL statements?
Yes, there is such a function; but you shouldn't use it.
Make each query separately and check the result.
Avoid functions which make multiple SQL queries in one action, as they make it harder for ...
3
votes
Accepted
Why is this Activity Search failing?
I think this is the same problem as https://github.com/JMAConsulting/biz.jmaconsulting.activitytypeacl/pull/14
2
votes
For an extension, to modify database data, is it better to use SQL or API
Agree, the API is decidedly the best way as it does multiple stuff and should continue to function over upgrades when there are database changes. I only use SQL when either the API does not do what I ...
2
votes
Accepted
Make phone type value "mobile" for every individual
You might be running the manual query under a different mysql user than the one that owns the function, so you can check who the "definer" is using show create function civicrm_strip_non_numeric;.
If ...
2
votes
Accepted
Debugging SQL - possible database problem
This particular error seems to be a recent regression in 4.7.23:
https://issues.civicrm.org/jira/browse/CRM-21029
You can wait until the release of 4.7.24 or apply the patch from https://github.com/...
2
votes
Accepted
Bulk delete of events - is such a thing possible?
General advice is don't use SQL directly - use the API. You don't have to write code if you use cv or API explorer.
2
votes
Fixing null sort and display names
Make sure you back up first.
The display name field for the site concerned only contained first_name, last_name and prefixes. I assume in some case you might also want to append suffixes?
trim and ...
2
votes
Is there a way to encrypt a single field in Civi database?
We were recently asked to 'Encrypt one CiviCRM custom field' for one of our clients who uses Webform CiviCRM module as a GUI to view/edit/add custom field values to CiviCRM for their clients.
I ...
2
votes
how to get an autoincrementing membership id with existing membership numbers
I would use the Contact Identity Extension and add a custom ID type for your membership number (https://github.com/systopia/de.systopia.identitytracker).
Fiddling around with contact ID's in the ...
2
votes
Accepted
How to split CiviCRM multiple database values with SQL?
For every option group (that is, set of multiple values) I created two SQL views: One for splitting the varchar field correctly, and one for combining the split values with other data. All of these &...
1
vote
Accepted
Fatal DB query syntax error on rules search - Civi 5.0.0 and recent Civirules
I do not know without checking on your site. I have recently tested 2.1 on an existing site and it worked there. You might want to check if the civirule_condition table is still populated? It might be ...
1
vote
How do you separate wordpress and civicrm tables?
First, I think this is a comprehensive list, though Demerit obviously uses some integration tricks I don't, and others may as well.
Second, for concrete instructions on how to do steps 2-4 and 7, ...
1
vote
How do you separate wordpress and civicrm tables?
Maybe if you have some plugin that uses $wpdb to access civi tables. For example there are several workarounds to try to get the functionality of drupal views that isn't in wordpress, and if they're ...
1
vote
Custom field default values at database level, not form level?
Hang on, there is a default_value column in the civicrm_custom_field table? I would assume changing that value would actually work....
1
vote
Custom field default values at database level, not form level?
A possible downside, although unlikely, is an upgrade might do some kind of batch modify on all custom fields that would wipe your default value.
What are you trying to do that can't be done with a ...
1
vote
How to update to new SQL database username and password?
These values need to be entered in the civicrm.settings.php file (i assume this is the same for WP as for Drupal)
1
vote
Query to get a list of contacts not tagged with a tag, but the user has multiple other tags
I don't know how this would translate to Drupal Views, but here is the SQL to do it:
SELECT
contact.id
FROM civicrm_contact contact
LEFT JOIN civicrm_entity_tag et ON
et.entity_table = '...
1
vote
New install, system status says "cron not running" and "timestamp mismatch"
The first thing I would check is the TimeZone setting in WP. Go to Settings--> General. That cannot be the default (UTC +0) as the default does not exist in php (UTC does, but not UTC +0). That ...
1
vote
Error creating Custom Data - DB Error: already exists
Try creating the custom data fieldset with a completely different name. In the code, the fieldset name you provide gets converted into a 'safe' table name for the fieldset, and it's telling you that ...
1
vote
Dropping thousands of records into a batch via SQL
Well this is not really an answer but it is a workaround. We've found that when creating the batch, if we specify the Payment Instrument (e.g. Credit Card) then it works. So we can get around this for ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
sql × 43mysql × 8
custom-fields × 7
api × 4
database × 4
wordpress × 3
error × 3
drupal-views × 3
php × 3
civievent × 2
civicontribute × 2
drupal × 2
upgrade × 2
civireport × 2
import × 2
developer × 2
custom-reports × 2
debugging × 2
backups × 2
civimember × 1
contacts × 1
profile × 1
extension × 1
joomla × 1
contributions × 1