<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>MySQL Archives - Belchamber Web Tools, AI Guidance &amp; Code</title>
	<atom:link href="https://tools.belchamber.us/code-snippets/mysql/feed/" rel="self" type="application/rss+xml" />
	<link>https://tools.belchamber.us/code-snippets/mysql/</link>
	<description>Aaron Belchamber: AI-Centric Senior Cloud Software Engineer - Jacksonville FL</description>
	<lastBuildDate>Wed, 21 Feb 2024 19:07:02 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0.2</generator>
<site xmlns="com-wordpress:feed-additions:1">99928718</site>	<item>
		<title>MySQL: Exclude &#8216;group by&#8217; group if field A in any row has value B with &#8220;Natural Join&#8221;</title>
		<link>https://tools.belchamber.us/mysql-exclude-group-by-group-if-field-a-in-any-row-has-value-b-with-natural-join/</link>
					<comments>https://tools.belchamber.us/mysql-exclude-group-by-group-if-field-a-in-any-row-has-value-b-with-natural-join/#respond</comments>
		
		<dc:creator><![CDATA[Aaron Belchamber]]></dc:creator>
		<pubDate>Sun, 21 Dec 2014 15:16:51 +0000</pubDate>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[database query]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[mysql query]]></category>
		<category><![CDATA[mysql tips]]></category>
		<guid isPermaLink="false">http://tools.belchamber.us/?p=649</guid>

					<description><![CDATA[<p>Querying databases get a little tricky when you have a stack of records associated with another table, perhaps a master table of accounts, and you&#8217;re trying to filter out values that would exclude the results from another group of results.In this example below, we are getting a list of organization IDs for all countries who [&#8230;]</p>
<p>The post <a href="https://tools.belchamber.us/mysql-exclude-group-by-group-if-field-a-in-any-row-has-value-b-with-natural-join/">MySQL: Exclude &#8216;group by&#8217; group if field A in any row has value B with &#8220;Natural Join&#8221;</a> appeared first on <a href="https://tools.belchamber.us">Belchamber Web Tools, AI Guidance &amp; Code</a>.</p>
]]></description>
		
					<wfw:commentRss>https://tools.belchamber.us/mysql-exclude-group-by-group-if-field-a-in-any-row-has-value-b-with-natural-join/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">649</post-id>	</item>
		<item>
		<title>Finding missing records of the right joined table in MySQL</title>
		<link>https://tools.belchamber.us/finding-missing-records-right-joined-table-mysql/</link>
					<comments>https://tools.belchamber.us/finding-missing-records-right-joined-table-mysql/#respond</comments>
		
		<dc:creator><![CDATA[Aaron Belchamber]]></dc:creator>
		<pubDate>Thu, 16 Oct 2014 10:23:36 +0000</pubDate>
				<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[MySQL]]></category>
		<guid isPermaLink="false">http://tools.belchamber.us/?p=608</guid>

					<description><![CDATA[<p>Let&#8217;s say you have two database tables that are supposed to have the same record IDs. Perhaps they contain different data but share the same ID &#8212; for this example, we call it &#8220;user_id&#8221;. This query will select only the missing records of the right joined table. SELECT a.user_id, a.other_detail, b.user_id FROM tablea a LEFT [&#8230;]</p>
<p>The post <a href="https://tools.belchamber.us/finding-missing-records-right-joined-table-mysql/">Finding missing records of the right joined table in MySQL</a> appeared first on <a href="https://tools.belchamber.us">Belchamber Web Tools, AI Guidance &amp; Code</a>.</p>
]]></description>
		
					<wfw:commentRss>https://tools.belchamber.us/finding-missing-records-right-joined-table-mysql/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">608</post-id>	</item>
		<item>
		<title>Copying MySQL databases at the command line is fast and easy</title>
		<link>https://tools.belchamber.us/copying-mysql-databases-at-the-command-line-is-fast-and-easy/</link>
					<comments>https://tools.belchamber.us/copying-mysql-databases-at-the-command-line-is-fast-and-easy/#respond</comments>
		
		<dc:creator><![CDATA[Aaron Belchamber]]></dc:creator>
		<pubDate>Fri, 12 Sep 2014 11:59:23 +0000</pubDate>
				<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[MySQL]]></category>
		<guid isPermaLink="false">http://tools.belchamber.us/?p=526</guid>

					<description><![CDATA[<p>Copying your MySQL databases from the command line, if you have privileges is easy, a lot easier than going into PHP MyAdmin and hoping the &#8220;Copy Database&#8221; function is available and it doesn&#8217;t time out&#8230; Here&#8217;s how you can copy databases to a remote server: mysqldump your_db_name  &#124; ssh host2 "mysql your_db_copy" Here how you [&#8230;]</p>
<p>The post <a href="https://tools.belchamber.us/copying-mysql-databases-at-the-command-line-is-fast-and-easy/">Copying MySQL databases at the command line is fast and easy</a> appeared first on <a href="https://tools.belchamber.us">Belchamber Web Tools, AI Guidance &amp; Code</a>.</p>
]]></description>
		
					<wfw:commentRss>https://tools.belchamber.us/copying-mysql-databases-at-the-command-line-is-fast-and-easy/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">526</post-id>	</item>
		<item>
		<title>PHP Developers:  MySQLi &#038; PDO forcing errors helpful for debugging queries when accessing private or protected isolated classes</title>
		<link>https://tools.belchamber.us/mysqli-pdo-forcing-errors-helpful-for-debuggin-queries/</link>
					<comments>https://tools.belchamber.us/mysqli-pdo-forcing-errors-helpful-for-debuggin-queries/#respond</comments>
		
		<dc:creator><![CDATA[Aaron Belchamber]]></dc:creator>
		<pubDate>Tue, 02 Sep 2014 11:37:17 +0000</pubDate>
				<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[MySQL]]></category>
		<guid isPermaLink="false">http://tools.belchamber.us/?p=499</guid>

					<description><![CDATA[<p>Sometimes you don&#8217;t have much control over other people&#8217;s code but your code must interact with it.  That&#8217;s one of the issues you will encounter when you work in a collaborative coding environment and you&#8217;re all developing code the proper way &#8212; there&#8217;s encapsulation so you know your code is isolated to only what you [&#8230;]</p>
<p>The post <a href="https://tools.belchamber.us/mysqli-pdo-forcing-errors-helpful-for-debuggin-queries/">PHP Developers:  MySQLi &#038; PDO forcing errors helpful for debugging queries when accessing private or protected isolated classes</a> appeared first on <a href="https://tools.belchamber.us">Belchamber Web Tools, AI Guidance &amp; Code</a>.</p>
]]></description>
		
					<wfw:commentRss>https://tools.belchamber.us/mysqli-pdo-forcing-errors-helpful-for-debuggin-queries/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">499</post-id>	</item>
		<item>
		<title>Mysql PDO standard insert (persist) of data to a table with placeholders to protect from MySQL injection attacks</title>
		<link>https://tools.belchamber.us/mysql-pdo-standard-insert-persist-of-data-to-a-table-with-placeholders-to-protect-from-mysql-injection-attacks/</link>
					<comments>https://tools.belchamber.us/mysql-pdo-standard-insert-persist-of-data-to-a-table-with-placeholders-to-protect-from-mysql-injection-attacks/#comments</comments>
		
		<dc:creator><![CDATA[Aaron Belchamber]]></dc:creator>
		<pubDate>Wed, 02 Jul 2014 18:52:29 +0000</pubDate>
				<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>
		<guid isPermaLink="false">http://tools.belchamber.us/?p=331</guid>

					<description><![CDATA[<p>This is a much more secure way to insert records and prevent MySQL injection.  This assumes that $this-conn is your MySQLi PDO database connection object that you&#8217;ve already initialized:</p>
<p>The post <a href="https://tools.belchamber.us/mysql-pdo-standard-insert-persist-of-data-to-a-table-with-placeholders-to-protect-from-mysql-injection-attacks/">Mysql PDO standard insert (persist) of data to a table with placeholders to protect from MySQL injection attacks</a> appeared first on <a href="https://tools.belchamber.us">Belchamber Web Tools, AI Guidance &amp; Code</a>.</p>
]]></description>
		
					<wfw:commentRss>https://tools.belchamber.us/mysql-pdo-standard-insert-persist-of-data-to-a-table-with-placeholders-to-protect-from-mysql-injection-attacks/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">331</post-id>	</item>
		<item>
		<title>Quickly update a database field in MySQL by replacing one value with another with find and replace.</title>
		<link>https://tools.belchamber.us/quickly-update-a-database-field-in-mysql-by-replacing-one-value-with-another-with-find-and-replace/</link>
					<comments>https://tools.belchamber.us/quickly-update-a-database-field-in-mysql-by-replacing-one-value-with-another-with-find-and-replace/#respond</comments>
		
		<dc:creator><![CDATA[Aaron Belchamber]]></dc:creator>
		<pubDate>Fri, 21 Mar 2014 01:22:33 +0000</pubDate>
				<category><![CDATA[MySQL]]></category>
		<guid isPermaLink="false">http://tools.belchamber.us/?p=173</guid>

					<description><![CDATA[<p>This is a MySQL query I find myself using in a bunch of situations when there are multiple users contributing to articles or other means of providing content.  It&#8217;s usually to replace absolute links like &#8220;http://tools.belchamber.us/link-here/&#8221; to just &#8220;/link-here/&#8221;, but I found it&#8217;s useful for many other things.  Recently, I had to import thousands of [&#8230;]</p>
<p>The post <a href="https://tools.belchamber.us/quickly-update-a-database-field-in-mysql-by-replacing-one-value-with-another-with-find-and-replace/">Quickly update a database field in MySQL by replacing one value with another with find and replace.</a> appeared first on <a href="https://tools.belchamber.us">Belchamber Web Tools, AI Guidance &amp; Code</a>.</p>
]]></description>
		
					<wfw:commentRss>https://tools.belchamber.us/quickly-update-a-database-field-in-mysql-by-replacing-one-value-with-another-with-find-and-replace/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">173</post-id>	</item>
		<item>
		<title>Quickly identify WordPress posts with duplicate content directly from the MySQL database with a single query</title>
		<link>https://tools.belchamber.us/153/</link>
					<comments>https://tools.belchamber.us/153/#respond</comments>
		
		<dc:creator><![CDATA[Aaron Belchamber]]></dc:creator>
		<pubDate>Sat, 15 Mar 2014 13:18:46 +0000</pubDate>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[WordPress]]></category>
		<guid isPermaLink="false">http://tools.belchamber.us/?p=153</guid>

					<description><![CDATA[<p>This handy query will return all the post IDs from all your WordPress posts that are exact duplicates.  I usually run this query in a loop and then will delete the newest post duplicate.  This problem usually comes from multiple users importing content into the new WordPress site or importing content from Joomla into WordPress [&#8230;]</p>
<p>The post <a href="https://tools.belchamber.us/153/">Quickly identify WordPress posts with duplicate content directly from the MySQL database with a single query</a> appeared first on <a href="https://tools.belchamber.us">Belchamber Web Tools, AI Guidance &amp; Code</a>.</p>
]]></description>
		
					<wfw:commentRss>https://tools.belchamber.us/153/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">153</post-id>	</item>
		<item>
		<title>Getting that strange &#8220;black diamond&#8221; and other weird symbol characters that return text from a database?</title>
		<link>https://tools.belchamber.us/getting-that-strange-black-diamond-and-other-weird-symbol-characters-that-return-text-from-a-database/</link>
					<comments>https://tools.belchamber.us/getting-that-strange-black-diamond-and-other-weird-symbol-characters-that-return-text-from-a-database/#respond</comments>
		
		<dc:creator><![CDATA[Aaron Belchamber]]></dc:creator>
		<pubDate>Sun, 02 Mar 2014 23:42:38 +0000</pubDate>
				<category><![CDATA[MySQL]]></category>
		<guid isPermaLink="false">http://tools.belchamber.us/?p=118</guid>

					<description><![CDATA[<p>It&#8217;s inevitable, right when you thought your website was going smoothly, suddenly those strange symbols like the &#8220;black diamond question marks&#8221; start popping up. I sometimes have to clean variables returned from form input and other external text with PHP&#8217;s &#8220;iconv&#8221; function, but if the data is coming from a database and showing up funky, [&#8230;]</p>
<p>The post <a href="https://tools.belchamber.us/getting-that-strange-black-diamond-and-other-weird-symbol-characters-that-return-text-from-a-database/">Getting that strange &#8220;black diamond&#8221; and other weird symbol characters that return text from a database?</a> appeared first on <a href="https://tools.belchamber.us">Belchamber Web Tools, AI Guidance &amp; Code</a>.</p>
]]></description>
		
					<wfw:commentRss>https://tools.belchamber.us/getting-that-strange-black-diamond-and-other-weird-symbol-characters-that-return-text-from-a-database/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">118</post-id>	</item>
		<item>
		<title>Connecting to PDO as an object</title>
		<link>https://tools.belchamber.us/connecting-to-pdo-as-an-object/</link>
					<comments>https://tools.belchamber.us/connecting-to-pdo-as-an-object/#respond</comments>
		
		<dc:creator><![CDATA[Aaron Belchamber]]></dc:creator>
		<pubDate>Wed, 26 Feb 2014 04:59:38 +0000</pubDate>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>
		<guid isPermaLink="false">http://tools.belchamber.us/cms/?p=36</guid>

					<description><![CDATA[<p>Moving from procedural with mysql_connect, etc to PDO objects should be an easy transition.  It&#8217;s so much faster and reliable, too.  The &#8220;mysql&#8221; library in PHP will soon be deprecated, so you hold-outs won&#8217;t have a choice.  It&#8217;s actually less code to write and get whole queries into resulting arrays much faster.  Trust me! Here&#8217;s [&#8230;]</p>
<p>The post <a href="https://tools.belchamber.us/connecting-to-pdo-as-an-object/">Connecting to PDO as an object</a> appeared first on <a href="https://tools.belchamber.us">Belchamber Web Tools, AI Guidance &amp; Code</a>.</p>
]]></description>
		
					<wfw:commentRss>https://tools.belchamber.us/connecting-to-pdo-as-an-object/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">36</post-id>	</item>
	</channel>
</rss>
