<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ca">
	<id>http://wiki.joanillo.org/index.php?action=history&amp;feed=atom&amp;title=PHP_i_MySQL%3A_exemples_b%C3%A0sics</id>
	<title>PHP i MySQL: exemples bàsics - Historial de revisió</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.joanillo.org/index.php?action=history&amp;feed=atom&amp;title=PHP_i_MySQL%3A_exemples_b%C3%A0sics"/>
	<link rel="alternate" type="text/html" href="http://wiki.joanillo.org/index.php?title=PHP_i_MySQL:_exemples_b%C3%A0sics&amp;action=history"/>
	<updated>2026-08-29T23:04:13Z</updated>
	<subtitle>Historial de revisió per a aquesta pàgina del wiki</subtitle>
	<generator>MediaWiki 1.34.2</generator>
	<entry>
		<id>http://wiki.joanillo.org/index.php?title=PHP_i_MySQL:_exemples_b%C3%A0sics&amp;diff=299075&amp;oldid=prev</id>
		<title>Joan: /* Connexió a la bd */</title>
		<link rel="alternate" type="text/html" href="http://wiki.joanillo.org/index.php?title=PHP_i_MySQL:_exemples_b%C3%A0sics&amp;diff=299075&amp;oldid=prev"/>
		<updated>2022-05-16T18:27:38Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Connexió a la bd&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&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;ca&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Versió més antiga&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revisió del 18:27, 16 maig 2022&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-l123&quot; &gt;Línia 123:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Línia 123:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;                     &amp;quot;IPAddress&amp;quot;: &amp;quot;172.17.0.2&amp;quot;,&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;                     &amp;quot;IPAddress&amp;quot;: &amp;quot;172.17.0.2&amp;quot;,&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;...&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;...&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; 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;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; 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;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;/pre&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;Aquesta IP és la mateixa que necessitem si ens volem connectar amb el Mysql Workbench, per tant això ja ho has fet moltes vegades.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;Aquesta IP és la mateixa que necessitem si ens volem connectar amb el Mysql Workbench, per tant això ja ho has fet moltes vegades.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Joan</name></author>
		
	</entry>
	<entry>
		<id>http://wiki.joanillo.org/index.php?title=PHP_i_MySQL:_exemples_b%C3%A0sics&amp;diff=299060&amp;oldid=prev</id>
		<title>Joan: /* Executar un procedure */</title>
		<link rel="alternate" type="text/html" href="http://wiki.joanillo.org/index.php?title=PHP_i_MySQL:_exemples_b%C3%A0sics&amp;diff=299060&amp;oldid=prev"/>
		<updated>2022-05-11T15:04:49Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Executar un procedure&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&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;ca&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Versió més antiga&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revisió del 15:04, 11 maig 2022&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-l345&quot; &gt;Línia 345:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Línia 345:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;==Executar un procedure==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;==Executar un procedure==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; 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;Ara treballarem amb la base de &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;dadse&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; 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;Ara treballarem amb la base de &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;dades ''classicmodels''&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;*https://wiki.joanillo.org/index.php/Cursors&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;*https://wiki.joanillo.org/index.php/Cursors&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;A la bd ''classicmodels'' tenim el procediment ''createEmailList()'' que ja vam veure (el tens a l'enllaç), i l'executes de la següent manera:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;A la bd ''classicmodels'' tenim el procediment ''createEmailList()'' que ja vam veure (el tens a l'enllaç), i l'executes de la següent manera:&lt;/div&gt;&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-l380&quot; &gt;Línia 380:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Línia 380:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;mgerard@classicmodelcars.com;ykato@classicmodelcars.com;mnishi@classicmodelcars.com;tking@classicmodelcars.com;pmarsh@classicmodelcars.com;afixter@classicmodelcars.com;bjones@classicmodelcars.com;lbott@classicmodelcars.com;pcastillo@classicmodelcars.com;ghernande@classicmodelcars.com;lbondur@classicmodelcars.com;gvanauf@classicmodelcars.com;ftseng@classicmodelcars.com;spatterson@classicmodelcars.com;jfirrelli@classicmodelcars.com;lthompson@classicmodelcars.com;ljennings@classicmodelcars.com;abow@classicmodelcars.com;gbondur@classicmodelcars.com;wpatterson@classicmodelcars.com;jfirrelli@classicmodelcars.com;mpatterso@classicmodelcars.com;dmurphy@classicmodelcars.com;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;mgerard@classicmodelcars.com;ykato@classicmodelcars.com;mnishi@classicmodelcars.com;tking@classicmodelcars.com;pmarsh@classicmodelcars.com;afixter@classicmodelcars.com;bjones@classicmodelcars.com;lbott@classicmodelcars.com;pcastillo@classicmodelcars.com;ghernande@classicmodelcars.com;lbondur@classicmodelcars.com;gvanauf@classicmodelcars.com;ftseng@classicmodelcars.com;spatterson@classicmodelcars.com;jfirrelli@classicmodelcars.com;lthompson@classicmodelcars.com;ljennings@classicmodelcars.com;abow@classicmodelcars.com;gbondur@classicmodelcars.com;wpatterson@classicmodelcars.com;jfirrelli@classicmodelcars.com;mpatterso@classicmodelcars.com;dmurphy@classicmodelcars.com;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; 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;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;=Tasques a realitzar=&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;=Tasques a realitzar=&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;Executaràs tots els scripts que s'han explicat a classe:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;Executaràs tots els scripts que s'han explicat a classe:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Joan</name></author>
		
	</entry>
	<entry>
		<id>http://wiki.joanillo.org/index.php?title=PHP_i_MySQL:_exemples_b%C3%A0sics&amp;diff=299044&amp;oldid=prev</id>
		<title>Joan: /* Entrega */</title>
		<link rel="alternate" type="text/html" href="http://wiki.joanillo.org/index.php?title=PHP_i_MySQL:_exemples_b%C3%A0sics&amp;diff=299044&amp;oldid=prev"/>
		<updated>2022-05-09T20:36:04Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Entrega&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&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;ca&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Versió més antiga&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revisió del 20:36, 9 maig 2022&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-l394&quot; &gt;Línia 394:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Línia 394:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;=Entrega=&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;=Entrega=&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; 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 class=&quot;diffchange diffchange-inline&quot;&gt;(TBD)&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; 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;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Entregaràs al Classroom, dins del termini previst, un pdf amb les evidències de què has realitzat els exercicis proposats en la teva màquina i amb el teu usuari.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; 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; &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;{{Autor}}, abril 2022&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;{{Autor}}, abril 2022&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Joan</name></author>
		
	</entry>
	<entry>
		<id>http://wiki.joanillo.org/index.php?title=PHP_i_MySQL:_exemples_b%C3%A0sics&amp;diff=299043&amp;oldid=prev</id>
		<title>Joan: /* Tasques a realitzar */</title>
		<link rel="alternate" type="text/html" href="http://wiki.joanillo.org/index.php?title=PHP_i_MySQL:_exemples_b%C3%A0sics&amp;diff=299043&amp;oldid=prev"/>
		<updated>2022-05-09T20:35:03Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Tasques a realitzar&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&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;ca&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Versió més antiga&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revisió del 20:35, 9 maig 2022&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-l387&quot; &gt;Línia 387:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Línia 387:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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 d'una fila&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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 d'una fila&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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 de múltiples files&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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 de múltiples files&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; 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;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; 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;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;*execució d'un procediment&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;Modificaràs els scripts de manera que en la sortida per pantalla, allà on hi ha els ''echos'' ho modificaràs de manera que surti el teu nom. Per exemple:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;Modificaràs els scripts de manera que en la sortida per pantalla, allà on hi ha els ''echos'' ho modificaràs de manera que surti el teu nom. Per exemple:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;&amp;lt;pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;&amp;lt;pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Joan</name></author>
		
	</entry>
	<entry>
		<id>http://wiki.joanillo.org/index.php?title=PHP_i_MySQL:_exemples_b%C3%A0sics&amp;diff=299042&amp;oldid=prev</id>
		<title>Joan: /* Tasques a realitzar */</title>
		<link rel="alternate" type="text/html" href="http://wiki.joanillo.org/index.php?title=PHP_i_MySQL:_exemples_b%C3%A0sics&amp;diff=299042&amp;oldid=prev"/>
		<updated>2022-05-09T20:34:33Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Tasques a realitzar&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&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;ca&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Versió més antiga&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revisió del 20:34, 9 maig 2022&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-l381&quot; &gt;Línia 381:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Línia 381:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;=Tasques a realitzar=&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;=Tasques a realitzar=&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; 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 class=&quot;diffchange diffchange-inline&quot;&gt;(TBD)&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; 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;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Executaràs tots els scripts que s'han explicat a classe:&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; 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;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;*insert&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; 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;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;*update&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; 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;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;*delete&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; 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;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;*select d'una fila&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; 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;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;*select de múltiples files&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; 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; &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; 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;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Modificaràs els scripts de manera que en la sortida per pantalla, allà on hi ha els ''echos'' ho modificaràs de manera que surti el teu nom. Per exemple:&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; 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;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;pre&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; 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;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;echo &amp;quot;Pepet - Record deleted successfully\n&amp;quot;;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; 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;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;/pre&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; 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; &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;=Entrega=&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;=Entrega=&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;(TBD)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;(TBD)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;{{Autor}}, abril 2022&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;{{Autor}}, abril 2022&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Joan</name></author>
		
	</entry>
	<entry>
		<id>http://wiki.joanillo.org/index.php?title=PHP_i_MySQL:_exemples_b%C3%A0sics&amp;diff=299028&amp;oldid=prev</id>
		<title>Joan: /* Docker de PHP i mysqli */</title>
		<link rel="alternate" type="text/html" href="http://wiki.joanillo.org/index.php?title=PHP_i_MySQL:_exemples_b%C3%A0sics&amp;diff=299028&amp;oldid=prev"/>
		<updated>2022-05-04T15:30:49Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Docker de PHP i mysqli&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&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;ca&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Versió més antiga&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revisió del 15:30, 4 maig 2022&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-l15&quot; &gt;Línia 15:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Línia 15:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;*https://hub.docker.com/r/bigtruedata/php-mysqli/dockerfile&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;*https://hub.docker.com/r/bigtruedata/php-mysqli/dockerfile&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; 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;Dins del directori de treball creem una carpeta&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;, i el fitxer ''Dockerfile''&lt;/del&gt;:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; 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;Dins del directori de treball creem una carpeta:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;&amp;lt;pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;&amp;lt;pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;$ mkdir php-mysqli&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;$ mkdir php-mysqli&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; 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;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; 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;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;$ cd php-mysqli&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; 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 class=&quot;diffchange diffchange-inline&quot;&gt;$ joe &lt;/del&gt;Dockerfile&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; 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;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;/pre&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; 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;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;I a dins creem el fitxer ''&lt;/ins&gt;Dockerfile&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;'' amb el següent contingut:&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; 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;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;pre&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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 php:7&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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 php:7&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l91&quot; &gt;Línia 91:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Línia 93:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;Per tant, tens dues consoles obertes, amb dos dockers.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;Per tant, tens dues consoles obertes, amb dos dockers.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; 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;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;=Programació amb PHP=&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;=Programació amb PHP=&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;Per fer els nostres scripts de PHP treballarem amb la base de dades HR i la taula employees&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;Per fer els nostres scripts de PHP treballarem amb la base de dades HR i la taula employees&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Joan</name></author>
		
	</entry>
	<entry>
		<id>http://wiki.joanillo.org/index.php?title=PHP_i_MySQL:_exemples_b%C3%A0sics&amp;diff=298907&amp;oldid=prev</id>
		<title>Joan: /* Introducció */</title>
		<link rel="alternate" type="text/html" href="http://wiki.joanillo.org/index.php?title=PHP_i_MySQL:_exemples_b%C3%A0sics&amp;diff=298907&amp;oldid=prev"/>
		<updated>2022-04-13T09:34:24Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Introducció&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&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;ca&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Versió més antiga&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revisió del 09:34, 13 abr 2022&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-l3&quot; &gt;Línia 3:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Línia 3:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;En aquesta pràctica farem exemples atòmics (senzills) de diversos aspectes que ens interessen. Hem escollit PHP com a llenguatge de programació (però haguéssim pogut escollir qualsevol altre llenguatge). L'obectiu no és aprendre PHP, sinó veure que tot el que hem estat estudiant de bases de dades pren sentit quan des de les teves aplicacions que estàs programant accedeixes a les bases de dades.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;En aquesta pràctica farem exemples atòmics (senzills) de diversos aspectes que ens interessen. Hem escollit PHP com a llenguatge de programació (però haguéssim pogut escollir qualsevol altre llenguatge). L'obectiu no és aprendre PHP, sinó veure que tot el que hem estat estudiant de bases de dades pren sentit quan des de les teves aplicacions que estàs programant accedeixes a les bases de dades.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; 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;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; 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;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Connectors de MySQL:&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; 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;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;*https://www.mysql.com/products/connector/&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; 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;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;=Docker de PHP i mysqli=&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;=Docker de PHP i mysqli=&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;PHP és un llenguatge de programació de scripts. És popular perquè integrat en un servidor web com l'Apache serveix per programar pàgines web. Però també es pot programar PHP fora de la web, tan sols com a llenguatge de script.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;PHP és un llenguatge de programació de scripts. És popular perquè integrat en un servidor web com l'Apache serveix per programar pàgines web. Però també es pot programar PHP fora de la web, tan sols com a llenguatge de script.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Joan</name></author>
		
	</entry>
	<entry>
		<id>http://wiki.joanillo.org/index.php?title=PHP_i_MySQL:_exemples_b%C3%A0sics&amp;diff=298906&amp;oldid=prev</id>
		<title>Joan: /* select múltiples files */</title>
		<link rel="alternate" type="text/html" href="http://wiki.joanillo.org/index.php?title=PHP_i_MySQL:_exemples_b%C3%A0sics&amp;diff=298906&amp;oldid=prev"/>
		<updated>2022-04-13T09:32:15Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;select múltiples files&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&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;ca&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Versió més antiga&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revisió del 09:32, 13 abr 2022&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-l336&quot; &gt;Línia 336:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Línia 336:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;id: 105 - Name: David Austin (david.austin@sqltutorial.org)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;id: 105 - Name: David Austin (david.austin@sqltutorial.org)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;...&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;...&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; 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;&amp;lt;pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; 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;&amp;lt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;/&lt;/ins&gt;pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; 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 class=&quot;diffchange diffchange-inline&quot;&gt;execute &lt;/del&gt;procedure==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; 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;==&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Executar un &lt;/ins&gt;procedure==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;Ara treballarem amb la base de dadse&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;Ara treballarem amb la base de dadse&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;*https://wiki.joanillo.org/index.php/Cursors&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;*https://wiki.joanillo.org/index.php/Cursors&lt;/div&gt;&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-l373&quot; &gt;Línia 373:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Línia 373:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;mgerard@classicmodelcars.com;ykato@classicmodelcars.com;mnishi@classicmodelcars.com;tking@classicmodelcars.com;pmarsh@classicmodelcars.com;afixter@classicmodelcars.com;bjones@classicmodelcars.com;lbott@classicmodelcars.com;pcastillo@classicmodelcars.com;ghernande@classicmodelcars.com;lbondur@classicmodelcars.com;gvanauf@classicmodelcars.com;ftseng@classicmodelcars.com;spatterson@classicmodelcars.com;jfirrelli@classicmodelcars.com;lthompson@classicmodelcars.com;ljennings@classicmodelcars.com;abow@classicmodelcars.com;gbondur@classicmodelcars.com;wpatterson@classicmodelcars.com;jfirrelli@classicmodelcars.com;mpatterso@classicmodelcars.com;dmurphy@classicmodelcars.com;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;mgerard@classicmodelcars.com;ykato@classicmodelcars.com;mnishi@classicmodelcars.com;tking@classicmodelcars.com;pmarsh@classicmodelcars.com;afixter@classicmodelcars.com;bjones@classicmodelcars.com;lbott@classicmodelcars.com;pcastillo@classicmodelcars.com;ghernande@classicmodelcars.com;lbondur@classicmodelcars.com;gvanauf@classicmodelcars.com;ftseng@classicmodelcars.com;spatterson@classicmodelcars.com;jfirrelli@classicmodelcars.com;lthompson@classicmodelcars.com;ljennings@classicmodelcars.com;abow@classicmodelcars.com;gbondur@classicmodelcars.com;wpatterson@classicmodelcars.com;jfirrelli@classicmodelcars.com;mpatterso@classicmodelcars.com;dmurphy@classicmodelcars.com;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; 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;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; 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;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;=Tasques a realitzar=&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; 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;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;(TBD)&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; 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;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;=Entrega=&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; 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;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;(TBD)&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;{{Autor}}, abril 2022&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;{{Autor}}, abril 2022&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Joan</name></author>
		
	</entry>
	<entry>
		<id>http://wiki.joanillo.org/index.php?title=PHP_i_MySQL:_exemples_b%C3%A0sics&amp;diff=298905&amp;oldid=prev</id>
		<title>Joan: Es crea la pàgina amb «=Introducció= En aquesta assignatura hem estat treballant bases de dades des de diversos aspectes (disseny, llenguatge SQL, procediments,...). Com a alumne de DAM t'i...».</title>
		<link rel="alternate" type="text/html" href="http://wiki.joanillo.org/index.php?title=PHP_i_MySQL:_exemples_b%C3%A0sics&amp;diff=298905&amp;oldid=prev"/>
		<updated>2022-04-13T09:31:01Z</updated>

		<summary type="html">&lt;p&gt;Es crea la pàgina amb «=Introducció= En aquesta assignatura hem estat treballant bases de dades des de diversos aspectes (disseny, llenguatge SQL, procediments,...). Com a alumne de DAM t&amp;#039;i...».&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Pàgina nova&lt;/b&gt;&lt;/p&gt;&lt;div&gt;=Introducció=&lt;br /&gt;
En aquesta assignatura hem estat treballant bases de dades des de diversos aspectes (disseny, llenguatge SQL, procediments,...). Com a alumne de DAM t'interessa com els llenguatges de programació (PHP, per exemple) poden atacar les bases de dades.&lt;br /&gt;
&lt;br /&gt;
En aquesta pràctica farem exemples atòmics (senzills) de diversos aspectes que ens interessen. Hem escollit PHP com a llenguatge de programació (però haguéssim pogut escollir qualsevol altre llenguatge). L'obectiu no és aprendre PHP, sinó veure que tot el que hem estat estudiant de bases de dades pren sentit quan des de les teves aplicacions que estàs programant accedeixes a les bases de dades.&lt;br /&gt;
=Docker de PHP i mysqli=&lt;br /&gt;
PHP és un llenguatge de programació de scripts. És popular perquè integrat en un servidor web com l'Apache serveix per programar pàgines web. Però també es pot programar PHP fora de la web, tan sols com a llenguatge de script.&lt;br /&gt;
&lt;br /&gt;
''mysqli'' és la llibreria de PHP per accedir al MySQL. El core de PHP d'entrada no pot accedir a MySQL. S'ha d'instal·lar aquesta llibreria.&lt;br /&gt;
&lt;br /&gt;
Ho farem a partir d'un docker:&lt;br /&gt;
*https://hub.docker.com/r/bigtruedata/php-mysqli/dockerfile&lt;br /&gt;
&lt;br /&gt;
Dins del directori de treball creem una carpeta, i el fitxer ''Dockerfile'':&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mkdir php-mysqli&lt;br /&gt;
&lt;br /&gt;
$ joe Dockerfile&lt;br /&gt;
FROM php:7&lt;br /&gt;
&lt;br /&gt;
# Set the locale&lt;br /&gt;
RUN apt-get clean &amp;amp;&amp;amp; apt-get update &amp;amp;&amp;amp; apt-get install -y locales&lt;br /&gt;
&lt;br /&gt;
ENV LANG C.UTF-8&lt;br /&gt;
ENV LC_ALL C.UTF-8&lt;br /&gt;
&lt;br /&gt;
RUN docker-php-ext-install mysqli&lt;br /&gt;
RUN apt-get -y install vim nano joe&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
El ''docker'' de partida és un Linux que té instal·lada la versió 7 de PHP, i a sobre instal·lem la llibreria '''mysqli'''. També instal·lem els editors ''nano'' i ''joe'', i els ''locals'' de UTF8 per no tenir problemes amb els accents i caràcters especials.&lt;br /&gt;
&lt;br /&gt;
Muntem el nostre docker:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ docker build -t php-mysqli .&lt;br /&gt;
&lt;br /&gt;
Sending build context to Docker daemon  2.048kB&lt;br /&gt;
Step 1/4 : FROM php:7&lt;br /&gt;
7: Pulling from library/php&lt;br /&gt;
c229119241af: Pull complete &lt;br /&gt;
47e86af584f1: Pull complete &lt;br /&gt;
e1bd55b3ae5f: Pull complete&lt;br /&gt;
...&lt;br /&gt;
 ---&amp;gt; 58ed6de5ca0e&lt;br /&gt;
Successfully built 58ed6de5ca0e&lt;br /&gt;
Successfully tagged php-mysqli:latest&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ docker image ls&lt;br /&gt;
REPOSITORY                TAG                 IMAGE ID            CREATED             SIZE&lt;br /&gt;
php-mysqli                latest              7f9a1bfd7f5a        6 seconds ago       531MB&lt;br /&gt;
php                       7                   928524d94214        2 weeks ago         473MB&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
I ja podem arrencar-lo:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ docker run -dit --name php-mysqli -d php-mysqli /bin/bash&lt;br /&gt;
bc728fb6b8f3955dc28f30e963061c9f907c269bb9d93d66ccef544b64a7e978&lt;br /&gt;
&lt;br /&gt;
$ docker ps&lt;br /&gt;
CONTAINER ID        IMAGE                      COMMAND                  CREATED             STATUS                    PORTS                       NAMES&lt;br /&gt;
bc728fb6b8f3        php-mysqli                 &amp;quot;docker-php-entrypoi…&amp;quot;   34 seconds ago      Up 33 seconds                                         php-mysqli&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
I ara ja podem entrar dins del docker, on crearem una carpeta nostra dins del ''home'':&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ docker exec -it php-mysqli bash&lt;br /&gt;
root@bc728fb6b8f3:/#&lt;br /&gt;
root@f7c81ddaf004:/# cd /home/&lt;br /&gt;
root@f7c81ddaf004:/home# mkdir nom_alumne&lt;br /&gt;
root@f7c81ddaf004:/home# cd nom_alumne/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
I ara ja podem fer la primera prova de PHP:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ nano hola_mon.php&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
echo &amp;quot;hola mon&amp;quot;;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Executem el script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# php hola_mon.php &lt;br /&gt;
hola mon&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==Treballar amb dos dockers==&lt;br /&gt;
Un dels principals avantatges dels dockers és que pesen poc, i podem tenir un docker associat a cada servei que necessitem. Acabem de crear un docker amb PHP i ''mysqli'' (que el tens en la primera consola), i en una altra consola has d'obrir el docker de l'assignatura amb les bases de dades (on tens les 10 bases de dades de l'assignatura):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ docker start mysql_m02bd&lt;br /&gt;
$ docker exec -it mysql_m02bd mysql -ualumne -pkeiL2lai HR&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Per tant, tens dues consoles obertes, amb dos dockers.&lt;br /&gt;
=Programació amb PHP=&lt;br /&gt;
Per fer els nostres scripts de PHP treballarem amb la base de dades HR i la taula employees&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mysql&amp;gt; desc employees;&lt;br /&gt;
+---------------+--------------+------+-----+---------+----------------+&lt;br /&gt;
| Field         | Type         | Null | Key | Default | Extra          |&lt;br /&gt;
+---------------+--------------+------+-----+---------+----------------+&lt;br /&gt;
| employee_id   | int          | NO   | PRI | NULL    | auto_increment |&lt;br /&gt;
| first_name    | varchar(20)  | YES  |     | NULL    |                |&lt;br /&gt;
| last_name     | varchar(25)  | NO   |     | NULL    |                |&lt;br /&gt;
| email         | varchar(100) | NO   |     | NULL    |                |&lt;br /&gt;
| phone_number  | varchar(20)  | YES  |     | NULL    |                |&lt;br /&gt;
| hire_date     | date         | NO   |     | NULL    |                |&lt;br /&gt;
| job_id        | int          | NO   | MUL | NULL    |                |&lt;br /&gt;
| salary        | decimal(8,2) | NO   |     | NULL    |                |&lt;br /&gt;
| manager_id    | int          | YES  | MUL | NULL    |                |&lt;br /&gt;
| department_id | int          | YES  | MUL | NULL    |                |&lt;br /&gt;
+---------------+--------------+------+-----+---------+----------------+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==Connexió a la bd==&lt;br /&gt;
Per saber quina és la IP del nostre docker ''mysql_m02bd'', i per tant saber quina és la IP del servidor de MySQL al que ens volem connectar, fem:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ docker ps -&amp;gt; sabem quin és el ID del docker&lt;br /&gt;
&lt;br /&gt;
$ docker inspect 046dc7501fff&lt;br /&gt;
...&lt;br /&gt;
                    &amp;quot;Gateway&amp;quot;: &amp;quot;172.17.0.1&amp;quot;,&lt;br /&gt;
                    &amp;quot;IPAddress&amp;quot;: &amp;quot;172.17.0.2&amp;quot;,&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
Aquesta IP és la mateixa que necessitem si ens volem connectar amb el Mysql Workbench, per tant això ja ho has fet moltes vegades.&lt;br /&gt;
&lt;br /&gt;
I ara que ja sabem la IP, aquest és el servidor MySQL al qual ens volem connectar:&lt;br /&gt;
&lt;br /&gt;
script ''connexio.php''':&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
$conn = mysqli_connect(&amp;quot;172.17.0.2&amp;quot;, &amp;quot;alumne&amp;quot;, &amp;quot;keiL2lai&amp;quot;, &amp;quot;HR&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
if (!$conn) {&lt;br /&gt;
    echo &amp;quot;Error de connexió al MySQL.&amp;quot; . PHP_EOL;&lt;br /&gt;
    exit;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Èxit: S'ha realitzat la connexió a la bd HR.&amp;quot; . PHP_EOL;&lt;br /&gt;
echo &amp;quot;Informació del host: &amp;quot; . mysqli_get_host_info($conn) . PHP_EOL;&lt;br /&gt;
&lt;br /&gt;
mysqli_close($conn);&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Executem:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# php connexio.php &lt;br /&gt;
Èxit: S'ha realitzat la connexió a la bd HR.&lt;br /&gt;
Informació del host: 172.17.0.2 via TCP/IP&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Insert==&lt;br /&gt;
*https://www.php.net/manual/es/function.mysql-insert-id.php&lt;br /&gt;
&lt;br /&gt;
script '''insert.php''':&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
$servername = &amp;quot;172.17.0.2&amp;quot;;&lt;br /&gt;
$username = &amp;quot;alumne&amp;quot;;&lt;br /&gt;
$password = &amp;quot;keiL2lai&amp;quot;;&lt;br /&gt;
$dbname = &amp;quot;HR&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
// Create connection&lt;br /&gt;
$conn = mysqli_connect($servername, $username, $password, $dbname);&lt;br /&gt;
// Check connection&lt;br /&gt;
if (!$conn) {&lt;br /&gt;
    die(&amp;quot;Connection failed: &amp;quot; . mysqli_connect_error());&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
$sql = &amp;quot;INSERT INTO employees (first_name, last_name, email, hire_date, job_id, salary) values ('Pere','Rovira','provira@gmail.com','2020-05-24',16,10400)&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
if (mysqli_query($conn, $sql)) {&lt;br /&gt;
    $last_id = mysqli_insert_id($conn);&lt;br /&gt;
    echo &amp;quot;New record created successfully. Last inserted ID is: &amp;quot; . $last_id. &amp;quot;\n&amp;quot;;&lt;br /&gt;
} else {&lt;br /&gt;
    echo &amp;quot;Error: &amp;quot; . $sql . &amp;quot;&amp;lt;br&amp;gt;&amp;quot; . mysqli_error($conn);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
mysqli_close($conn);&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# php insert.php &lt;br /&gt;
New record created successfully. Last inserted ID is: 207&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I ara podem fer una select a la taula:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mysql&amp;gt; select * from employees where last_name='Rovira';&lt;br /&gt;
+-------------+------------+-----------+-------------------+--------------+------------+--------+----------+------------+---------------+&lt;br /&gt;
| employee_id | first_name | last_name | email             | phone_number | hire_date  | job_id | salary   | manager_id | department_id |&lt;br /&gt;
+-------------+------------+-----------+-------------------+--------------+------------+--------+----------+------------+---------------+&lt;br /&gt;
|         207 | Pere       | Rovira    | provira@gmail.com | NULL         | 2020-05-24 |     16 | 10400.00 |       NULL |          NULL |&lt;br /&gt;
+-------------+------------+-----------+-------------------+--------------+------------+--------+----------+------------+---------------+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==update==&lt;br /&gt;
*https://www.w3schools.com/php/php_mysql_update.asp&lt;br /&gt;
script '''update.php''':&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
$servername = &amp;quot;172.17.0.2&amp;quot;;&lt;br /&gt;
$username = &amp;quot;alumne&amp;quot;;&lt;br /&gt;
$password = &amp;quot;keiL2lai&amp;quot;;&lt;br /&gt;
$dbname = &amp;quot;HR&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
// Create connection&lt;br /&gt;
$conn = mysqli_connect($servername, $username, $password, $dbname);&lt;br /&gt;
// Check connection&lt;br /&gt;
if (!$conn) {&lt;br /&gt;
    die(&amp;quot;Connection failed: &amp;quot; . mysqli_connect_error());&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
$sql = &amp;quot;UPDATE employees set last_name='Rovira Virgili', phone_number='636.42.64.24' WHERE last_name='Rovira'&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
if (mysqli_query($conn, $sql)) {&lt;br /&gt;
  echo &amp;quot;Record updated successfully\n&amp;quot;;&lt;br /&gt;
} else {&lt;br /&gt;
  echo &amp;quot;Error updating record: &amp;quot;.mysqli_error($conn).&amp;quot;\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
mysqli_close($conn);&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# php update.php &lt;br /&gt;
Record updated successfully&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mysql&amp;gt; select * from employees where last_name='Rovira Virgili';&lt;br /&gt;
+-------------+------------+----------------+-------------------+--------------+------------+--------+----------+------------+---------------+&lt;br /&gt;
| employee_id | first_name | last_name      | email             | phone_number | hire_date  | job_id | salary   | manager_id | department_id |&lt;br /&gt;
+-------------+------------+----------------+-------------------+--------------+------------+--------+----------+------------+---------------+&lt;br /&gt;
|         207 | Pere       | Rovira Virgili | provira@gmail.com | 636.42.64.24 | 2020-05-24 |     16 | 10400.00 |       NULL |          NULL |&lt;br /&gt;
+-------------+------------+----------------+-------------------+--------------+------------+--------+----------+------------+---------------+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==delete==&lt;br /&gt;
script '''delete.php''':&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
$servername = &amp;quot;172.17.0.2&amp;quot;;&lt;br /&gt;
$username = &amp;quot;alumne&amp;quot;;&lt;br /&gt;
$password = &amp;quot;keiL2lai&amp;quot;;&lt;br /&gt;
$dbname = &amp;quot;HR&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
// Create connection&lt;br /&gt;
$conn = mysqli_connect($servername, $username, $password, $dbname);&lt;br /&gt;
// Check connection&lt;br /&gt;
if (!$conn) {&lt;br /&gt;
    die(&amp;quot;Connection failed: &amp;quot; . mysqli_connect_error());&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
$sql = &amp;quot;DELETE FROM employees where last_name='Rovira Virgili'&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
if (mysqli_query($conn, $sql)) {&lt;br /&gt;
  echo &amp;quot;Record deleted successfully\n&amp;quot;;&lt;br /&gt;
} else {&lt;br /&gt;
  echo &amp;quot;Error deleting record: &amp;quot;.mysqli_error($conn).&amp;quot;\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
mysqli_close($conn);&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# php delete.php &lt;br /&gt;
Record deleted successfully&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mysql&amp;gt; select * from employees where last_name='Rovira Virgili';&lt;br /&gt;
Empty set (0.00 sec)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==select una fila==&lt;br /&gt;
script '''select_single_row.php''':&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
$servername = &amp;quot;172.17.0.2&amp;quot;;&lt;br /&gt;
$username = &amp;quot;alumne&amp;quot;;&lt;br /&gt;
$password = &amp;quot;keiL2lai&amp;quot;;&lt;br /&gt;
$dbname = &amp;quot;HR&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
// Create connection&lt;br /&gt;
$conn = mysqli_connect($servername, $username, $password, $dbname);&lt;br /&gt;
// Check connection&lt;br /&gt;
if (!$conn) {&lt;br /&gt;
  die(&amp;quot;Connection failed: &amp;quot; . mysqli_connect_error());&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
$sql = &amp;quot;SELECT employee_id, first_name, last_name, email FROM employees where employee_id=104&amp;quot;;&lt;br /&gt;
$result = mysqli_query($conn, $sql);&lt;br /&gt;
&lt;br /&gt;
if (mysqli_num_rows($result) &amp;gt; 0) {&lt;br /&gt;
   $row = mysqli_fetch_assoc($result);&lt;br /&gt;
   echo &amp;quot;id: &amp;quot; . $row[&amp;quot;employee_id&amp;quot;]. &amp;quot; - Name: &amp;quot; . $row[&amp;quot;first_name&amp;quot;]. &amp;quot; &amp;quot; . $row[&amp;quot;last_name&amp;quot;]. &amp;quot; (&amp;quot; . $row[&amp;quot;email&amp;quot;] . &amp;quot;)\n&amp;quot;;&lt;br /&gt;
} else {&lt;br /&gt;
  echo &amp;quot;0 results&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
mysqli_close($conn);&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# php single_row.php&lt;br /&gt;
id: 104 - Name: Bruce Ernst (bruce.ernst@sqltutorial.org)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==select múltiples files==&lt;br /&gt;
script '''select_multiple_rows.php''':&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
$servername = &amp;quot;172.17.0.2&amp;quot;;&lt;br /&gt;
$username = &amp;quot;alumne&amp;quot;;&lt;br /&gt;
$password = &amp;quot;keiL2lai&amp;quot;;&lt;br /&gt;
$dbname = &amp;quot;HR&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
// Create connection&lt;br /&gt;
$conn = mysqli_connect($servername, $username, $password, $dbname);&lt;br /&gt;
// Check connection&lt;br /&gt;
if (!$conn) {&lt;br /&gt;
  die(&amp;quot;Connection failed: &amp;quot; . mysqli_connect_error());&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
$sql = &amp;quot;SELECT employee_id, first_name, last_name, email FROM employees&amp;quot;;&lt;br /&gt;
$result = mysqli_query($conn, $sql);&lt;br /&gt;
&lt;br /&gt;
if (mysqli_num_rows($result) &amp;gt; 0) {&lt;br /&gt;
  // output data of each row&lt;br /&gt;
  while($row = mysqli_fetch_assoc($result)) {&lt;br /&gt;
    echo &amp;quot;id: &amp;quot; . $row[&amp;quot;employee_id&amp;quot;]. &amp;quot; - Name: &amp;quot; . $row[&amp;quot;first_name&amp;quot;]. &amp;quot; &amp;quot; . $row[&amp;quot;last_name&amp;quot;]. &amp;quot; (&amp;quot; . $row[&amp;quot;email&amp;quot;] . &amp;quot;)\n&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
} else {&lt;br /&gt;
  echo &amp;quot;0 results&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
mysqli_close($conn);&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# php select_multiple_rows.php &lt;br /&gt;
id: 100 - Name: Steven King (steven.king@sqltutorial.org)&lt;br /&gt;
id: 101 - Name: Neena Kochhar (neena.kochhar@sqltutorial.org)&lt;br /&gt;
id: 102 - Name: Lex De Haan (lex.de haan@sqltutorial.org)&lt;br /&gt;
id: 103 - Name: Alexander Hunold (alexander.hunold@sqltutorial.org)&lt;br /&gt;
id: 104 - Name: Bruce Ernst (bruce.ernst@sqltutorial.org)&lt;br /&gt;
id: 105 - Name: David Austin (david.austin@sqltutorial.org)&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
==execute procedure==&lt;br /&gt;
Ara treballarem amb la base de dadse&lt;br /&gt;
*https://wiki.joanillo.org/index.php/Cursors&lt;br /&gt;
A la bd ''classicmodels'' tenim el procediment ''createEmailList()'' que ja vam veure (el tens a l'enllaç), i l'executes de la següent manera:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SET @emailList = &amp;quot;&amp;quot;; &lt;br /&gt;
CALL createEmailList(@emailList); &lt;br /&gt;
SELECT @emailList;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
És un paràmetre d'entrada/sortida (''INOUT''). Com executem aquest procediment des de PHP, i visualitzem la sortida?&lt;br /&gt;
&lt;br /&gt;
script '''executar_llista_mails.php''':&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
$conn = new mysqli(&amp;quot;172.17.0.2&amp;quot;, &amp;quot;alumne&amp;quot;, &amp;quot;keiL2lai&amp;quot;, &amp;quot;classicmodels&amp;quot;);&lt;br /&gt;
if ($conn-&amp;gt;connect_errno) {&lt;br /&gt;
    echo &amp;quot;Error en la connexió a MySQL: (&amp;quot; . $conn-&amp;gt;connect_errno . &amp;quot;) &amp;quot; . $conn-&amp;gt;connect_error;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
if (!$conn-&amp;gt;query(&amp;quot;SET @emailList = ''&amp;quot;) || !$conn-&amp;gt;query(&amp;quot;CALL createEmailList(@emailList)&amp;quot;)) {&lt;br /&gt;
    echo &amp;quot;Falló CALL: (&amp;quot; . $conn-&amp;gt;errno . &amp;quot;) &amp;quot; . $mysqli-&amp;gt;error;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
if (!($resultat = $conn-&amp;gt;query(&amp;quot;SELECT @emailList as llista_mails&amp;quot;))) {&lt;br /&gt;
    echo &amp;quot;Error en recuparar els resultats: (&amp;quot; . $mysqli-&amp;gt;errno . &amp;quot;) &amp;quot; . $mysqli-&amp;gt;error;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
$fila = $resultat-&amp;gt;fetch_assoc();&lt;br /&gt;
echo $fila['llista_mails'].&amp;quot;\n&amp;quot;;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# php executar_llista_mails.php &lt;br /&gt;
mgerard@classicmodelcars.com;ykato@classicmodelcars.com;mnishi@classicmodelcars.com;tking@classicmodelcars.com;pmarsh@classicmodelcars.com;afixter@classicmodelcars.com;bjones@classicmodelcars.com;lbott@classicmodelcars.com;pcastillo@classicmodelcars.com;ghernande@classicmodelcars.com;lbondur@classicmodelcars.com;gvanauf@classicmodelcars.com;ftseng@classicmodelcars.com;spatterson@classicmodelcars.com;jfirrelli@classicmodelcars.com;lthompson@classicmodelcars.com;ljennings@classicmodelcars.com;abow@classicmodelcars.com;gbondur@classicmodelcars.com;wpatterson@classicmodelcars.com;jfirrelli@classicmodelcars.com;mpatterso@classicmodelcars.com;dmurphy@classicmodelcars.com;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Autor}}, abril 2022&lt;/div&gt;</summary>
		<author><name>Joan</name></author>
		
	</entry>
</feed>