<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
	<id>https://bs.ss220.club/index.php?action=history&amp;feed=atom&amp;title=MySQL</id>
	<title>MySQL - История изменений</title>
	<link rel="self" type="application/atom+xml" href="https://bs.ss220.club/index.php?action=history&amp;feed=atom&amp;title=MySQL"/>
	<link rel="alternate" type="text/html" href="https://bs.ss220.club/index.php?title=MySQL&amp;action=history"/>
	<updated>2026-04-28T19:24:20Z</updated>
	<subtitle>История изменений этой страницы в вики</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>https://bs.ss220.club/index.php?title=MySQL&amp;diff=28787&amp;oldid=prev</id>
		<title>imported&gt;SpaceManiac: Remove &quot;Game Resources&quot; category</title>
		<link rel="alternate" type="text/html" href="https://bs.ss220.club/index.php?title=MySQL&amp;diff=28787&amp;oldid=prev"/>
		<updated>2020-12-04T03:46:38Z</updated>

		<summary type="html">&lt;p&gt;Remove &amp;quot;Game Resources&amp;quot; category&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ru&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Предыдущая версия&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Версия от 03:46, 4 декабря 2020&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l217&quot;&gt;Строка 217:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Строка 217:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{Contribution guides}}&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{Contribution guides}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:Guides]] [[Category:Game Resources]]&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>imported&gt;SpaceManiac</name></author>
	</entry>
	<entry>
		<id>https://bs.ss220.club/index.php?title=MySQL&amp;diff=28786&amp;oldid=prev</id>
		<title>imported&gt;LiamLime в 05:24, 4 октября 2015</title>
		<link rel="alternate" type="text/html" href="https://bs.ss220.club/index.php?title=MySQL&amp;diff=28786&amp;oldid=prev"/>
		<updated>2015-10-04T05:24:35Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ru&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Предыдущая версия&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Версия от 05:24, 4 октября 2015&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l83&quot;&gt;Строка 83:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Строка 83:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;WHERE ckey LIKE &amp;quot;%abc%&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;WHERE ckey LIKE &amp;quot;%abc%&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This will return a list of players, whose ckey contains the letters &#039;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;err&lt;/del&gt;&#039;. The % signs before and after abc mean that anything can be located before or after abc. LIKE also ignores case, so all of the following will work: &quot;&#039;&#039;&#039;abc&#039;&#039;&#039;n&quot;, &quot;aocwegijaw&#039;&#039;&#039;abc&#039;&#039;&#039;maobr&quot;, &quot;&#039;&#039;&#039;abc&#039;&#039;&#039;&quot;, &quot;&#039;&#039;&#039;ABC&#039;&#039;&#039;&quot;, &quot;&#039;&#039;&#039;AbC&#039;&#039;&#039;&quot;, &quot;E&#039;&#039;&#039;Abc&#039;&#039;&#039;&quot;, &quot;aWAEGaewgaWEG&#039;&#039;&#039;aBc&#039;&#039;&#039;aegawe&quot;. Your example might require you to replace the string abc with a different character combination, depending on which ckeys you have logged.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This will return a list of players, whose ckey contains the letters &#039;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;abc&lt;/ins&gt;&#039;. The % signs before and after abc mean that anything can be located before or after abc. LIKE also ignores case, so all of the following will work: &quot;&#039;&#039;&#039;abc&#039;&#039;&#039;n&quot;, &quot;aocwegijaw&#039;&#039;&#039;abc&#039;&#039;&#039;maobr&quot;, &quot;&#039;&#039;&#039;abc&#039;&#039;&#039;&quot;, &quot;&#039;&#039;&#039;ABC&#039;&#039;&#039;&quot;, &quot;&#039;&#039;&#039;AbC&#039;&#039;&#039;&quot;, &quot;E&#039;&#039;&#039;Abc&#039;&#039;&#039;&quot;, &quot;aWAEGaewgaWEG&#039;&#039;&#039;aBc&#039;&#039;&#039;aegawe&quot;. Your example might require you to replace the string abc with a different character combination, depending on which ckeys you have logged.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==== Numbers ====&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==== Numbers ====&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>imported&gt;LiamLime</name></author>
	</entry>
	<entry>
		<id>https://bs.ss220.club/index.php?title=MySQL&amp;diff=28785&amp;oldid=prev</id>
		<title>imported&gt;LiamLime в 05:22, 4 октября 2015</title>
		<link rel="alternate" type="text/html" href="https://bs.ss220.club/index.php?title=MySQL&amp;diff=28785&amp;oldid=prev"/>
		<updated>2015-10-04T05:22:40Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ru&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Предыдущая версия&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Версия от 05:22, 4 октября 2015&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l81&quot;&gt;Строка 81:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Строка 81:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;SELECT *&amp;lt;br&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;SELECT *&amp;lt;br&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;FROM ss13_player&amp;lt;br&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;FROM ss13_player&amp;lt;br&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;WHERE ckey LIKE &quot;%&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;rro&lt;/del&gt;%&quot;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;WHERE ckey LIKE &quot;%&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;abc&lt;/ins&gt;%&quot;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This will return a list of players, whose ckey contains the letters &#039;err&#039;. The % signs before and after &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;rro &lt;/del&gt;mean that anything can be located before or after &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;rro&lt;/del&gt;. LIKE also ignores case, so all of the following will work: &quot;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;e&lt;/del&gt;&#039;&#039;&#039;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;rro&#039;&#039;&#039;&quot;, &quot;&#039;&#039;&#039;rro&lt;/del&gt;&#039;&#039;&#039;n&quot;, &quot;aocwegijaw&#039;&#039;&#039;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;rro&lt;/del&gt;&#039;&#039;&#039;maobr&quot;, &quot;&#039;&#039;&#039;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;rro&lt;/del&gt;&#039;&#039;&#039;&quot;, &quot;&#039;&#039;&#039;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;RRO&lt;/del&gt;&#039;&#039;&#039;&quot;, &quot;&#039;&#039;&#039;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;RrO&lt;/del&gt;&#039;&#039;&#039;&quot;, &quot;E&#039;&#039;&#039;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Rro&lt;/del&gt;&#039;&#039;&#039;&quot;, &quot;aWAEGaewgaWEG&#039;&#039;&#039;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;rRo&lt;/del&gt;&#039;&#039;&#039;aegawe&quot;. Your example might require you to replace the string &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;rro &lt;/del&gt;with a different character combination, depending on which ckeys you have logged.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This will return a list of players, whose ckey contains the letters &#039;err&#039;. The % signs before and after &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;abc &lt;/ins&gt;mean that anything can be located before or after &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;abc&lt;/ins&gt;. LIKE also ignores case, so all of the following will work: &quot;&#039;&#039;&#039;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;abc&lt;/ins&gt;&#039;&#039;&#039;n&quot;, &quot;aocwegijaw&#039;&#039;&#039;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;abc&lt;/ins&gt;&#039;&#039;&#039;maobr&quot;, &quot;&#039;&#039;&#039;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;abc&lt;/ins&gt;&#039;&#039;&#039;&quot;, &quot;&#039;&#039;&#039;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;ABC&lt;/ins&gt;&#039;&#039;&#039;&quot;, &quot;&#039;&#039;&#039;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;AbC&lt;/ins&gt;&#039;&#039;&#039;&quot;, &quot;E&#039;&#039;&#039;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Abc&lt;/ins&gt;&#039;&#039;&#039;&quot;, &quot;aWAEGaewgaWEG&#039;&#039;&#039;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;aBc&lt;/ins&gt;&#039;&#039;&#039;aegawe&quot;. Your example might require you to replace the string &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;abc &lt;/ins&gt;with a different character combination, depending on which ckeys you have logged.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==== Numbers ====&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==== Numbers ====&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>imported&gt;LiamLime</name></author>
	</entry>
	<entry>
		<id>https://bs.ss220.club/index.php?title=MySQL&amp;diff=28784&amp;oldid=prev</id>
		<title>imported&gt;LiamLime в 05:20, 4 октября 2015</title>
		<link rel="alternate" type="text/html" href="https://bs.ss220.club/index.php?title=MySQL&amp;diff=28784&amp;oldid=prev"/>
		<updated>2015-10-04T05:20:21Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;a href=&quot;https://bs.ss220.club/index.php?title=MySQL&amp;amp;diff=28784&amp;amp;oldid=28783&quot;&gt;Внесённые изменения&lt;/a&gt;</summary>
		<author><name>imported&gt;LiamLime</name></author>
	</entry>
	<entry>
		<id>https://bs.ss220.club/index.php?title=MySQL&amp;diff=28783&amp;oldid=prev</id>
		<title>imported&gt;LiamLime: /* Table Naming Convention */</title>
		<link rel="alternate" type="text/html" href="https://bs.ss220.club/index.php?title=MySQL&amp;diff=28783&amp;oldid=prev"/>
		<updated>2015-10-04T05:17:16Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Table Naming Convention&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ru&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Предыдущая версия&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Версия от 05:17, 4 октября 2015&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l33&quot;&gt;Строка 33:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Строка 33:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Table Naming Convention ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Table Naming Convention ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Tables are usually named in lower case, they use the underscore as a word separator and the first word is usually the name of the &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;user that created &lt;/del&gt;the table &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;or who owns the database&lt;/del&gt;. Most tables in the tgs database are called &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;erro_X, because &#039;erro&#039; was the user who made them&lt;/del&gt;. The last common thing is to always use singular. So &#039;user_reports&#039; is not a good name, &#039;user_report&#039; is. These naming conventions are there to help you down the road, so you will not be in doubt whether a table is called &#039;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;erro_players&lt;/del&gt;&#039; or &#039;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;erro_player&lt;/del&gt;&#039;, etc. Examples: &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;erro_player&lt;/del&gt;, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;erro_connection_log&lt;/del&gt;, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;erro_poll_question&lt;/del&gt;, etc.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Tables are usually named in lower case, they use the underscore as a word separator and the first word is usually the name of the &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;project &lt;/ins&gt;the table &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;is a part of&lt;/ins&gt;. Most tables in the tgs database are called &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;ss13_X&lt;/ins&gt;. The last common thing is to always use singular. So &#039;user_reports&#039; is not a good name, &#039;user_report&#039; is. These naming conventions are there to help you down the road, so you will not be in doubt whether a table is called &#039;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;ss13_players&lt;/ins&gt;&#039; or &#039;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;ss13_player&lt;/ins&gt;&#039;, etc. Examples: &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;ss13_player&lt;/ins&gt;, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;ss13_connection_log&lt;/ins&gt;, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;ss13_poll_question&lt;/ins&gt;, etc.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== SELECT ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== SELECT ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>imported&gt;LiamLime</name></author>
	</entry>
	<entry>
		<id>https://bs.ss220.club/index.php?title=MySQL&amp;diff=28782&amp;oldid=prev</id>
		<title>imported&gt;Rockdtben: Created page with &quot;MySQL is a language you use with databases. Queries are however not interpreted &#039;one line at a time&#039;, instead they are best described as a single instruction, with lots of arg...&quot;</title>
		<link rel="alternate" type="text/html" href="https://bs.ss220.club/index.php?title=MySQL&amp;diff=28782&amp;oldid=prev"/>
		<updated>2014-04-15T13:41:25Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;MySQL is a language you use with databases. Queries are however not interpreted &amp;#039;one line at a time&amp;#039;, instead they are best described as a single instruction, with lots of arg...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;MySQL is a language you use with databases. Queries are however not interpreted &amp;#039;one line at a time&amp;#039;, instead they are best described as a single instruction, with lots of arguments, some of which can be conditions.&lt;br /&gt;
&lt;br /&gt;
== Software ==&lt;br /&gt;
&lt;br /&gt;
#Xampp ([http://www.apachefriends.org/en/xampp.html link]) (See our [[Downloading the source code#Setting up the database|Setting up the database]] guide)&lt;br /&gt;
#MySQL Workbench ([http://www.mysql.com/products/workbench/ link])&lt;br /&gt;
&lt;br /&gt;
Set up MySQL Workbench:&lt;br /&gt;
&lt;br /&gt;
*Once you have the database set up, open MySQL Workbench&lt;br /&gt;
*Select &amp;#039;New Connection&amp;#039;&lt;br /&gt;
:*Connection name: My Database (or whatever you want)&lt;br /&gt;
:*Hostname: 127.0.0.1&lt;br /&gt;
:*Port: 3306&lt;br /&gt;
:*Username: root&lt;br /&gt;
*Ok&lt;br /&gt;
*Doubleclick the new connection in the list&lt;br /&gt;
&lt;br /&gt;
== Types of queries ==&lt;br /&gt;
&lt;br /&gt;
Their names describe what you want to do.&lt;br /&gt;
&lt;br /&gt;
SELECT - Selects data from the database&amp;lt;br&amp;gt;&lt;br /&gt;
INSERT - Inserts data into a table&amp;lt;br&amp;gt;&lt;br /&gt;
UPDATE - Updates existing data in a table&amp;lt;br&amp;gt;&lt;br /&gt;
DELETE - Deletes existing data from a table&lt;br /&gt;
&lt;br /&gt;
There are more, but this guide doesn&amp;#039;t deal with them:&amp;lt;br&amp;gt;&lt;br /&gt;
CREATE - Creates databases, tables, views, procedures, triggers, etc. Whatever you define &amp;lt;br&amp;gt;&lt;br /&gt;
ALTER - Changes the properties of something you created (for example, which columns a table has)&amp;lt;br&amp;gt;&lt;br /&gt;
DROP - Deletes something you created (DELETE only deletes the data, DROP deletes the table itself.)&lt;br /&gt;
&lt;br /&gt;
== Table Naming Convention ==&lt;br /&gt;
&lt;br /&gt;
Tables are usually named in lower case, they use the underscore as a word separator and the first word is usually the name of the user that created the table or who owns the database. Most tables in the tgs database are called erro_X, because &amp;#039;erro&amp;#039; was the user who made them. The last common thing is to always use singular. So &amp;#039;user_reports&amp;#039; is not a good name, &amp;#039;user_report&amp;#039; is. These naming conventions are there to help you down the road, so you will not be in doubt whether a table is called &amp;#039;erro_players&amp;#039; or &amp;#039;erro_player&amp;#039;, etc. Examples: erro_player, erro_connection_log, erro_poll_question, etc.&lt;br /&gt;
&lt;br /&gt;
== SELECT ==&lt;br /&gt;
&lt;br /&gt;
Let&amp;#039;s select something. This assumes you have the tgs database set up and that you played a few rounds with it enabled.&lt;br /&gt;
&lt;br /&gt;
=== Everything ===&lt;br /&gt;
&lt;br /&gt;
Execute the following statement:&lt;br /&gt;
&lt;br /&gt;
SELECT *&amp;lt;br&amp;gt;&lt;br /&gt;
FROM erro_player&lt;br /&gt;
&lt;br /&gt;
You now have a list of players who played on your server so far. I can&amp;#039;t provide you with a screenshot for privacy reasons, but you can see what you get in your output. The * in the statement defines that you want to select all columns.&lt;br /&gt;
&lt;br /&gt;
=== Filter columns ===&lt;br /&gt;
&lt;br /&gt;
The problem is that when you are selecting something from the database in programs, you&amp;#039;ll want as little data transfer as possible. So selecting all columns is rarely needed. Let&amp;#039;s suppose we want a list of players and what their last admin rank was:&lt;br /&gt;
&lt;br /&gt;
SELECT ckey, lastadminrank&amp;lt;br&amp;gt;&lt;br /&gt;
FROM erro_player&lt;br /&gt;
&lt;br /&gt;
Voila. Once you execute this, you will get a table, which has a list of all the players who played on your server. The returned table will contain two columns: Their ckey and the admin rank they held when they last connected.&lt;br /&gt;
&lt;br /&gt;
=== Filter rows ===&lt;br /&gt;
&lt;br /&gt;
Well, now that we managed to isolate a few columns, let&amp;#039;s see about filtering through rows. We&amp;#039;ll return to selecting all columns tho. Conditions for which rows you want returned and which you don&amp;#039;t are defined in the WHERE portion of the SELECT statement.&lt;br /&gt;
&lt;br /&gt;
==== Strings ====&lt;br /&gt;
&lt;br /&gt;
Execute this:&lt;br /&gt;
&lt;br /&gt;
SELECT *&amp;lt;br&amp;gt;&lt;br /&gt;
FROM erro_player&amp;lt;br&amp;gt;&lt;br /&gt;
WHERE lastadminrank = &amp;quot;Player&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This will return a list of people, who have their &amp;#039;lastadminrank&amp;#039; column set to &amp;quot;Player&amp;quot;. &amp;#039;&amp;#039;&amp;#039;Note the single =&amp;#039;&amp;#039;&amp;#039; So no admins will be in the returned list. So how do we get admins? Simple.&lt;br /&gt;
&lt;br /&gt;
SELECT *&amp;lt;br&amp;gt;&lt;br /&gt;
FROM erro_player&amp;lt;br&amp;gt;&lt;br /&gt;
WHERE lastadminrank != &amp;quot;Player&amp;quot;&lt;br /&gt;
&lt;br /&gt;
As you know != means &amp;quot;not equal&amp;quot;. It is however case sensitive. It also doesn&amp;#039;t allow you to do any clever filtering. Let&amp;#039;s look at LIKE:&lt;br /&gt;
&lt;br /&gt;
==== LIKE ====&lt;br /&gt;
&lt;br /&gt;
SELECT *&amp;lt;br&amp;gt;&lt;br /&gt;
FROM erro_player&amp;lt;br&amp;gt;&lt;br /&gt;
WHERE ckey LIKE &amp;quot;%rro%&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This will return a list of players, whose ckey contains the letters &amp;#039;err&amp;#039;. The % signs before and after rro mean that anything can be located before or after rro. LIKE also ignores case, so all of the following will work: &amp;quot;e&amp;#039;&amp;#039;&amp;#039;rro&amp;#039;&amp;#039;&amp;#039;&amp;quot;, &amp;quot;&amp;#039;&amp;#039;&amp;#039;rro&amp;#039;&amp;#039;&amp;#039;n&amp;quot;, &amp;quot;aocwegijaw&amp;#039;&amp;#039;&amp;#039;rro&amp;#039;&amp;#039;&amp;#039;maobr&amp;quot;, &amp;quot;&amp;#039;&amp;#039;&amp;#039;rro&amp;#039;&amp;#039;&amp;#039;&amp;quot;, &amp;quot;&amp;#039;&amp;#039;&amp;#039;RRO&amp;#039;&amp;#039;&amp;#039;&amp;quot;, &amp;quot;&amp;#039;&amp;#039;&amp;#039;RrO&amp;#039;&amp;#039;&amp;#039;&amp;quot;, &amp;quot;E&amp;#039;&amp;#039;&amp;#039;Rro&amp;#039;&amp;#039;&amp;#039;&amp;quot;, &amp;quot;aWAEGaewgaWEG&amp;#039;&amp;#039;&amp;#039;rRo&amp;#039;&amp;#039;&amp;#039;aegawe&amp;quot;. Your example might require you to replace the string rro with a different character combination, depending on which ckeys you have logged.&lt;br /&gt;
&lt;br /&gt;
==== Numbers ====&lt;br /&gt;
&lt;br /&gt;
Numbers use what you&amp;#039;d expect. &amp;gt;, &amp;gt;=, &amp;lt;=, &amp;lt;, =, !=&lt;br /&gt;
&lt;br /&gt;
SELECT *&amp;lt;br&amp;gt;&lt;br /&gt;
FROM erro_player&amp;lt;br&amp;gt;&lt;br /&gt;
WHERE id &amp;lt; 50&lt;br /&gt;
&lt;br /&gt;
will return all lines where the id is lower than 50.&lt;br /&gt;
&lt;br /&gt;
==== Date and time ====&lt;br /&gt;
&lt;br /&gt;
The erro_player table contains two fields which are of type &amp;#039;datetime&amp;#039;: firstseen and lastseen.&lt;br /&gt;
&lt;br /&gt;
You can compare them directly with &amp;gt;, &amp;lt;, =, !=. &amp;#039;&amp;#039;&amp;#039;Note the single =&amp;#039;&amp;#039;&amp;#039;. For example: If you want to only select people who have only logged in once, and then never again:&lt;br /&gt;
&lt;br /&gt;
SELECT *&amp;lt;br&amp;gt;&lt;br /&gt;
FROM erro_player&amp;lt;br&amp;gt;&lt;br /&gt;
WHERE firstseen = lastseen&lt;br /&gt;
&lt;br /&gt;
===== DATE() =====&lt;br /&gt;
&lt;br /&gt;
You can however also select people who were first seen on a particular date. You&amp;#039;ll need to use a function for that tho:&lt;br /&gt;
&lt;br /&gt;
SELECT *&amp;lt;br&amp;gt;&lt;br /&gt;
FROM erro_player&amp;lt;br&amp;gt;&lt;br /&gt;
WHERE DATE(firstseen) = &amp;quot;2013-04-19&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This will return a list of players who were first seen on 19 April 2013. If you want to get people who joined after April 17 2013, execute the following: (NOTE, This will only show people who joined on 18 April or later! Use &amp;gt;= if you want to include 17 April.)&lt;br /&gt;
&lt;br /&gt;
SELECT *&amp;lt;br&amp;gt;&lt;br /&gt;
FROM erro_player&amp;lt;br&amp;gt;&lt;br /&gt;
WHERE DATE(firstseen) &amp;gt; &amp;quot;2013-04-17&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===== DATEDIFF(), NOW() =====&lt;br /&gt;
&lt;br /&gt;
Okay, so now you know how to select people who joined after a constant date. But what about if you want to only select people who joined in the last 7 days? The date keeps changing all the time, the date in the select statement, however, remains the same. The fix is pretty easy:&lt;br /&gt;
&lt;br /&gt;
SELECT *&amp;lt;br&amp;gt;&lt;br /&gt;
FROM erro_player&amp;lt;br&amp;gt;&lt;br /&gt;
WHERE DATEDIFF(Now(),firstseen) &amp;lt; 7&lt;br /&gt;
&lt;br /&gt;
This will select everyone who joined 7 or fewer days ago.&lt;br /&gt;
&lt;br /&gt;
=== Combining column and row filtering ===&lt;br /&gt;
&lt;br /&gt;
Easy:&lt;br /&gt;
&lt;br /&gt;
SELECT ckey, firstseen&amp;lt;br&amp;gt;&lt;br /&gt;
FROM erro_player&amp;lt;br&amp;gt;&lt;br /&gt;
WHERE DATEDIFF(Now(),firstseen) &amp;lt; 7&lt;br /&gt;
&lt;br /&gt;
Does the same as the statement a few lines above, but also filters columns. Note that you don&amp;#039;t have to select all the columns you use in your where section. For example, even if you are not returning &amp;#039;firstseen&amp;#039;, but are using it in the WHERE section, this will still work:&lt;br /&gt;
&lt;br /&gt;
SELECT ckey&amp;lt;br&amp;gt;&lt;br /&gt;
FROM erro_player&amp;lt;br&amp;gt;&lt;br /&gt;
WHERE DATEDIFF(Now(),firstseen) &amp;lt; 7&lt;br /&gt;
&lt;br /&gt;
=== Multiple conditions, AND and OR ===&lt;br /&gt;
&lt;br /&gt;
So from here on, when we talk about conditions, we mean stuff in the WHERE section. You learned pretty much everything about filtering by columns already, so we&amp;#039;ll concentrate on how to get the data you want. Let&amp;#039;s suppose you want to select people who joined between 2 weeks ago and a week ago. So people who were already here 7 days ago, but were not yet here 14 days ago. Their DATEDIFF(Now(),firstseen) has to be higher than 7, but lower than 14. Well, the section title gave it away:&lt;br /&gt;
&lt;br /&gt;
SELECT *&amp;lt;br&amp;gt;&lt;br /&gt;
FROM erro_player&amp;lt;br&amp;gt;&lt;br /&gt;
WHERE DATEDIFF(Now(),firstseen) &amp;gt;= 7&lt;br /&gt;
:AND DATEDIFF(Now(),firstseen) &amp;lt; 14&lt;br /&gt;
&lt;br /&gt;
You can use AND, OR, NOT and XOR. &amp;amp;&amp;amp;, || and ! also work, but it is more common to use the words, so I encourage you to do that. Brackets ( and ) also work.&lt;br /&gt;
&lt;br /&gt;
=== Joining tables ===&lt;br /&gt;
&lt;br /&gt;
This is where the magic of MySQL happens... But I&amp;#039;m still writing it.&lt;br /&gt;
&lt;br /&gt;
== INSERT ==&lt;br /&gt;
&lt;br /&gt;
INSERT is used to insert a new entry into a table.&lt;br /&gt;
&lt;br /&gt;
If you have MySQL workbench opened, click &amp;quot;create a new SQL tab for executing queries&amp;quot; in the upper left, then right click the table you wish to insert into and select &amp;quot;Send to sql editor &amp;gt; insert statement&amp;quot;. Edit the grayed out section with actual data.&lt;br /&gt;
&lt;br /&gt;
* For columns marked &amp;#039;id&amp;#039;, use null. They have auto increment enabled, so they will just add the next value.&lt;br /&gt;
* For numbers, just write the number&lt;br /&gt;
* For strings, use single or double quotes to define them. Multiline strings work.&lt;br /&gt;
* If you wish to add the current date, use Now()&lt;br /&gt;
* If you wish to do a date based on Now(), do NOW() + INTERVAL 1 DAY (You can use SECOND, MINUTE, HOUR, DAY, WEEK,... Use google.)&lt;br /&gt;
* If you wish to add a date, use the format (with quotes) &amp;quot;2013-04-19 12:05:27&amp;quot;&lt;br /&gt;
* You can also add null for columns that don&amp;#039;t need a value, for example: erro_ban inserts null into the &amp;#039;unbanned&amp;#039;, which is set to 1 when the person gets unbanned.&lt;br /&gt;
&lt;br /&gt;
Here&amp;#039;s an example of a working insert statement:&lt;br /&gt;
&lt;br /&gt;
INSERT INTO `erro_player`&lt;br /&gt;
(`id`,`ckey`,`firstseen`,`lastseen`,`ip`,`computerid`,`lastadminrank`)&lt;br /&gt;
VALUES&lt;br /&gt;
(null, &amp;quot;errorage&amp;quot;, Now() - INTERVAL 7 DAY, Now(), &amp;quot;123.123.123.123&amp;quot;, &amp;quot;12345&amp;quot;, &amp;quot;GameAdmin&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
=== In MySQL Workbench ===&lt;br /&gt;
&lt;br /&gt;
In the menu on the left, expand the database (probably called &amp;#039;feedback&amp;#039;), right click the table you wish to delete from, select &amp;#039;edit table data&amp;#039;, at the end of the table, there is a row of &amp;#039;null&amp;#039; values, click on it, it&amp;#039;ll change the entry you clicked on to an input field. Fill out the rest of the line, and repeat until you entered all the lines you want. Then hit &amp;#039;Apply&amp;#039; in the bottom right and execute. Look at the output you get when you hit &amp;#039;Apply&amp;#039; if you want more examples for the INSERT statement.&lt;br /&gt;
&lt;br /&gt;
== UPDATE ==&lt;br /&gt;
&lt;br /&gt;
Guide not made yet. What I want to point out is that UPDATE is very dangerous. If you do UPDATE erro_player SET ckey = &amp;quot;someone&amp;quot;, it will set the value &amp;quot;someone&amp;quot; to the ckey column for EVERY SINGLE ROW.&lt;br /&gt;
&lt;br /&gt;
Here is an example of how to do this right, but you REALLY need to be careful with the UPDATE statement:&lt;br /&gt;
&lt;br /&gt;
UPDATE erro_player SET ckey = &amp;quot;someone&amp;quot; WHERE id = 6&lt;br /&gt;
&lt;br /&gt;
=== In MySQL Workbench ===&lt;br /&gt;
&lt;br /&gt;
In the menu on the left, expand the database (probably called &amp;#039;feedback&amp;#039;), right click the table you wish to delete from, select &amp;#039;edit table data&amp;#039;, doubleclick any field, edit it, select something else (so the &amp;#039;Apply&amp;#039; button in the bottom right is enabled), hit the &amp;#039;Apply&amp;#039; button and execute it. If you wish to see more examples of how UPDATE works, you can see the statements it provides you with.&lt;br /&gt;
&lt;br /&gt;
== DELETE ==&lt;br /&gt;
&lt;br /&gt;
Don&amp;#039;t even use. DELETE FROM erro_player will delete the entire player log (forever). &lt;br /&gt;
&lt;br /&gt;
Here is an example of how to use it if you ever need to:&lt;br /&gt;
&lt;br /&gt;
DELETE FROM erro_player WHERE id = 6&lt;br /&gt;
&lt;br /&gt;
The way you should handle this when making new databases is to include a &amp;#039;deleted&amp;#039; column in a table. For example:&lt;br /&gt;
&lt;br /&gt;
erro_player: ckey, lastadminrank, firstseen, lastseen, deleted&lt;br /&gt;
&lt;br /&gt;
Then, instead of using DELETE FROM erro_player WHERE id = 6, you&amp;#039;d delete it by doing UPDATE erro_player SET deleted = 1 WHERE id = 6.&amp;lt;br&amp;gt;&lt;br /&gt;
When selecting data from it, instead of doing SELECT * FROM erro_player, you&amp;#039;d do SELECT * FROM erro_player WHERE ISNULL(deleted)&amp;lt;br&amp;gt;&lt;br /&gt;
So you&amp;#039;d only &amp;#039;effectively&amp;#039; be deleting them, they would however still remain in the database. This allows you to fix potential issues, allowing you to restore entries by editing the &amp;#039;deleted&amp;#039; column. If you&amp;#039;d have used the DELETE statement, the data would be pretty much lost, if you hadn&amp;#039;t previously backed it up.&lt;br /&gt;
&lt;br /&gt;
=== In MySQL Workbench ===&lt;br /&gt;
&lt;br /&gt;
In the menu on the left, expand the database (probably called &amp;#039;feedback&amp;#039;), right click the table you wish to delete from, select &amp;#039;edit table data&amp;#039;, select any number of entries you wish to delete (don&amp;#039;t have to select the entire row, just have something in the row selected), right click the selected area and select &amp;#039;Delete Row(s)&amp;#039;, select something else (so the &amp;#039;Apply&amp;#039; button in the bottom right is enabled), hit the &amp;#039;Apply&amp;#039; button and execute it. If you wish to see more examples of how DELETE works, you can see the statements it provides you with.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Contribution guides}}&lt;br /&gt;
[[Category:Guides]] [[Category:Game Resources]]&lt;/div&gt;</summary>
		<author><name>imported&gt;Rockdtben</name></author>
	</entry>
</feed>