Flash Drives - Custom Printed By Green Thumb Drives

Flash Drives - Custom Printed By Green Thumb Drives
design your drive - www.greenthumbdrives.com

Thursday, April 26, 2018

Search and Replace in MySQL database with phpMyAdmin



Do a search and replace in any MySQL database in phpMyAdmin. You do not need to download the database export at all, just run this simple command. This also works through the MySQL command line.


To search and replace a text string, start up phpMyAdmin, and click on your database name that you want to run the search and replace through. At the top of the window, click on the "SQL" tab.


In the text box, enter the following code. This is the generic setup, so edit to satisfy your needs:

UPDATE tablename SET tablefield = replace(tablefield,"findstring","replacestring");


You can add a WHERE clause onto this as well.


For example, here is one command a ran:

UPDATE `mos2_content` SET introtext = replace(introtext,"<p>","") WHERE `title` REGEXP '-0';


This got rid of all paragraph tags in the mos2_content table where the title included the string "-0".


Hope this helps. If you have any comments, suggestions, questions, or your own code, please submit a comment below.




Courtesy of Brian Zimmer Originally: https://web.archive.org/web/20121014034615/http://www.zimmertech.com/tutorials/php/60/mysql-search-replace-phpmyadmin.php

And then by Mybes: https://web.archive.org/web/20150217075034/http://www.mybesinformatik.com/content/phpmyadmin-search-and-replace which I had bookmarked for years, but is currently Asian porn. However, I need a quick reminder of this simple MySQL query more than I need Asian porn.

Monday, November 13, 2017

Installing a WiFi Thermostat Adding C Wire for a Boiler with 2 Wires Labeled TT

It was ridiculous how much information was available on how to do this, yet how mysterious the process was to install a WiFi thermostat on my boiler that did not have a C wire!

I found this YouTube video to be rather helpful. But it did not cover the entire process. Especially what to use when you do not have a 24AC transformer available.

There are numerous ways to get this C wire. The C wire is merely 24 Volts AC. Nothing magical here. If you can find a transformer somewhere like in many of the videos, you've obviously been to an HVAC supplier in the area. If you really want to install your shiny new WiFi, app driven Thermostat that has been sitting on the kitchen counter for over a week... at 7PM... on Saturday, the only truly free time in the whole damn week, you, are NOT screwed.

Lowe's sold me this for $15 bucks...



That is a doorbell transformer. The bottom two post screws have what you need, C and RC. Yes! The C wire also needs an RC wire. So, it's two wires. 


My Boiler had only two wires, I needed four wires, so I bought new 7-wire wire from Lowe's in case future Thermostats require more wires than current day and I replaced the wire from the boiler to the thermostat.

Anyway, my 2 wires that existed were both labeled T T. No W, No G, No Yellow, None of that. These TT wires in my system were Black and White. They measured 24 volts. They could not be used as a C wire. Using a jumper and connecting one of the wires to the C will not work.

The moment we've all been waiting for... I had to connect one of my existing wires(White in my case) to W and the other wire(black in my case) to R. Then I had to connect the wires from the bottom 2 posts on that transformer. One went to C and the other one to RC. That's it. It was frankly very easy to do.

I found a place to mount that little doorbell transformer on the boiler and it looks totally stock.I wish someone would have made this a bit easier to get to this information, so I wrote this blog post. I hope it helps.

Wednesday, October 19, 2011

Magento 1.5 Shipping Method Sorry, no quotes are available for this order at this time.

So one of my CSR's kept having this problem. I am going in and changing the weight on the only product in the cart to no avail. It turns out, that if the address cannot be verified, then no methods will show up. The CSR had a space in front of the zip code, because the customer entered it that way. Make sure the address you are shipping to validates, or the shipping methods will fail. It seems a simple PHP trim() function would have resolved this anomaly.

Good luck

Tuesday, October 4, 2011

SugarCRM 6.1 ModernAqua Theme Install

For lack of documentation...
Download from SugarForge... http://www.sugarforge.org/projects/modernaqua
Install in Module Loader.
In order to allow SugarCRM to see the template, after installation I had to follow these instructions here... http://www.sugarcrm.com/forums/f3/unable-change-theme-sugarcrm-ce-6-1-a-74922/# and a piece from here...http://www.sugarcrm.com/forums/f115/new-sugar-installed-fine-but-no-theme-65119/

I had to edit config.php and make the Default theme "ModernAqua". Move "Classic" theme to disabled list in admin>themes. Rename Sugar5 to something different. Delete cache/themes/Sugar5 and change the file permissions for both the /themes/ModernAqua and /cache/themes/ModernAqua to 775 for all directories and 644 for all files.

Then it worked. I hope this helps someone.

Monday, October 3, 2011

Magento 1.5 - Custom Options as Shopping Cart Price Rules - No Can Do!

After spending more than 8 hours attempting to get Custom Options to work as criteria for shopping cart price rules, I have given up for now. The closest that one could get to identify an "option" in the cart and apply price rules would be to create a product from an attribute set, which is obviously not a "customer selectable option," and use the attribute set as criteria for the price rule.

I wish I had better news about this, as I really need this functionality. Maybe I should create a module. :|

Saturday, September 24, 2011

Joomla 1.7.0 New Installation JError Loop No configuration.php

So, I installed Joomla! 1.7.0 and upon going to the front or back ends I get an error: JError detected an infinite loop. It turns out that the full stable installation .zip file does not properly include the configuration.php file. The loop error is kind of erroneous. The problem was that there was not a connection to the database. I noticed that after following the instructions at http://docs.joomla.org/Infinite_loop_detected_in_JError_in_Joomla_1.7.

How I fixed it... Now, when I install a fresh load of J1.7 I grab the configuration.php out of the installation DIR after I run through the installation and I change the permissions for the file on the server to be writable. I still had to manually enter the database connection settings - MySQL username, password and database name. Now, I no longer have this issue.

Sunday, September 18, 2011

Tweet Adder 3 Demo Mode: I Entered The Wrong Password. AKA Manage Users Is Blank

So, I was trying out TweetAdder 3 and when I installed it I entered the wrong password for my Twitter account. Well, when I clicked "Turn Account On" it told me the password was wrong and that I had to edit it in the Manage Users screen. The manage users screen was blank... empty. Here is how I resolved the issue.

Keep in mind that there was a warning telling me to ensure that the password was right, because when in demo mode there is no way to change it. Wonderful... I'll just uninstall and reinstall, right? Wrong. The settings were still there after I reinstalled. How I got around this issue was to uninstall and then delete the settings from C:\Users\%my_username%\AppData\Roaming\TweetAdder3 folder. I deleted the entire folder as a matter of fact.

BOOM, BABY! Reinstalled and the application asked me for my new credentials. I hope this helps someone that has this issue.