This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cat .gitignore | |
.idea/ | |
wp-config.php | |
wordpress_prod.sql# On branch dev | |
$ git status | |
# Changes not staged for commit: | |
# (use "git add <file>..." to update what will be committed) | |
# (use "git checkout -- <file>..." to discard changes in working directory) | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- create a temp table to house dup'd ids | |
create table `meetings_dup_ids` ( | |
`id` varchar(36) NOT NULL, | |
PRIMARY KEY (`id`) | |
); | |
-- copy the dup IDs into the temp table... | |
insert into meetings_dup_ids(id) | |
select distinct(one.id) from meetings one | |
join meetings two on one.name = two.name and one.date_start=two.date_start |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- setup temp table | |
create table `opp_dups` ( | |
`id` varchar(36) NOT NULL, | |
PRIMARY KEY (`id`) | |
); | |
-- copy the dup IDs into the temp table... | |
insert into opp_dups(id) | |
select distinct(opp1.id) from opportunities opp1 | |
join opportunities opp2 on opp1.name=opp2.name and opp1.id <> opp2.id |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
truncate contacts_campa_campaigncommittee_1_c; | |
select * from contacts_campa_campaigncommittee_1_c; | |
-- Copy all of the data, using account_id for contact_id even though it's wrong | |
insert into contacts_campa_campaigncommittee_1_c | |
(id,date_modified,deleted, | |
contacts_campa_campaigncommittee_1contacts_ida, | |
contacts_campa_campaigncommittee_1campa_campaigncommittee_idb) | |
select campa_campaigncommittee_cstm.id_c,now(),0, | |
campa_campaigncommittee_cstm.account_id_c, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
delete from job_queue | |
where scheduler_id = '6b867112-a876-a867-2df1-5088b60bb6d2'; | |
update schedulers set last_run = subdate(now(),360) | |
where id = '6b867112-a876-a867-2df1-5088b60bb6d2'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Find the Contacts whose User Assignments do not match that of parent Accounts | |
select | |
contacts.last_name,contacts.assigned_user_id, | |
accounts.name,accounts.assigned_user_id | |
from contacts | |
join accounts_contacts on contacts.id = accounts_contacts.contact_id | |
join accounts on accounts.id = accounts_contacts.account_id | |
where contacts.deleted=0 and accounts_contacts.deleted=0 and accounts.deleted=0 | |
and contacts.assigned_user_id <> accounts.assigned_user_id; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select sum(amount),month(date_closed) from opportunities where sales_stage in ('Closed Won','Closed_in_Development') group by year(date_closed),month(date_closed) order by date_closed; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// custom/include/SugarFields/Fields/Phone/SugarFieldPhone.php | |
require_once('include/SugarFields/Fields/Phone/SugarFieldPhone.php'); | |
class CustomSugarFieldPhone extends SugarFieldPhone{ | |
private $replacement_chars = array(' ','-','(',')','x','X','.','+','#','!'); | |
/** | |
* Remove any special characters to sanitize input, storing only ints | |
* @see parent::save |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class SomeClass{ | |
public static function selfie(){ | |
return new self(); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$manifest = array( | |
'acceptable_sugar_versions' => array(), | |
'acceptable_sugar_flavors' => array(), | |
'readme' => '', | |
'key' => 'PSI', | |
'author' => 'Profiling Solutions', | |
'description' => ' Provide example manifest with layoutfields array ', | |
'icon' => '', | |
'is_uninstallable' => true, |
OlderNewer