<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-2706799863772725741</id><updated>2026-09-05T08:18:15.368-07:00</updated><category term="Freshers"/><category term="Hyderabad"/><category term="Experience"/><category term="Bangalore"/><category term="News"/><category term="Walk-Ins"/><category term="Chennai"/><category term="Cricket"/><category term="PHP"/><category term="Java"/><category term="Pune"/><category term="MySQL"/><category term="Technology"/><category term="Software Engineers"/><category term="DOT NET"/><category term="Software Developers"/><category term="Sql Interview Questions"/><category term="All Over India"/><category term="BPO"/><category term="SQL"/><category term="Useful Tips"/><category term="Delhi"/><category term="Executive"/><category term="HTML"/><category term="Lifestyle"/><category term="Mumbai"/><category term="Web Designer"/><category term="Health And Fitness"/><category term="Website Developers"/><category term="Marketing"/><category term="Trainee Engineer"/><category term="Celebrities News"/><category term="Noida"/><category term="CSS"/><category term="Database"/><category term="Government Jobs"/><category term="Gurgaon"/><category term="On Site"/><category term="Bank Jobs"/><category term="Drupal"/><category term="Java script"/><category term="MySQL Indexes"/><category term="Queries"/><category term="Sales Executive jobs"/><category term="HR jobs"/><category term="Beauty And Fashion"/><category term="DBMS"/><category term="Testing"/><category term="J2EE"/><category term="Application Developer"/><category term="C++"/><category term="RDBMS"/><category term="Analyst Programmer"/><category term="Android"/><category term="C"/><category term="JQuery"/><category term="PHP Functions"/><category term="MySQL Primary Key Optimization"/><category term="Entertainment"/><category term="Mobiles"/><category term="Ajax"/><category term="Bollywood News"/><category term="Multiple Positions"/><category term="Health"/><category term="Movies Review"/><category term="PHP Interview questions"/><category term="SEO"/><category term="Embedded System"/><category term="Other Location"/><category term="Quick Tips"/><category term="Ahmedabad"/><category term="Chandigarh"/><category term="Graphic Designers"/><category term="Indexes"/><category term="Networking"/><category term="OFF CAMPUS"/><category term="SAP"/><category term="php variables"/><category term="Accounting Manager"/><category term="Coimbatore"/><category term="Frame Work Jobs"/><category term="Linux"/><category term="Oracle"/><category term="Python"/><category term="Telecom"/><category term="Joomla"/><category term="SQL Errors Handling"/><category term="System Administrator"/><category term="Tech Mahindra"/><category term="Vijayawada"/><category term="Cochin"/><category term="Data Entry Operator"/><category term="Drupal 7"/><category term="IPhone Developers"/><category term="Kochi"/><category term="Kolkata"/><category term="Mohali"/><category term="PHP History"/><category term="Photoshop"/><category term="Trivandrum"/><category term="AUTO CAD"/><category term="Books"/><category term="Chhattisgarh"/><category term="Datatype"/><category term="Drupal 7 interview questions"/><category term="Flash"/><category term="IOS Developers"/><category term="Kerala"/><category term="OOPS"/><category term="Onsite jobs"/><category term="PL-SQL"/><category term="SAP Consultants"/><category term="Science"/><category term="Share pont Developer"/><category term="Struts"/><category term="Telugu Songs"/><category term="XML"/><category term="zend jobs"/><category term="Accenture"/><category term="BCCI"/><category term="Bhopal"/><category term="CGI"/><category term="CSS3"/><category term="Capgemini"/><category term="Cognizant"/><category term="Database Jobs"/><category term="Dehradun"/><category term="Delete"/><category term="Dilate Technologies"/><category term="Drupal 7 global variables"/><category term="Drupal 7 views"/><category term="Drupal multi-site"/><category term="Drush"/><category term="ENUM"/><category term="Foreign Key"/><category term="GTM"/><category term="Genpact"/><category term="HSBC"/><category term="HTML Interview Questions"/><category term="HTML5"/><category term="Haryana"/><category term="Hinduja Global Solutions Ltd"/><category term="InnoDB"/><category term="J2ME"/><category term="Jaipur"/><category term="Javascript Interview Questions"/><category term="Lucknow"/><category term="MS office"/><category term="Magento"/><category term="Mainframe"/><category term="Mechanical Engineers"/><category term="MyISAM"/><category term="Mysore"/><category term="NESS"/><category term="PDO"/><category term="Perl"/><category term="Pondicherry"/><category term="Punjab"/><category term="Relationships"/><category term="SET"/><category term="Sachin 200"/><category term="Secunderabad"/><category term="TATA Power"/><category term="TCS"/><category term="Thiruvananthapuram"/><category term="Truncate"/><category term="UTF"/><category term="VC++ Developer"/><category term="Visakhapatnam"/><category term="Warangal"/><category term="WordPress"/><category term="XHTML"/><category term="views"/><title type='text'>SQL Info</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://sqlinfodata.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2706799863772725741/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://sqlinfodata.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/2706799863772725741/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>1351</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-2706799863772725741.post-2514287101525991559</id><published>2026-04-12T20:44:21.662-07:00</published><updated>2026-04-12T20:45:12.784-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="php variables"/><title type='text'>What are variables in PHP?</title><content type='html'>&lt;p&gt;&amp;nbsp;Variables store data and always start with &lt;code data-end=&quot;606&quot; data-start=&quot;603&quot;&gt;$&lt;/code&gt;.&lt;/p&gt;&lt;p&gt;$name = &quot;John&quot;;&lt;/p&gt;&lt;p&gt;$age = 25;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlinfodata.blogspot.com/feeds/2514287101525991559/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sqlinfodata.blogspot.com/2026/04/what-are-variables-in-php.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2706799863772725741/posts/default/2514287101525991559'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2706799863772725741/posts/default/2514287101525991559'/><link rel='alternate' type='text/html' href='http://sqlinfodata.blogspot.com/2026/04/what-are-variables-in-php.html' title='What are variables in PHP?'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2706799863772725741.post-3839284393131970884</id><published>2026-04-12T20:43:00.000-07:00</published><updated>2026-04-12T20:43:58.413-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><category scheme="http://www.blogger.com/atom/ns#" term="PHP Functions"/><title type='text'>Difference between echo and print?</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;echo&lt;/th&gt;&lt;th&gt;print&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Can output multiple strings&lt;/td&gt;&lt;td&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;Outputs one string only&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Faster&lt;/td&gt;&lt;td&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;Slightly slower&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;No return value&lt;/td&gt;&lt;td&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;Returns 1&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlinfodata.blogspot.com/feeds/3839284393131970884/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sqlinfodata.blogspot.com/2026/04/difference-between-echo-and-print.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2706799863772725741/posts/default/3839284393131970884'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2706799863772725741/posts/default/3839284393131970884'/><link rel='alternate' type='text/html' href='http://sqlinfodata.blogspot.com/2026/04/difference-between-echo-and-print.html' title='Difference between echo and print?'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2706799863772725741.post-1517141068052850001</id><published>2025-07-26T07:23:00.000-07:00</published><updated>2026-04-12T20:26:58.935-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Drupal"/><category scheme="http://www.blogger.com/atom/ns#" term="GTM"/><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><title type='text'>How to Integrate Google Tag Manager with Drupal 9 - An Easy Step-by-Step Tutorial</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;span face=&quot;&amp;quot;Work Sans&amp;quot;, sans-serif&quot; style=&quot;background-color: white; color: #0f0f0f; font-size: 1.125rem;&quot;&gt;Marketers are always seeking new ways to elevate website engagement and maximize interactivity. Yet, managing the countless third-party integrations and tracking tools implemented to enhance their business can quickly become overwhelming and chaotic. That&#39;s when Google Tag Manager comes to the rescue. With its intuitive and user-friendly platform, managing, updating, and tracking the snippets, tags, and integrations on your website has never been easier. From improving website performance to boosting conversion rates, Google Tag Manager offers the solution to streamline your digital marketing efforts and revolutionize your online presence.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #0f0f0f; font-family: &amp;quot;Work Sans&amp;quot;, sans-serif; font-size: 1.125rem; line-height: 1.65; margin: 0px auto 2.5rem;&quot;&gt;Drupal 9 makes integrating with Google Tag Manager easy and effortless. The Google tag manager module in Drupal lets you quickly add, modify and remove tags on your website without touching any code! Read this easy step-by-step guide to&amp;nbsp;learn how to integrate your&amp;nbsp;Drupal 9&amp;nbsp;site with your Google tag manager.&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #0f0f0f; font-family: &amp;quot;Work Sans&amp;quot;, sans-serif; font-size: 1.125rem; line-height: 1.65; margin: 0px auto 2.5rem;&quot;&gt;&lt;img alt=&quot;GTM with Drupal&quot; class=&quot;align-center&quot; data-entity-type=&quot;file&quot; data-entity-uuid=&quot;2e455577-c641-441b-9eb2-7932dcf7b2b6&quot; src=&quot;https://www.specbee.com/sites/default/files/inline-images/GTM-with-drupal.jpg&quot; style=&quot;box-sizing: border-box; display: block; height: auto; margin-left: auto; margin-right: auto; max-width: 100%;&quot; /&gt;&lt;/p&gt;&lt;h2 style=&quot;background-color: white; box-sizing: border-box; color: #0f0f0f; font-family: Montserrat, sans-serif; font-size: 2.8125rem; line-height: 1; margin: 6rem 0px 1.25rem; padding: 0px;&quot;&gt;&lt;span&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;/span&gt;What is Google Tag Manager and how can it help?&lt;/h2&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #0f0f0f; font-family: &amp;quot;Work Sans&amp;quot;, sans-serif; font-size: 1.125rem; line-height: 1.65; margin: 0px auto 2.5rem;&quot;&gt;Google Tag Manager is like a toolkit. It has all the tools you need meticulously organized in one place. Tools like&amp;nbsp;Google Analytics, Adwords,&amp;nbsp;personalization&amp;nbsp;tools,&amp;nbsp;A/B testing&amp;nbsp;tools, Remarketing, Native&amp;nbsp;advertising&amp;nbsp;pixels, and much more. All the integration tags can be stored in Google Tag Manager for better access and management. How can it help, you ask?&lt;/p&gt;&lt;ul style=&quot;background-color: white; box-sizing: border-box; color: #0f0f0f; font-family: &amp;quot;Work Sans&amp;quot;, sans-serif; font-size: 1.125rem; line-height: 1.65; list-style: none; margin: 0px auto 2.5rem; padding: 0px;&quot;&gt;&lt;li style=&quot;box-sizing: border-box; font-size: inherit; line-height: inherit; margin: 0px auto 0.5rem; padding-left: 2.5rem; position: relative;&quot;&gt;Marketers find it greatly beneficial as they don’t have to depend on developers to add and modify integration tags on the website. They can easily do it themselves.&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box; font-size: inherit; line-height: inherit; margin: 0px auto 0.5rem; padding-left: 2.5rem; position: relative;&quot;&gt;Better organization of tags can help marketers’ access and manage their integrations easily.&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box; font-size: inherit; line-height: inherit; margin: 0px auto 0.5rem; padding-left: 2.5rem; position: relative;&quot;&gt;Updating tags don’t require you to change them on multiple web-pages.&amp;nbsp;&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box; font-size: inherit; line-height: inherit; margin: 0px auto 0.5rem; padding-left: 2.5rem; position: relative;&quot;&gt;Test if your tags get triggered on any event/action in the preview mode.&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box; font-size: inherit; line-height: inherit; margin: 0px auto 0.5rem; padding-left: 2.5rem; position: relative;&quot;&gt;You can even check for formatting or security issues before deploying it to live.&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box; font-size: inherit; line-height: inherit; margin: 0px auto 0.5rem; padding-left: 2.5rem; position: relative;&quot;&gt;Provides an extra layer of data security.&lt;/li&gt;&lt;/ul&gt;&lt;h2 style=&quot;background-color: white; box-sizing: border-box; color: #0f0f0f; font-family: Montserrat, sans-serif; font-size: 2.8125rem; line-height: 1; margin: 6rem 0px 1.25rem; padding: 0px;&quot;&gt;Integrating Google Tag Manager in Drupal 9&lt;/h2&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #0f0f0f; font-family: &amp;quot;Work Sans&amp;quot;, sans-serif; font-size: 1.125rem; line-height: 1.65; margin: 0px auto 2.5rem;&quot;&gt;Drupal 9 integrates seamlessly with Google Tag Manager and installing it is also a breeze. Now that we know how useful Google Tag Manager is, let’s move on to integrating it with your Drupal 9 website.&lt;/p&gt;&lt;h3 style=&quot;background-color: white; box-sizing: border-box; color: #0f0f0f; font-family: Montserrat, sans-serif; font-size: 2rem; line-height: 1; margin: 2.5rem 0px 1rem; padding: 0px;&quot;&gt;Step 1 - Install the module&lt;/h3&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #0f0f0f; font-family: &amp;quot;Work Sans&amp;quot;, sans-serif; font-size: 1.125rem; line-height: 1.65; margin: 0px auto 2.5rem;&quot;&gt;You can download the Google tag Manager module here.&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;Or run this command through composer with this command :&lt;/p&gt;&lt;pre style=&quot;background: rgb(246, 246, 247); border-radius: 1.25rem; box-sizing: border-box; color: #0f0f0f; font-size: 16px; margin-bottom: 3.5rem; margin-top: 0px; overflow: auto hidden; padding: 2.5rem 1.75rem;&quot;&gt;&lt;code class=&quot;language-plaintext&quot; style=&quot;box-sizing: border-box;&quot;&gt;       
composer require &#39;drupal/google_tag:^1.4&#39;
&lt;/code&gt;&lt;/pre&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #0f0f0f; font-family: &amp;quot;Work Sans&amp;quot;, sans-serif; font-size: 1.125rem; line-height: 1.65; margin: 0px auto 2.5rem;&quot;&gt;&lt;img alt=&quot;Install the GTM module&quot; class=&quot;align-center&quot; data-entity-type=&quot;file&quot; data-entity-uuid=&quot;f93c799c-ea2b-4cd4-a839-5a01e8575890&quot; src=&quot;https://www.specbee.com/sites/default/files/inline-images/GTM1-min.jpg&quot; style=&quot;box-sizing: border-box; display: block; height: auto; margin-left: auto; margin-right: auto; max-width: 100%;&quot; /&gt;&lt;/p&gt;&lt;h3 style=&quot;background-color: white; box-sizing: border-box; color: #0f0f0f; font-family: Montserrat, sans-serif; font-size: 2rem; line-height: 1; margin: 2.5rem 0px 1rem; padding: 0px;&quot;&gt;Step 2 - Configure the Module&lt;/h3&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #0f0f0f; font-family: &amp;quot;Work Sans&amp;quot;, sans-serif; font-size: 1.125rem; line-height: 1.65; margin: 0px auto 2.5rem;&quot;&gt;In the admin toolbar, go to Configuration-&amp;gt; System -&amp;gt; Google Tag Manager&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #0f0f0f; font-family: &amp;quot;Work Sans&amp;quot;, sans-serif; font-size: 1.125rem; line-height: 1.65; margin: 0px auto 2.5rem;&quot;&gt;&lt;img alt=&quot;Configure the GTM module&quot; class=&quot;align-center&quot; data-entity-type=&quot;file&quot; data-entity-uuid=&quot;999fc67e-0294-4bdc-ae5f-098bea1bbd75&quot; src=&quot;https://www.specbee.com/sites/default/files/inline-images/GTM2-min.jpg&quot; style=&quot;box-sizing: border-box; display: block; height: auto; margin-left: auto; margin-right: auto; max-width: 100%;&quot; /&gt;&lt;/p&gt;&lt;h3 style=&quot;background-color: white; box-sizing: border-box; color: #0f0f0f; font-family: Montserrat, sans-serif; font-size: 2rem; line-height: 1; margin: 2.5rem 0px 1rem; padding: 0px;&quot;&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;Step 3 - Open Container Page&lt;/h3&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #0f0f0f; font-family: &amp;quot;Work Sans&amp;quot;, sans-serif; font-size: 1.125rem; line-height: 1.65; margin: 0px auto 2.5rem;&quot;&gt;Once you click on Google Tag Manager, you will see a container page like this –&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #0f0f0f; font-family: &amp;quot;Work Sans&amp;quot;, sans-serif; font-size: 1.125rem; line-height: 1.65; margin: 0px auto 2.5rem;&quot;&gt;&lt;img alt=&quot;Open container page&quot; class=&quot;align-center&quot; data-entity-type=&quot;file&quot; data-entity-uuid=&quot;4181ff6f-15da-401b-993a-0c83378470d1&quot; src=&quot;https://www.specbee.com/sites/default/files/inline-images/GTM3-min.jpg&quot; style=&quot;box-sizing: border-box; display: block; height: auto; margin-left: auto; margin-right: auto; max-width: 100%;&quot; /&gt;&lt;/p&gt;&lt;h3 style=&quot;background-color: white; box-sizing: border-box; color: #0f0f0f; font-family: Montserrat, sans-serif; font-size: 2rem; line-height: 1; margin: 2.5rem 0px 1rem; padding: 0px;&quot;&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;Step 4 - Add a Container&lt;/h3&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #0f0f0f; font-family: &amp;quot;Work Sans&amp;quot;, sans-serif; font-size: 1.125rem; line-height: 1.65; margin: 0px auto 2.5rem;&quot;&gt;Click on the Add container button. This is where you will add the Container ID that you had created previously when you signed up with GTM. If not done already, go&amp;nbsp;&lt;a href=&quot;https://tagmanager.google.com/&quot; style=&quot;border-bottom: 0.0625rem solid; box-sizing: border-box; color: #001186; text-decoration-line: none; transition: 0.25s ease-in-out;&quot;&gt;here to signup&lt;/a&gt;&amp;nbsp;and create a container ID for yourself (shown in the below steps).&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #0f0f0f; font-family: &amp;quot;Work Sans&amp;quot;, sans-serif; font-size: 1.125rem; line-height: 1.65; margin: 0px auto 2.5rem;&quot;&gt;&lt;img alt=&quot;Add a container&quot; class=&quot;align-center&quot; data-entity-type=&quot;file&quot; data-entity-uuid=&quot;0128fc40-df67-4541-b462-6d531d152315&quot; src=&quot;https://www.specbee.com/sites/default/files/inline-images/GTM4-min.jpg&quot; style=&quot;box-sizing: border-box; display: block; height: auto; margin-left: auto; margin-right: auto; max-width: 100%;&quot; /&gt;&lt;/p&gt;&lt;h3 style=&quot;background-color: white; box-sizing: border-box; color: #0f0f0f; font-family: Montserrat, sans-serif; font-size: 2rem; line-height: 1; margin: 2.5rem 0px 1rem; padding: 0px;&quot;&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;Step 5 - Create a Container&lt;/h3&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #0f0f0f; font-family: &amp;quot;Work Sans&amp;quot;, sans-serif; font-size: 1.125rem; line-height: 1.65; margin: 0px auto 2.5rem;&quot;&gt;Under Account setup, give the Account name and your Country name.&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #0f0f0f; font-family: &amp;quot;Work Sans&amp;quot;, sans-serif; font-size: 1.125rem; line-height: 1.65; margin: 0px auto 2.5rem;&quot;&gt;Under Container setup, give the Container name and select the target platform as per your requirements.&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #0f0f0f; font-family: &amp;quot;Work Sans&amp;quot;, sans-serif; font-size: 1.125rem; line-height: 1.65; margin: 0px auto 2.5rem;&quot;&gt;Click on the Create button.&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #0f0f0f; font-family: &amp;quot;Work Sans&amp;quot;, sans-serif; font-size: 1.125rem; line-height: 1.65; margin: 0px auto 2.5rem;&quot;&gt;&lt;img alt=&quot;Google Tag Manager-Create n account&quot; class=&quot;align-center&quot; data-entity-type=&quot;file&quot; data-entity-uuid=&quot;e750ae37-2d9c-41b1-a420-d19853a95ead&quot; src=&quot;https://www.specbee.com/sites/default/files/inline-images/GTM5-min.jpg&quot; style=&quot;box-sizing: border-box; display: block; height: auto; margin-left: auto; margin-right: auto; max-width: 100%;&quot; /&gt;&lt;/p&gt;&lt;h3 style=&quot;background-color: white; box-sizing: border-box; color: #0f0f0f; font-family: Montserrat, sans-serif; font-size: 2rem; line-height: 1; margin: 2.5rem 0px 1rem; padding: 0px;&quot;&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;Step 6 - Get the Container ID&lt;/h3&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #0f0f0f; font-family: &amp;quot;Work Sans&amp;quot;, sans-serif; font-size: 1.125rem; line-height: 1.65; margin: 0px auto 2.5rem;&quot;&gt;Once done, you will be able to see a popup screen that will display the code snippet that needs to be pasted in the head section. Look out for the Container Id which will look like an alphanumeric word and begins with “GTM”. Here it is “GTM-MXQN9XL”. Copy this code to your clipboard.&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #0f0f0f; font-family: &amp;quot;Work Sans&amp;quot;, sans-serif; font-size: 1.125rem; line-height: 1.65; margin: 0px auto 2.5rem;&quot;&gt;&lt;img alt=&quot;Tag Manager Code - get the container ID&quot; class=&quot;align-center&quot; data-entity-type=&quot;file&quot; data-entity-uuid=&quot;68887a2d-8a9f-46cf-b16c-47c6fcf22106&quot; src=&quot;https://www.specbee.com/sites/default/files/inline-images/GTM6-min.jpg&quot; style=&quot;box-sizing: border-box; display: block; height: auto; margin-left: auto; margin-right: auto; max-width: 100%;&quot; /&gt;&lt;/p&gt;&lt;h3 style=&quot;background-color: white; box-sizing: border-box; color: #0f0f0f; font-family: Montserrat, sans-serif; font-size: 2rem; line-height: 1; margin: 2.5rem 0px 1rem; padding: 0px;&quot;&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;Step 7 - Insert the Container ID&lt;/h3&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #0f0f0f; font-family: &amp;quot;Work Sans&amp;quot;, sans-serif; font-size: 1.125rem; line-height: 1.65; margin: 0px auto 2.5rem;&quot;&gt;Head back to your Drupal setup where you had to add the container ID. Give a name for your container in the Label field and paste the previously copied container ID in the Container ID field. Save the configuration.&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #0f0f0f; font-family: &amp;quot;Work Sans&amp;quot;, sans-serif; font-size: 1.125rem; line-height: 1.65; margin: 0px auto 2.5rem;&quot;&gt;&lt;img alt=&quot;Insert container ID&quot; class=&quot;align-center&quot; data-entity-type=&quot;file&quot; data-entity-uuid=&quot;f1678075-99aa-4b6b-9cc4-d846d07b7ae0&quot; src=&quot;https://www.specbee.com/sites/default/files/inline-images/GTM7-min.jpg&quot; style=&quot;box-sizing: border-box; display: block; height: auto; margin-left: auto; margin-right: auto; max-width: 100%;&quot; /&gt;&lt;/p&gt;&lt;h3 style=&quot;background-color: white; box-sizing: border-box; color: #0f0f0f; font-family: Montserrat, sans-serif; font-size: 2rem; line-height: 1; margin: 2.5rem 0px 1rem; padding: 0px;&quot;&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;Step 8 - And we’re all set!&lt;/h3&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #0f0f0f; font-family: &amp;quot;Work Sans&amp;quot;, sans-serif; font-size: 1.125rem; line-height: 1.65; margin: 0px auto 2.5rem;&quot;&gt;To verify if the installation of Google tag manager has been successful in your Drupal site, go to the home page of your website and do an “Inspect Element”. If it has been installed properly, you should be able to see it within the &amp;lt;head&amp;gt; tag.&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #0f0f0f; font-family: &amp;quot;Work Sans&amp;quot;, sans-serif; font-size: 1.125rem; line-height: 1.65; margin: 0px auto 2.5rem;&quot;&gt;&lt;img alt=&quot;Check if GTM module is properly installed&quot; class=&quot;align-center&quot; data-entity-type=&quot;file&quot; data-entity-uuid=&quot;c459d8e7-a929-4dd0-8dda-6ec5526c1a9a&quot; src=&quot;https://www.specbee.com/sites/default/files/inline-images/GTM8-min.jpg&quot; style=&quot;box-sizing: border-box; display: block; height: auto; margin-left: auto; margin-right: auto; max-width: 100%;&quot; /&gt;&lt;/p&gt;&lt;div class=&quot;clearfix text-formatted field field--name-field-footer-text&quot; style=&quot;background-color: white; box-sizing: border-box; color: #0f0f0f; font-family: &amp;quot;Work Sans&amp;quot;, sans-serif; font-size: 16px;&quot;&gt;&lt;div class=&quot;field__item&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p style=&quot;box-sizing: border-box; font-size: 1.125rem; line-height: 1.65; margin: 0px auto;&quot;&gt;Google Tag Manager is an extremely useful tool for site owners and marketers. Different third-party integrations can be maintained, added and modified easily. This greatly helps marketers in speeding up the process of experimenting and testing out various useful integrations that can lead to better user engagement. Drupal 9 comes loaded with plenty of powerful features and functionalities and tons of handy contributed&amp;nbsp;modules&amp;nbsp;that you can easily install and connect to. As a leading&amp;nbsp;Drupal development company,&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlinfodata.blogspot.com/feeds/1517141068052850001/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sqlinfodata.blogspot.com/2025/07/how-to-integrate-google-tag-manager.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2706799863772725741/posts/default/1517141068052850001'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2706799863772725741/posts/default/1517141068052850001'/><link rel='alternate' type='text/html' href='http://sqlinfodata.blogspot.com/2025/07/how-to-integrate-google-tag-manager.html' title='How to Integrate Google Tag Manager with Drupal 9 - An Easy Step-by-Step Tutorial'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2706799863772725741.post-8144820309911656008</id><published>2025-05-01T07:08:00.000-07:00</published><updated>2025-05-01T07:08:48.965-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><category scheme="http://www.blogger.com/atom/ns#" term="PHP Interview questions"/><title type='text'>What is the purpose of the php.ini file?</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;span style=&quot;color: #374151; font-family: __GeistSans_3a0388, __GeistSans_Fallback_3a0388; font-size: 1rem;&quot;&gt;The PHP configuration file,&lt;/span&gt;&lt;span style=&quot;color: #374151; font-family: __GeistSans_3a0388, __GeistSans_Fallback_3a0388; font-size: 1rem;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;em style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 #0000; --tw-shadow: 0 0 #0000; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(229, 231, 235); box-sizing: border-box; color: #374151; font-family: __GeistSans_3a0388, __GeistSans_Fallback_3a0388; font-size: 1rem;&quot;&gt;php.ini&lt;/em&gt;&lt;span style=&quot;color: #374151; font-family: __GeistSans_3a0388, __GeistSans_Fallback_3a0388; font-size: 1rem;&quot;&gt;, is the final and most immediate way to affect PHP&#39;s functionality. The php.ini file is read each time PHP is initialized. in other words, whenever&lt;/span&gt;&lt;span style=&quot;color: #374151; font-family: __GeistSans_3a0388, __GeistSans_Fallback_3a0388; font-size: 1rem;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 #0000; --tw-shadow: 0 0 #0000; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(229, 231, 235); box-sizing: border-box; color: #111827; font-family: __GeistMono_c1e5c9, ui-monospace, SFMono-Regular, &amp;quot;Roboto Mono&amp;quot;, Menlo, Monaco, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace; font-feature-settings: normal; font-size: 0.875em; font-variation-settings: normal; font-weight: 600;&quot;&gt;httpd&lt;/code&gt;&lt;span style=&quot;color: #374151; font-family: __GeistSans_3a0388, __GeistSans_Fallback_3a0388; font-size: 1rem;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #374151; font-family: __GeistSans_3a0388, __GeistSans_Fallback_3a0388; font-size: 1rem;&quot;&gt;is restarted for the module version or with each script execution for the CGI version.&lt;/span&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlinfodata.blogspot.com/feeds/8144820309911656008/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sqlinfodata.blogspot.com/2025/05/what-is-purpose-of-phpini-file.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2706799863772725741/posts/default/8144820309911656008'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2706799863772725741/posts/default/8144820309911656008'/><link rel='alternate' type='text/html' href='http://sqlinfodata.blogspot.com/2025/05/what-is-purpose-of-phpini-file.html' title='What is the purpose of the php.ini file?'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2706799863772725741.post-5680661973104442288</id><published>2023-11-13T05:10:00.000-08:00</published><updated>2023-11-13T05:10:39.322-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="MySQL"/><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL"/><title type='text'>How do you enable error reporting in PHP?</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;span style=&quot;background-color: #fbfafa; color: #333333; font-family: &amp;quot;GT Walsheim LC&amp;quot;, &amp;quot;Segoe UI&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 18px;&quot;&gt;PHP allows us to choose whether or not to display errors to users. There are three ways to enable or disable error reporting in PHP:&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: #fbfafa; box-sizing: border-box; color: #333333; font-family: &amp;quot;GT Walsheim LC&amp;quot;, &amp;quot;Segoe UI&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 18px; line-height: 26px; margin: 16px 0px 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-family: inherit; font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-variation-settings: inherit; font-weight: 700; line-height: inherit;&quot;&gt;Method 1:&lt;/span&gt;&amp;nbsp;You can turn the display error parameter in the php.ini file on or off. When it’s on, errors are shown; when it’s off, there are no errors shown or reported. To do this, locate the display error parameter in the php.ini file, then set its value to “on.” Restart the web server&#39;s various services. The PHP script&#39;s errors will now be visible to end users. Set the display error parameter to “off” to stop reporting errors. The off argument indicates that users won&#39;t see any errors.&lt;/p&gt;&lt;p style=&quot;background-color: #fbfafa; box-sizing: border-box; color: #333333; font-family: &amp;quot;GT Walsheim LC&amp;quot;, &amp;quot;Segoe UI&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 18px; line-height: 26px; margin: 16px 0px 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-family: inherit; font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-variation-settings: inherit; font-weight: 700; line-height: inherit;&quot;&gt;Method 2:&lt;/span&gt;&amp;nbsp;Using the mini set() function is the second way to enable or stop error reporting. The ability to modify the configuration options in the php.ini file is a built-in feature of the PHP programming language. It requires two inputs: the name of the setting you want to change and the value you want to assign.&lt;/p&gt;&lt;p style=&quot;background-color: #fbfafa; box-sizing: border-box; color: #333333; font-family: &amp;quot;GT Walsheim LC&amp;quot;, &amp;quot;Segoe UI&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 18px; line-height: 26px; margin: 16px 0px 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-family: inherit; font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-variation-settings: inherit; font-weight: 700; line-height: inherit;&quot;&gt;Method 3:&lt;/span&gt;&amp;nbsp;You can also utilize the error reporting() function, a native PHP function, to enable error reporting. This function controls which PHP faults are reported and sets the error reporting directive during runtime. Given that PHP has multiple error levels, this method also aids in setting the various levels for the runtime (duration) of your script. This function accepts parameters for error names like E ERROR, E WARNING, E PARSE, etc., allowing these errors to be reported.&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlinfodata.blogspot.com/feeds/5680661973104442288/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sqlinfodata.blogspot.com/2023/11/how-do-you-enable-error-reporting-in-php.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2706799863772725741/posts/default/5680661973104442288'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2706799863772725741/posts/default/5680661973104442288'/><link rel='alternate' type='text/html' href='http://sqlinfodata.blogspot.com/2023/11/how-do-you-enable-error-reporting-in-php.html' title='How do you enable error reporting in PHP?'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2706799863772725741.post-1238497172091813651</id><published>2023-04-16T09:16:00.002-07:00</published><updated>2023-04-16T09:16:31.540-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="BCCI"/><category scheme="http://www.blogger.com/atom/ns#" term="Cricket"/><category scheme="http://www.blogger.com/atom/ns#" term="Sachin 200"/><title type='text'>Sachin vs South Africa Highlights HD🔥 First ODI Double Century hitter | India | Full Match Video</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;iframe allowfullscreen=&quot;&quot; class=&quot;BLOG_video_class&quot; height=&quot;316&quot; src=&quot;https://www.youtube.com/embed/IWkpwe28IXc&quot; width=&quot;419&quot; youtube-src-id=&quot;IWkpwe28IXc&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlinfodata.blogspot.com/feeds/1238497172091813651/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sqlinfodata.blogspot.com/2023/04/sachin-vs-south-africa-highlights-hd.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2706799863772725741/posts/default/1238497172091813651'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2706799863772725741/posts/default/1238497172091813651'/><link rel='alternate' type='text/html' href='http://sqlinfodata.blogspot.com/2023/04/sachin-vs-south-africa-highlights-hd.html' title='Sachin vs South Africa Highlights HD🔥 First ODI Double Century hitter | India | Full Match Video'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/IWkpwe28IXc/default.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2706799863772725741.post-5848846696016605991</id><published>2023-04-16T07:54:00.003-07:00</published><updated>2026-09-05T08:18:15.368-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><category scheme="http://www.blogger.com/atom/ns#" term="WordPress"/><title type='text'>How to Create Custom Post Types in WordPress</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;span face=&quot;proxima-nova, Helvetica, Arial, sans-serif&quot; style=&quot;background-color: white; color: #1f2d3d; font-size: 18px;&quot;&gt;We only get three built-in content types at the backend when we install WordPress, i.e., posts, pages, and media. However, today WordPress has become quite flexible and advanced.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #1f2d3d; font-family: proxima-nova, Helvetica, Arial, sans-serif; font-size: 18px; line-height: 28px; margin: 0px 0px 25px;&quot;&gt;The approach to adding more post types also has expanded. The diversified usage demands more content types because posts,&amp;nbsp;pages, and media are not enough, and here is where WordPress custom post type comes in handy.&lt;/p&gt;&lt;h2 id=&quot;wordpress-custom-post-type-overview&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3c4858; font-family: proxima-nova, Helvetica, Arial, sans-serif; font-size: 30px; font-weight: 500; line-height: 38px; margin: 0px 0px 15px;&quot;&gt;What Is a WordPress Custom Post Type?&lt;/h2&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #1f2d3d; font-family: proxima-nova, Helvetica, Arial, sans-serif; font-size: 18px; line-height: 28px; margin: 0px 0px 25px;&quot;&gt;Custom post types are used to convert a regular WordPress website into a content management system. As the name suggests, you can use custom post types to create various content types for your website.&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #1f2d3d; font-family: proxima-nova, Helvetica, Arial, sans-serif; font-size: 18px; line-height: 28px; margin: 0px 0px 25px;&quot;&gt;Besides that, one can find several post types available by default in WordPress installation, including:&lt;/p&gt;&lt;ul style=&quot;background-color: white; box-sizing: border-box; line-height: 26px; margin-bottom: 25px; margin-top: 0px; padding-left: 0px;&quot;&gt;&lt;li style=&quot;box-sizing: border-box; color: #3c4858; font-family: proxima-nova, Helvetica, Arial, sans-serif; font-size: 18px; list-style: none; margin-bottom: 15px; padding-left: 20px; position: relative;&quot;&gt;Post – blog post&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box; color: #3c4858; font-family: proxima-nova, Helvetica, Arial, sans-serif; font-size: 18px; list-style: none; margin-bottom: 15px; padding-left: 20px; position: relative;&quot;&gt;Page – static page&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box; color: #3c4858; font-family: proxima-nova, Helvetica, Arial, sans-serif; font-size: 18px; list-style: none; margin-bottom: 15px; padding-left: 20px; position: relative;&quot;&gt;Attachment – attached media&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box; color: #3c4858; font-family: proxima-nova, Helvetica, Arial, sans-serif; font-size: 18px; list-style: none; margin-bottom: 15px; padding-left: 20px; position: relative;&quot;&gt;Revision – post revision&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box; color: #3c4858; font-family: proxima-nova, Helvetica, Arial, sans-serif; font-size: 18px; list-style: none; margin-bottom: 15px; padding-left: 20px; position: relative;&quot;&gt;Navigation Menu – nav menu&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box; list-style: none; margin-bottom: 15px; padding-left: 20px; position: relative;&quot;&gt;&lt;span face=&quot;proxima-nova, Helvetica, Arial, sans-serif&quot; style=&quot;color: #3c4858;&quot;&gt;&lt;span style=&quot;font-size: 18px;&quot;&gt;WordPress supports an unlimited number of Custom Post Types. You can create your custom posts and call them up wherever you want.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box; list-style: none; margin-bottom: 15px; padding-left: 20px; position: relative;&quot;&gt;&lt;span face=&quot;proxima-nova, Helvetica, Arial, sans-serif&quot; style=&quot;color: #3c4858;&quot;&gt;&lt;span style=&quot;font-size: 18px;&quot;&gt;For example, if you run a&amp;nbsp;News&amp;nbsp;website and want to add a custom post type titled “&lt;span style=&quot;box-sizing: border-box; font-weight: 600;&quot;&gt;News&lt;/span&gt;&lt;span style=&quot;color: #1f2d3d;&quot;&gt;.” Once created, the news post-type would have its own menu in the WordPress dashboard admin area. Additionally, you can create multiple post types, such as Movies, Portfolios, etc.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h2 id=&quot;wordpress-custom-post-type-overview&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3c4858; font-family: proxima-nova, Helvetica, Arial, sans-serif; font-size: 30px; font-weight: 500; line-height: 38px; margin: 0px 0px 15px;&quot;&gt;What Is a WordPress Custom Post Type?&lt;/h2&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #1f2d3d; font-family: proxima-nova, Helvetica, Arial, sans-serif; font-size: 18px; line-height: 28px; margin: 0px 0px 25px;&quot;&gt;Custom post types are used to convert a regular WordPress website into a content management system. As the name suggests, you can use custom post types to create various content types for your website.&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #1f2d3d; font-family: proxima-nova, Helvetica, Arial, sans-serif; font-size: 18px; line-height: 28px; margin: 0px 0px 25px;&quot;&gt;Besides that, one can find several post types available by default in WordPress installation, including:&lt;/p&gt;&lt;ul style=&quot;background-color: white; box-sizing: border-box; color: #3c4858; font-family: proxima-nova, Helvetica, Arial, sans-serif; font-size: 18px; line-height: 26px; margin-bottom: 25px; margin-top: 0px; padding-left: 0px;&quot;&gt;&lt;li style=&quot;box-sizing: border-box; list-style: none; margin-bottom: 15px; padding-left: 20px; position: relative;&quot;&gt;Post – blog post&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box; list-style: none; margin-bottom: 15px; padding-left: 20px; position: relative;&quot;&gt;Page – static page&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box; list-style: none; margin-bottom: 15px; padding-left: 20px; position: relative;&quot;&gt;Attachment – attached media&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box; list-style: none; margin-bottom: 15px; padding-left: 20px; position: relative;&quot;&gt;Revision – post revision&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box; list-style: none; margin-bottom: 15px; padding-left: 20px; position: relative;&quot;&gt;Navigation Menu – nav menu&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box; list-style: none; margin-bottom: 15px; padding-left: 20px; position: relative;&quot;&gt;&lt;p style=&quot;box-sizing: border-box; color: #1f2d3d; line-height: 28px; margin: 0px 0px 25px;&quot;&gt;WordPress supports an unlimited number of Custom Post Types. You can create your custom posts&amp;nbsp;and call them up wherever you want.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; color: #1f2d3d; line-height: 28px; margin: 0px 0px 25px;&quot;&gt;For example, if you run a&amp;nbsp;News&amp;nbsp;website and want to add a custom post type titled “&lt;span style=&quot;box-sizing: border-box; color: #3c4858; font-weight: 600;&quot;&gt;News&lt;/span&gt;.” Once created, the news post-type would have its own menu in the WordPress dashboard admin area. Additionally, you can create multiple post types, such as Movies, Portfolios, etc.&lt;/p&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box; list-style: none; margin-bottom: 15px; padding-left: 20px; position: relative;&quot;&gt;&lt;p style=&quot;box-sizing: border-box; color: #1f2d3d; line-height: 28px; margin: 0px 0px 25px;&quot;&gt;Follow the steps below to create a custom post type on a WordPress website:&lt;/p&gt;&lt;ul style=&quot;box-sizing: border-box; line-height: 26px; margin-bottom: 25px; margin-top: 0px; padding-left: 0px;&quot;&gt;&lt;li style=&quot;box-sizing: border-box; list-style: none; margin-bottom: 15px; padding-left: 20px; position: relative;&quot;&gt;Navigate to the&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 600;&quot;&gt;function.php&lt;/span&gt;&amp;nbsp;file from your WordPress theme directory&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box; list-style: none; margin-bottom: 15px; padding-left: 20px; position: relative;&quot;&gt;Add the following code to the&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 600;&quot;&gt;function.php&lt;/span&gt;&amp;nbsp;file&lt;/li&gt;&lt;/ul&gt;&lt;div class=&quot;EnlighterJSWrapper enlighterEnlighterJSWrapper&quot; style=&quot;box-sizing: border-box; color: #7e8890; font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 10px; line-height: 16px; margin: 0px; overflow-wrap: break-word; overflow: auto; padding: 0px; position: relative; white-space: pre-wrap;&quot;&gt;&lt;ol class=&quot;hoverEnabled enlighterEnlighterJS EnlighterJS&quot; style=&quot;background-color: #f9f9f9; border-radius: 8px; border: 1px solid rgb(224, 224, 224); box-sizing: border-box; color: #939393; font-size: 11px; line-height: 26px; list-style: none; margin: 0px 0px 20px; overflow-wrap: break-word; overflow: auto; padding: 0px;&quot;&gt;&lt;li class=&quot;odd&quot; style=&quot;background-color: white; border-color: rgb(255, 255, 255) rgb(255, 255, 255) rgb(255, 255, 255) rgb(224, 224, 224); border-image: initial; border-style: solid; border-width: 0px 0px 0px 1px; box-sizing: border-box; color: #aaaaaa; font-size: inherit; line-height: 16px; list-style: outside decimal; margin: 0px 0px 0px 40px; padding: 5px 5px 1px 14px;&quot;&gt;&lt;span class=&quot;co2&quot; style=&quot;box-sizing: border-box; color: #9999aa; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;/* Custom Post Type Start */&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;even&quot; style=&quot;background-color: white; border-color: rgb(255, 255, 255) rgb(255, 255, 255) rgb(255, 255, 255) rgb(224, 224, 224); border-image: initial; border-style: solid; border-width: 0px 0px 0px 1px; box-sizing: border-box; color: #aaaaaa; font-size: inherit; line-height: 16px; list-style: outside decimal; margin: 0px 0px 0px 40px; padding: 1px 5px 1px 14px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;odd&quot; style=&quot;background-color: white; border-color: rgb(255, 255, 255) rgb(255, 255, 255) rgb(255, 255, 255) rgb(224, 224, 224); border-image: initial; border-style: solid; border-width: 0px 0px 0px 1px; box-sizing: border-box; color: #aaaaaa; font-size: inherit; line-height: 16px; list-style: outside decimal; margin: 0px 0px 0px 40px; padding: 1px 5px 1px 14px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;function &lt;/span&gt;&lt;span class=&quot;kw1&quot; style=&quot;box-sizing: border-box; color: #286491; font-family: inherit; font-size: 12px; font-weight: 700; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;create_posttype&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;box-sizing: border-box; color: #777777; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;box-sizing: border-box; color: #777777; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;box-sizing: border-box; color: #777777; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;even&quot; style=&quot;background-color: white; border-color: rgb(255, 255, 255) rgb(255, 255, 255) rgb(255, 255, 255) rgb(224, 224, 224); border-image: initial; border-style: solid; border-width: 0px 0px 0px 1px; box-sizing: border-box; color: #aaaaaa; font-size: inherit; line-height: 16px; list-style: outside decimal; margin: 0px 0px 0px 40px; padding: 1px 5px 1px 14px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;kw1&quot; style=&quot;box-sizing: border-box; color: #286491; font-family: inherit; font-size: 12px; font-weight: 700; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;register_post_type&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;box-sizing: border-box; color: #777777; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;box-sizing: border-box; color: #dd1144; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&#39;news&#39;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;co1&quot; style=&quot;box-sizing: border-box; color: #9999aa; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;odd&quot; style=&quot;background-color: white; border-color: rgb(255, 255, 255) rgb(255, 255, 255) rgb(255, 255, 255) rgb(224, 224, 224); border-image: initial; border-style: solid; border-width: 0px 0px 0px 1px; box-sizing: border-box; color: #aaaaaa; font-size: inherit; line-height: 16px; list-style: outside decimal; margin: 0px 0px 0px 40px; padding: 1px 5px 1px 14px;&quot;&gt;&lt;span class=&quot;co1&quot; style=&quot;box-sizing: border-box; color: #9999aa; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;// CPT Options&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;even&quot; style=&quot;background-color: white; border-color: rgb(255, 255, 255) rgb(255, 255, 255) rgb(255, 255, 255) rgb(224, 224, 224); border-image: initial; border-style: solid; border-width: 0px 0px 0px 1px; box-sizing: border-box; color: #aaaaaa; font-size: inherit; line-height: 16px; list-style: outside decimal; margin: 0px 0px 0px 40px; padding: 1px 5px 1px 14px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;odd&quot; style=&quot;background-color: white; border-color: rgb(255, 255, 255) rgb(255, 255, 255) rgb(255, 255, 255) rgb(224, 224, 224); border-image: initial; border-style: solid; border-width: 0px 0px 0px 1px; box-sizing: border-box; color: #aaaaaa; font-size: inherit; line-height: 16px; list-style: outside decimal; margin: 0px 0px 0px 40px; padding: 1px 5px 1px 14px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;kw1&quot; style=&quot;box-sizing: border-box; color: #286491; font-family: inherit; font-size: 12px; font-weight: 700; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;array&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;box-sizing: border-box; color: #777777; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;even&quot; style=&quot;background-color: white; border-color: rgb(255, 255, 255) rgb(255, 255, 255) rgb(255, 255, 255) rgb(224, 224, 224); border-image: initial; border-style: solid; border-width: 0px 0px 0px 1px; box-sizing: border-box; color: #aaaaaa; font-size: inherit; line-height: 16px; list-style: outside decimal; margin: 0px 0px 0px 40px; padding: 1px 5px 1px 14px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;  &lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;box-sizing: border-box; color: #dd1144; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&#39;labels&#39;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt; =&amp;gt; &lt;/span&gt;&lt;span class=&quot;kw1&quot; style=&quot;box-sizing: border-box; color: #286491; font-family: inherit; font-size: 12px; font-weight: 700; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;array&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;box-sizing: border-box; color: #777777; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;odd&quot; style=&quot;background-color: white; border-color: rgb(255, 255, 255) rgb(255, 255, 255) rgb(255, 255, 255) rgb(224, 224, 224); border-image: initial; border-style: solid; border-width: 0px 0px 0px 1px; box-sizing: border-box; color: #aaaaaa; font-size: inherit; line-height: 16px; list-style: outside decimal; margin: 0px 0px 0px 40px; padding: 1px 5px 1px 14px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;   &lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;box-sizing: border-box; color: #dd1144; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&#39;name&#39;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt; =&amp;gt; &lt;/span&gt;&lt;span class=&quot;kw1&quot; style=&quot;box-sizing: border-box; color: #286491; font-family: inherit; font-size: 12px; font-weight: 700; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;__&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;box-sizing: border-box; color: #777777; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;box-sizing: border-box; color: #dd1144; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&#39;news&#39;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;box-sizing: border-box; color: #777777; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;even&quot; style=&quot;background-color: white; border-color: rgb(255, 255, 255) rgb(255, 255, 255) rgb(255, 255, 255) rgb(224, 224, 224); border-image: initial; border-style: solid; border-width: 0px 0px 0px 1px; box-sizing: border-box; color: #aaaaaa; font-size: inherit; line-height: 16px; list-style: outside decimal; margin: 0px 0px 0px 40px; padding: 1px 5px 1px 14px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;   &lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;box-sizing: border-box; color: #dd1144; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&#39;singular_name&#39;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt; =&amp;gt; &lt;/span&gt;&lt;span class=&quot;kw1&quot; style=&quot;box-sizing: border-box; color: #286491; font-family: inherit; font-size: 12px; font-weight: 700; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;__&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;box-sizing: border-box; color: #777777; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;box-sizing: border-box; color: #dd1144; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&#39;News&#39;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;box-sizing: border-box; color: #777777; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;odd&quot; style=&quot;background-color: white; border-color: rgb(255, 255, 255) rgb(255, 255, 255) rgb(255, 255, 255) rgb(224, 224, 224); border-image: initial; border-style: solid; border-width: 0px 0px 0px 1px; box-sizing: border-box; color: #aaaaaa; font-size: inherit; line-height: 16px; list-style: outside decimal; margin: 0px 0px 0px 40px; padding: 1px 5px 1px 14px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;  &lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;box-sizing: border-box; color: #777777; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;even&quot; style=&quot;background-color: white; border-color: rgb(255, 255, 255) rgb(255, 255, 255) rgb(255, 255, 255) rgb(224, 224, 224); border-image: initial; border-style: solid; border-width: 0px 0px 0px 1px; box-sizing: border-box; color: #aaaaaa; font-size: inherit; line-height: 16px; list-style: outside decimal; margin: 0px 0px 0px 40px; padding: 1px 5px 1px 14px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;  &lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;box-sizing: border-box; color: #dd1144; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&#39;public&#39;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt; =&amp;gt; true,&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;odd&quot; style=&quot;background-color: white; border-color: rgb(255, 255, 255) rgb(255, 255, 255) rgb(255, 255, 255) rgb(224, 224, 224); border-image: initial; border-style: solid; border-width: 0px 0px 0px 1px; box-sizing: border-box; color: #aaaaaa; font-size: inherit; line-height: 16px; list-style: outside decimal; margin: 0px 0px 0px 40px; padding: 1px 5px 1px 14px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;  &lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;box-sizing: border-box; color: #dd1144; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&#39;has_archive&#39;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt; =&amp;gt; false,&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;even&quot; style=&quot;background-color: white; border-color: rgb(255, 255, 255) rgb(255, 255, 255) rgb(255, 255, 255) rgb(224, 224, 224); border-image: initial; border-style: solid; border-width: 0px 0px 0px 1px; box-sizing: border-box; color: #aaaaaa; font-size: inherit; line-height: 16px; list-style: outside decimal; margin: 0px 0px 0px 40px; padding: 1px 5px 1px 14px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;  &lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;box-sizing: border-box; color: #dd1144; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&#39;rewrite&#39;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt; =&amp;gt; &lt;/span&gt;&lt;span class=&quot;kw1&quot; style=&quot;box-sizing: border-box; color: #286491; font-family: inherit; font-size: 12px; font-weight: 700; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;array&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;box-sizing: border-box; color: #777777; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;box-sizing: border-box; color: #dd1144; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&#39;slug&#39;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt; =&amp;gt; &lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;box-sizing: border-box; color: #dd1144; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&#39;news&#39;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;box-sizing: border-box; color: #777777; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;odd&quot; style=&quot;background-color: white; border-color: rgb(255, 255, 255) rgb(255, 255, 255) rgb(255, 255, 255) rgb(224, 224, 224); border-image: initial; border-style: solid; border-width: 0px 0px 0px 1px; box-sizing: border-box; color: #aaaaaa; font-size: inherit; line-height: 16px; list-style: outside decimal; margin: 0px 0px 0px 40px; padding: 1px 5px 1px 14px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;box-sizing: border-box; color: #777777; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;even&quot; style=&quot;background-color: white; border-color: rgb(255, 255, 255) rgb(255, 255, 255) rgb(255, 255, 255) rgb(224, 224, 224); border-image: initial; border-style: solid; border-width: 0px 0px 0px 1px; box-sizing: border-box; color: #aaaaaa; font-size: inherit; line-height: 16px; list-style: outside decimal; margin: 0px 0px 0px 40px; padding: 1px 5px 1px 14px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;box-sizing: border-box; color: #777777; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;odd&quot; style=&quot;background-color: white; border-color: rgb(255, 255, 255) rgb(255, 255, 255) rgb(255, 255, 255) rgb(224, 224, 224); border-image: initial; border-style: solid; border-width: 0px 0px 0px 1px; box-sizing: border-box; color: #aaaaaa; font-size: inherit; line-height: 16px; list-style: outside decimal; margin: 0px 0px 0px 40px; padding: 1px 5px 1px 14px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;box-sizing: border-box; color: #777777; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;co1&quot; style=&quot;box-sizing: border-box; color: #9999aa; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;even&quot; style=&quot;background-color: white; border-color: rgb(255, 255, 255) rgb(255, 255, 255) rgb(255, 255, 255) rgb(224, 224, 224); border-image: initial; border-style: solid; border-width: 0px 0px 0px 1px; box-sizing: border-box; color: #aaaaaa; font-size: inherit; line-height: 16px; list-style: outside decimal; margin: 0px 0px 0px 40px; padding: 1px 5px 1px 14px;&quot;&gt;&lt;span class=&quot;co1&quot; style=&quot;box-sizing: border-box; color: #9999aa; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;// Hooking up our function to theme setup&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;odd&quot; style=&quot;background-color: white; border-color: rgb(255, 255, 255) rgb(255, 255, 255) rgb(255, 255, 255) rgb(224, 224, 224); border-image: initial; border-style: solid; border-width: 0px 0px 0px 1px; box-sizing: border-box; color: #aaaaaa; font-size: inherit; line-height: 16px; list-style: outside decimal; margin: 0px 0px 0px 40px; padding: 1px 5px 1px 14px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;kw1&quot; style=&quot;box-sizing: border-box; color: #286491; font-family: inherit; font-size: 12px; font-weight: 700; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;add_action&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;box-sizing: border-box; color: #777777; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;box-sizing: border-box; color: #dd1144; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&#39;init&#39;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;, &lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;box-sizing: border-box; color: #dd1144; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&#39;create_posttype&#39;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;box-sizing: border-box; color: #777777; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;even&quot; style=&quot;background-color: white; border-color: rgb(255, 255, 255) rgb(255, 255, 255) rgb(255, 255, 255) rgb(224, 224, 224); border-image: initial; border-style: solid; border-width: 0px 0px 0px 1px; box-sizing: border-box; color: #aaaaaa; font-size: inherit; line-height: 16px; list-style: outside decimal; margin: 0px 0px 0px 40px; padding: 1px 5px 1px 14px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;odd&quot; style=&quot;background-color: white; border-color: rgb(255, 255, 255) rgb(255, 255, 255) rgb(255, 255, 255) rgb(224, 224, 224); border-image: initial; border-style: solid; border-width: 0px 0px 0px 1px; box-sizing: border-box; color: #aaaaaa; font-size: inherit; line-height: 16px; list-style: outside decimal; margin: 0px 0px 0px 40px; padding: 1px 5px 5px 14px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;co2&quot; style=&quot;box-sizing: border-box; color: #9999aa; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;/* Custom Post Type End */&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;ul style=&quot;box-sizing: border-box; line-height: 26px; margin-bottom: 25px; margin-top: 0px; padding-left: 0px;&quot;&gt;&lt;li style=&quot;box-sizing: border-box; list-style: none; margin-bottom: 15px; padding-left: 20px; position: relative;&quot;&gt;Once you’ve added the code, the News post-type will automatically appear in the admin area&lt;span&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;box-sizing: border-box; color: #1f2d3d; line-height: 28px; margin: 0px 0px 25px;&quot;&gt;&lt;img alt=&quot;Creating a Custom Post Type&quot; class=&quot;lazy cw_postFancy_img aligncenter wp-image-31268 size-full img-responsive&quot; data-original=&quot;https://www.cloudways.com/blog/wp-content/uploads/image07-61.png&quot; decoding=&quot;async&quot; height=&quot;287&quot; loading=&quot;lazy&quot; sizes=&quot;(max-width: 328px) 100vw, 328px&quot; src=&quot;https://www.cloudways.com/blog/wp-content/uploads/image07-61.png&quot; srcset=&quot;https://www.cloudways.com/blog/wp-content/uploads/image07-61.png 328w, https://www.cloudways.com/blog/wp-content/uploads/image07-61-300x263.png 300w&quot; style=&quot;border-radius: 4px; border: 1px solid rgb(112, 114, 129); box-shadow: rgba(0, 0, 0, 0.1) 0px 4px 10px; box-sizing: border-box; display: block; height: auto; margin: 0px auto; max-width: 100%; vertical-align: middle;&quot; title=&quot;Creating a Custom Post Type&quot; width=&quot;328&quot; /&gt;&lt;/p&gt;&lt;ul style=&quot;box-sizing: border-box; line-height: 26px; margin-bottom: 25px; margin-top: 0px; padding-left: 0px;&quot;&gt;&lt;li style=&quot;box-sizing: border-box; list-style: none; margin-bottom: 15px; padding-left: 20px; position: relative;&quot;&gt;When creating custom post types, it is necessary to use&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 600;&quot;&gt;init&amp;nbsp;&lt;/span&gt;for the hook in&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 600;&quot;&gt;add_action()&lt;/span&gt;, and the&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 600;&quot;&gt;register_post_type()&amp;nbsp;&lt;/span&gt;function&amp;nbsp;will take the arguments&lt;/li&gt;&lt;/ul&gt;&lt;div class=&quot;EnlighterJSWrapper enlighterEnlighterJSWrapper&quot; style=&quot;box-sizing: border-box; color: #7e8890; font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 10px; line-height: 16px; margin: 0px; overflow-wrap: break-word; overflow: auto; padding: 0px; position: relative; white-space: pre-wrap;&quot;&gt;&lt;ol class=&quot;hoverEnabled enlighterEnlighterJS EnlighterJS&quot; style=&quot;background-color: #f9f9f9; border-radius: 8px; border: 1px solid rgb(224, 224, 224); box-sizing: border-box; color: #939393; font-size: 11px; line-height: 26px; list-style: none; margin: 0px 0px 20px; overflow-wrap: break-word; overflow: auto; padding: 0px;&quot;&gt;&lt;li class=&quot;odd&quot; style=&quot;background-color: white; border-color: rgb(255, 255, 255) rgb(255, 255, 255) rgb(255, 255, 255) rgb(224, 224, 224); border-image: initial; border-style: solid; border-width: 0px 0px 0px 1px; box-sizing: border-box; color: #aaaaaa; font-size: inherit; line-height: 16px; list-style: outside decimal; margin: 0px 0px 0px 40px; padding: 5px 5px 1px 14px;&quot;&gt;&lt;span class=&quot;co2&quot; style=&quot;box-sizing: border-box; color: #9999aa; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;/*Custom Post type start*/&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;even&quot; style=&quot;background-color: white; border-color: rgb(255, 255, 255) rgb(255, 255, 255) rgb(255, 255, 255) rgb(224, 224, 224); border-image: initial; border-style: solid; border-width: 0px 0px 0px 1px; box-sizing: border-box; color: #aaaaaa; font-size: inherit; line-height: 16px; list-style: outside decimal; margin: 0px 0px 0px 40px; padding: 1px 5px 1px 14px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;odd&quot; style=&quot;background-color: white; border-color: rgb(255, 255, 255) rgb(255, 255, 255) rgb(255, 255, 255) rgb(224, 224, 224); border-image: initial; border-style: solid; border-width: 0px 0px 0px 1px; box-sizing: border-box; color: #aaaaaa; font-size: inherit; line-height: 16px; list-style: outside decimal; margin: 0px 0px 0px 40px; padding: 1px 5px 1px 14px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;function &lt;/span&gt;&lt;span class=&quot;kw1&quot; style=&quot;box-sizing: border-box; color: #286491; font-family: inherit; font-size: 12px; font-weight: 700; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;cw_post_type_news&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;box-sizing: border-box; color: #777777; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;box-sizing: border-box; color: #777777; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;box-sizing: border-box; color: #777777; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;even&quot; style=&quot;background-color: white; border-color: rgb(255, 255, 255) rgb(255, 255, 255) rgb(255, 255, 255) rgb(224, 224, 224); border-image: initial; border-style: solid; border-width: 0px 0px 0px 1px; box-sizing: border-box; color: #aaaaaa; font-size: inherit; line-height: 16px; list-style: outside decimal; margin: 0px 0px 0px 40px; padding: 1px 5px 1px 14px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;odd&quot; style=&quot;background-color: white; border-color: rgb(255, 255, 255) rgb(255, 255, 255) rgb(255, 255, 255) rgb(224, 224, 224); border-image: initial; border-style: solid; border-width: 0px 0px 0px 1px; box-sizing: border-box; color: #aaaaaa; font-size: inherit; line-height: 16px; list-style: outside decimal; margin: 0px 0px 0px 40px; padding: 1px 5px 1px 14px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;$supports = &lt;/span&gt;&lt;span class=&quot;kw1&quot; style=&quot;box-sizing: border-box; color: #286491; font-family: inherit; font-size: 12px; font-weight: 700; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;array&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;box-sizing: border-box; color: #777777; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;even&quot; style=&quot;background-color: white; border-color: rgb(255, 255, 255) rgb(255, 255, 255) rgb(255, 255, 255) rgb(224, 224, 224); border-image: initial; border-style: solid; border-width: 0px 0px 0px 1px; box-sizing: border-box; color: #aaaaaa; font-size: inherit; line-height: 16px; list-style: outside decimal; margin: 0px 0px 0px 40px; padding: 1px 5px 1px 14px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;box-sizing: border-box; color: #dd1144; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&#39;title&#39;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;co1&quot; style=&quot;box-sizing: border-box; color: #9999aa; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt; // post title&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;odd&quot; style=&quot;background-color: white; border-color: rgb(255, 255, 255) rgb(255, 255, 255) rgb(255, 255, 255) rgb(224, 224, 224); border-image: initial; border-style: solid; border-width: 0px 0px 0px 1px; box-sizing: border-box; color: #aaaaaa; font-size: inherit; line-height: 16px; list-style: outside decimal; margin: 0px 0px 0px 40px; padding: 1px 5px 1px 14px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;box-sizing: border-box; color: #dd1144; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&#39;editor&#39;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;co1&quot; style=&quot;box-sizing: border-box; color: #9999aa; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt; // post content&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;even&quot; style=&quot;background-color: white; border-color: rgb(255, 255, 255) rgb(255, 255, 255) rgb(255, 255, 255) rgb(224, 224, 224); border-image: initial; border-style: solid; border-width: 0px 0px 0px 1px; box-sizing: border-box; color: #aaaaaa; font-size: inherit; line-height: 16px; list-style: outside decimal; margin: 0px 0px 0px 40px; padding: 1px 5px 1px 14px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;box-sizing: border-box; color: #dd1144; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&#39;author&#39;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;co1&quot; style=&quot;box-sizing: border-box; color: #9999aa; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt; // post author&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;odd&quot; style=&quot;background-color: white; border-color: rgb(255, 255, 255) rgb(255, 255, 255) rgb(255, 255, 255) rgb(224, 224, 224); border-image: initial; border-style: solid; border-width: 0px 0px 0px 1px; box-sizing: border-box; color: #aaaaaa; font-size: inherit; line-height: 16px; list-style: outside decimal; margin: 0px 0px 0px 40px; padding: 1px 5px 1px 14px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;box-sizing: border-box; color: #dd1144; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&#39;thumbnail&#39;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;co1&quot; style=&quot;box-sizing: border-box; color: #9999aa; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt; // featured images&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;even&quot; style=&quot;background-color: white; border-color: rgb(255, 255, 255) rgb(255, 255, 255) rgb(255, 255, 255) rgb(224, 224, 224); border-image: initial; border-style: solid; border-width: 0px 0px 0px 1px; box-sizing: border-box; color: #aaaaaa; font-size: inherit; line-height: 16px; list-style: outside decimal; margin: 0px 0px 0px 40px; padding: 1px 5px 1px 14px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;box-sizing: border-box; color: #dd1144; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&#39;excerpt&#39;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;co1&quot; style=&quot;box-sizing: border-box; color: #9999aa; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt; // post excerpt&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;odd&quot; style=&quot;background-color: white; border-color: rgb(255, 255, 255) rgb(255, 255, 255) rgb(255, 255, 255) rgb(224, 224, 224); border-image: initial; border-style: solid; border-width: 0px 0px 0px 1px; box-sizing: border-box; color: #aaaaaa; font-size: inherit; line-height: 16px; list-style: outside decimal; margin: 0px 0px 0px 40px; padding: 1px 5px 1px 14px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;box-sizing: border-box; color: #dd1144; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&#39;custom-fields&#39;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;co1&quot; style=&quot;box-sizing: border-box; color: #9999aa; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt; // custom fields&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;even&quot; style=&quot;background-color: white; border-color: rgb(255, 255, 255) rgb(255, 255, 255) rgb(255, 255, 255) rgb(224, 224, 224); border-image: initial; border-style: solid; border-width: 0px 0px 0px 1px; box-sizing: border-box; color: #aaaaaa; font-size: inherit; line-height: 16px; list-style: outside decimal; margin: 0px 0px 0px 40px; padding: 1px 5px 1px 14px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;box-sizing: border-box; color: #dd1144; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&#39;comments&#39;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;co1&quot; style=&quot;box-sizing: border-box; color: #9999aa; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt; // post comments&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;odd&quot; style=&quot;background-color: white; border-color: rgb(255, 255, 255) rgb(255, 255, 255) rgb(255, 255, 255) rgb(224, 224, 224); border-image: initial; border-style: solid; border-width: 0px 0px 0px 1px; box-sizing: border-box; color: #aaaaaa; font-size: inherit; line-height: 16px; list-style: outside decimal; margin: 0px 0px 0px 40px; padding: 1px 5px 1px 14px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;box-sizing: border-box; color: #dd1144; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&#39;revisions&#39;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;co1&quot; style=&quot;box-sizing: border-box; color: #9999aa; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt; // post revisions&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;even&quot; style=&quot;background-color: white; border-color: rgb(255, 255, 255) rgb(255, 255, 255) rgb(255, 255, 255) rgb(224, 224, 224); border-image: initial; border-style: solid; border-width: 0px 0px 0px 1px; box-sizing: border-box; color: #aaaaaa; font-size: inherit; line-height: 16px; list-style: outside decimal; margin: 0px 0px 0px 40px; padding: 1px 5px 1px 14px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;box-sizing: border-box; color: #dd1144; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&#39;post-formats&#39;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;co1&quot; style=&quot;box-sizing: border-box; color: #9999aa; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt; // post formats&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;odd&quot; style=&quot;background-color: white; border-color: rgb(255, 255, 255) rgb(255, 255, 255) rgb(255, 255, 255) rgb(224, 224, 224); border-image: initial; border-style: solid; border-width: 0px 0px 0px 1px; box-sizing: border-box; color: #aaaaaa; font-size: inherit; line-height: 16px; list-style: outside decimal; margin: 0px 0px 0px 40px; padding: 1px 5px 1px 14px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;box-sizing: border-box; color: #777777; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;even&quot; style=&quot;background-color: white; border-color: rgb(255, 255, 255) rgb(255, 255, 255) rgb(255, 255, 255) rgb(224, 224, 224); border-image: initial; border-style: solid; border-width: 0px 0px 0px 1px; box-sizing: border-box; color: #aaaaaa; font-size: inherit; line-height: 16px; list-style: outside decimal; margin: 0px 0px 0px 40px; padding: 1px 5px 1px 14px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;odd&quot; style=&quot;background-color: white; border-color: rgb(255, 255, 255) rgb(255, 255, 255) rgb(255, 255, 255) rgb(224, 224, 224); border-image: initial; border-style: solid; border-width: 0px 0px 0px 1px; box-sizing: border-box; color: #aaaaaa; font-size: inherit; line-height: 16px; list-style: outside decimal; margin: 0px 0px 0px 40px; padding: 1px 5px 1px 14px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;$labels = &lt;/span&gt;&lt;span class=&quot;kw1&quot; style=&quot;box-sizing: border-box; color: #286491; font-family: inherit; font-size: 12px; font-weight: 700; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;array&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;box-sizing: border-box; color: #777777; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;even&quot; style=&quot;background-color: white; border-color: rgb(255, 255, 255) rgb(255, 255, 255) rgb(255, 255, 255) rgb(224, 224, 224); border-image: initial; border-style: solid; border-width: 0px 0px 0px 1px; box-sizing: border-box; color: #aaaaaa; font-size: inherit; line-height: 16px; list-style: outside decimal; margin: 0px 0px 0px 40px; padding: 1px 5px 1px 14px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;box-sizing: border-box; color: #dd1144; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&#39;name&#39;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt; =&amp;gt; &lt;/span&gt;&lt;span class=&quot;kw1&quot; style=&quot;box-sizing: border-box; color: #286491; font-family: inherit; font-size: 12px; font-weight: 700; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;_x&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;box-sizing: border-box; color: #777777; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;box-sizing: border-box; color: #dd1144; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&#39;news&#39;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;, &lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;box-sizing: border-box; color: #dd1144; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&#39;plural&#39;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;box-sizing: border-box; color: #777777; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;odd&quot; style=&quot;background-color: white; border-color: rgb(255, 255, 255) rgb(255, 255, 255) rgb(255, 255, 255) rgb(224, 224, 224); border-image: initial; border-style: solid; border-width: 0px 0px 0px 1px; box-sizing: border-box; color: #aaaaaa; font-size: inherit; line-height: 16px; list-style: outside decimal; margin: 0px 0px 0px 40px; padding: 1px 5px 1px 14px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;box-sizing: border-box; color: #dd1144; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&#39;singular_name&#39;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt; =&amp;gt; &lt;/span&gt;&lt;span class=&quot;kw1&quot; style=&quot;box-sizing: border-box; color: #286491; font-family: inherit; font-size: 12px; font-weight: 700; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;_x&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;box-sizing: border-box; color: #777777; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;box-sizing: border-box; color: #dd1144; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&#39;news&#39;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;, &lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;box-sizing: border-box; color: #dd1144; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&#39;singular&#39;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;box-sizing: border-box; color: #777777; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;even&quot; style=&quot;background-color: white; border-color: rgb(255, 255, 255) rgb(255, 255, 255) rgb(255, 255, 255) rgb(224, 224, 224); border-image: initial; border-style: solid; border-width: 0px 0px 0px 1px; box-sizing: border-box; color: #aaaaaa; font-size: inherit; line-height: 16px; list-style: outside decimal; margin: 0px 0px 0px 40px; padding: 1px 5px 1px 14px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;box-sizing: border-box; color: #dd1144; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&#39;menu_name&#39;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt; =&amp;gt; &lt;/span&gt;&lt;span class=&quot;kw1&quot; style=&quot;box-sizing: border-box; color: #286491; font-family: inherit; font-size: 12px; font-weight: 700; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;_x&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;box-sizing: border-box; color: #777777; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;box-sizing: border-box; color: #dd1144; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&#39;news&#39;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;, &lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;box-sizing: border-box; color: #dd1144; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&#39;admin menu&#39;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;box-sizing: border-box; color: #777777; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;odd&quot; style=&quot;background-color: white; border-color: rgb(255, 255, 255) rgb(255, 255, 255) rgb(255, 255, 255) rgb(224, 224, 224); border-image: initial; border-style: solid; border-width: 0px 0px 0px 1px; box-sizing: border-box; color: #aaaaaa; font-size: inherit; line-height: 16px; list-style: outside decimal; margin: 0px 0px 0px 40px; padding: 1px 5px 1px 14px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;box-sizing: border-box; color: #dd1144; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&#39;name_admin_bar&#39;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt; =&amp;gt; &lt;/span&gt;&lt;span class=&quot;kw1&quot; style=&quot;box-sizing: border-box; color: #286491; font-family: inherit; font-size: 12px; font-weight: 700; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;_x&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;box-sizing: border-box; color: #777777; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;box-sizing: border-box; color: #dd1144; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&#39;news&#39;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;, &lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;box-sizing: border-box; color: #dd1144; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&#39;admin bar&#39;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;box-sizing: border-box; color: #777777; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;even&quot; style=&quot;background-color: white; border-color: rgb(255, 255, 255) rgb(255, 255, 255) rgb(255, 255, 255) rgb(224, 224, 224); border-image: initial; border-style: solid; border-width: 0px 0px 0px 1px; box-sizing: border-box; color: #aaaaaa; font-size: inherit; line-height: 16px; list-style: outside decimal; margin: 0px 0px 0px 40px; padding: 1px 5px 1px 14px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;box-sizing: border-box; color: #dd1144; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&#39;add_new&#39;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt; =&amp;gt; &lt;/span&gt;&lt;span class=&quot;kw1&quot; style=&quot;box-sizing: border-box; color: #286491; font-family: inherit; font-size: 12px; font-weight: 700; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;_x&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;box-sizing: border-box; color: #777777; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;box-sizing: border-box; color: #dd1144; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&#39;Add New&#39;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;, &lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;box-sizing: border-box; color: #dd1144; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&#39;add new&#39;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;box-sizing: border-box; color: #777777; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;odd&quot; style=&quot;background-color: white; border-color: rgb(255, 255, 255) rgb(255, 255, 255) rgb(255, 255, 255) rgb(224, 224, 224); border-image: initial; border-style: solid; border-width: 0px 0px 0px 1px; box-sizing: border-box; color: #aaaaaa; font-size: inherit; line-height: 16px; list-style: outside decimal; margin: 0px 0px 0px 40px; padding: 1px 5px 1px 14px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;box-sizing: border-box; color: #dd1144; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&#39;add_new_item&#39;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt; =&amp;gt; &lt;/span&gt;&lt;span class=&quot;kw1&quot; style=&quot;box-sizing: border-box; color: #286491; font-family: inherit; font-size: 12px; font-weight: 700; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;__&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;box-sizing: border-box; color: #777777; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;box-sizing: border-box; color: #dd1144; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&#39;Add New news&#39;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;box-sizing: border-box; color: #777777; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;even&quot; style=&quot;background-color: white; border-color: rgb(255, 255, 255) rgb(255, 255, 255) rgb(255, 255, 255) rgb(224, 224, 224); border-image: initial; border-style: solid; border-width: 0px 0px 0px 1px; box-sizing: border-box; color: #aaaaaa; font-size: inherit; line-height: 16px; list-style: outside decimal; margin: 0px 0px 0px 40px; padding: 1px 5px 1px 14px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;box-sizing: border-box; color: #dd1144; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&#39;new_item&#39;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt; =&amp;gt; &lt;/span&gt;&lt;span class=&quot;kw1&quot; style=&quot;box-sizing: border-box; color: #286491; font-family: inherit; font-size: 12px; font-weight: 700; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;__&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;box-sizing: border-box; color: #777777; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;box-sizing: border-box; color: #dd1144; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&#39;New news&#39;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;box-sizing: border-box; color: #777777; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;odd&quot; style=&quot;background-color: white; border-color: rgb(255, 255, 255) rgb(255, 255, 255) rgb(255, 255, 255) rgb(224, 224, 224); border-image: initial; border-style: solid; border-width: 0px 0px 0px 1px; box-sizing: border-box; color: #aaaaaa; font-size: inherit; line-height: 16px; list-style: outside decimal; margin: 0px 0px 0px 40px; padding: 1px 5px 1px 14px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;box-sizing: border-box; color: #dd1144; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&#39;edit_item&#39;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt; =&amp;gt; &lt;/span&gt;&lt;span class=&quot;kw1&quot; style=&quot;box-sizing: border-box; color: #286491; font-family: inherit; font-size: 12px; font-weight: 700; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;__&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;box-sizing: border-box; color: #777777; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;box-sizing: border-box; color: #dd1144; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&#39;Edit news&#39;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;box-sizing: border-box; color: #777777; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;even&quot; style=&quot;background-color: white; border-color: rgb(255, 255, 255) rgb(255, 255, 255) rgb(255, 255, 255) rgb(224, 224, 224); border-image: initial; border-style: solid; border-width: 0px 0px 0px 1px; box-sizing: border-box; color: #aaaaaa; font-size: inherit; line-height: 16px; list-style: outside decimal; margin: 0px 0px 0px 40px; padding: 1px 5px 1px 14px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;box-sizing: border-box; color: #dd1144; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&#39;view_item&#39;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt; =&amp;gt; &lt;/span&gt;&lt;span class=&quot;kw1&quot; style=&quot;box-sizing: border-box; color: #286491; font-family: inherit; font-size: 12px; font-weight: 700; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;__&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;box-sizing: border-box; color: #777777; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;box-sizing: border-box; color: #dd1144; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&#39;View news&#39;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;box-sizing: border-box; color: #777777; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;odd&quot; style=&quot;background-color: white; border-color: rgb(255, 255, 255) rgb(255, 255, 255) rgb(255, 255, 255) rgb(224, 224, 224); border-image: initial; border-style: solid; border-width: 0px 0px 0px 1px; box-sizing: border-box; color: #aaaaaa; font-size: inherit; line-height: 16px; list-style: outside decimal; margin: 0px 0px 0px 40px; padding: 1px 5px 1px 14px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;box-sizing: border-box; color: #dd1144; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&#39;all_items&#39;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt; =&amp;gt; &lt;/span&gt;&lt;span class=&quot;kw1&quot; style=&quot;box-sizing: border-box; color: #286491; font-family: inherit; font-size: 12px; font-weight: 700; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;__&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;box-sizing: border-box; color: #777777; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;box-sizing: border-box; color: #dd1144; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&#39;All news&#39;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;box-sizing: border-box; color: #777777; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;even&quot; style=&quot;background-color: white; border-color: rgb(255, 255, 255) rgb(255, 255, 255) rgb(255, 255, 255) rgb(224, 224, 224); border-image: initial; border-style: solid; border-width: 0px 0px 0px 1px; box-sizing: border-box; color: #aaaaaa; font-size: inherit; line-height: 16px; list-style: outside decimal; margin: 0px 0px 0px 40px; padding: 1px 5px 1px 14px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;box-sizing: border-box; color: #dd1144; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&#39;search_items&#39;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt; =&amp;gt; &lt;/span&gt;&lt;span class=&quot;kw1&quot; style=&quot;box-sizing: border-box; color: #286491; font-family: inherit; font-size: 12px; font-weight: 700; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;__&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;box-sizing: border-box; color: #777777; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;box-sizing: border-box; color: #dd1144; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&#39;Search news&#39;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;box-sizing: border-box; color: #777777; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;odd&quot; style=&quot;background-color: white; border-color: rgb(255, 255, 255) rgb(255, 255, 255) rgb(255, 255, 255) rgb(224, 224, 224); border-image: initial; border-style: solid; border-width: 0px 0px 0px 1px; box-sizing: border-box; color: #aaaaaa; font-size: inherit; line-height: 16px; list-style: outside decimal; margin: 0px 0px 0px 40px; padding: 1px 5px 1px 14px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;box-sizing: border-box; color: #dd1144; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&#39;not_found&#39;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt; =&amp;gt; &lt;/span&gt;&lt;span class=&quot;kw1&quot; style=&quot;box-sizing: border-box; color: #286491; font-family: inherit; font-size: 12px; font-weight: 700; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;__&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;box-sizing: border-box; color: #777777; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;box-sizing: border-box; color: #dd1144; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&#39;No news found.&#39;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;box-sizing: border-box; color: #777777; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;even&quot; style=&quot;background-color: white; border-color: rgb(255, 255, 255) rgb(255, 255, 255) rgb(255, 255, 255) rgb(224, 224, 224); border-image: initial; border-style: solid; border-width: 0px 0px 0px 1px; box-sizing: border-box; color: #aaaaaa; font-size: inherit; line-height: 16px; list-style: outside decimal; margin: 0px 0px 0px 40px; padding: 1px 5px 1px 14px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;box-sizing: border-box; color: #777777; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;odd&quot; style=&quot;background-color: white; border-color: rgb(255, 255, 255) rgb(255, 255, 255) rgb(255, 255, 255) rgb(224, 224, 224); border-image: initial; border-style: solid; border-width: 0px 0px 0px 1px; box-sizing: border-box; color: #aaaaaa; font-size: inherit; line-height: 16px; list-style: outside decimal; margin: 0px 0px 0px 40px; padding: 1px 5px 1px 14px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;even&quot; style=&quot;background-color: white; border-color: rgb(255, 255, 255) rgb(255, 255, 255) rgb(255, 255, 255) rgb(224, 224, 224); border-image: initial; border-style: solid; border-width: 0px 0px 0px 1px; box-sizing: border-box; color: #aaaaaa; font-size: inherit; line-height: 16px; list-style: outside decimal; margin: 0px 0px 0px 40px; padding: 1px 5px 1px 14px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;$args = &lt;/span&gt;&lt;span class=&quot;kw1&quot; style=&quot;box-sizing: border-box; color: #286491; font-family: inherit; font-size: 12px; font-weight: 700; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;array&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;box-sizing: border-box; color: #777777; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;odd&quot; style=&quot;background-color: white; border-color: rgb(255, 255, 255) rgb(255, 255, 255) rgb(255, 255, 255) rgb(224, 224, 224); border-image: initial; border-style: solid; border-width: 0px 0px 0px 1px; box-sizing: border-box; color: #aaaaaa; font-size: inherit; line-height: 16px; list-style: outside decimal; margin: 0px 0px 0px 40px; padding: 1px 5px 1px 14px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;box-sizing: border-box; color: #dd1144; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&#39;supports&#39;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt; =&amp;gt; $supports,&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;even&quot; style=&quot;background-color: white; border-color: rgb(255, 255, 255) rgb(255, 255, 255) rgb(255, 255, 255) rgb(224, 224, 224); border-image: initial; border-style: solid; border-width: 0px 0px 0px 1px; box-sizing: border-box; color: #aaaaaa; font-size: inherit; line-height: 16px; list-style: outside decimal; margin: 0px 0px 0px 40px; padding: 1px 5px 1px 14px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;box-sizing: border-box; color: #dd1144; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&#39;labels&#39;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt; =&amp;gt; $labels,&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;odd&quot; style=&quot;background-color: white; border-color: rgb(255, 255, 255) rgb(255, 255, 255) rgb(255, 255, 255) rgb(224, 224, 224); border-image: initial; border-style: solid; border-width: 0px 0px 0px 1px; box-sizing: border-box; color: #aaaaaa; font-size: inherit; line-height: 16px; list-style: outside decimal; margin: 0px 0px 0px 40px; padding: 1px 5px 1px 14px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;box-sizing: border-box; color: #dd1144; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&#39;public&#39;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt; =&amp;gt; true,&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;even&quot; style=&quot;background-color: white; border-color: rgb(255, 255, 255) rgb(255, 255, 255) rgb(255, 255, 255) rgb(224, 224, 224); border-image: initial; border-style: solid; border-width: 0px 0px 0px 1px; box-sizing: border-box; color: #aaaaaa; font-size: inherit; line-height: 16px; list-style: outside decimal; margin: 0px 0px 0px 40px; padding: 1px 5px 1px 14px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;box-sizing: border-box; color: #dd1144; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&#39;query_var&#39;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt; =&amp;gt; true,&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;odd&quot; style=&quot;background-color: white; border-color: rgb(255, 255, 255) rgb(255, 255, 255) rgb(255, 255, 255) rgb(224, 224, 224); border-image: initial; border-style: solid; border-width: 0px 0px 0px 1px; box-sizing: border-box; color: #aaaaaa; font-size: inherit; line-height: 16px; list-style: outside decimal; margin: 0px 0px 0px 40px; padding: 1px 5px 1px 14px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;box-sizing: border-box; color: #dd1144; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&#39;rewrite&#39;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt; =&amp;gt; &lt;/span&gt;&lt;span class=&quot;kw1&quot; style=&quot;box-sizing: border-box; color: #286491; font-family: inherit; font-size: 12px; font-weight: 700; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;array&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;box-sizing: border-box; color: #777777; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;box-sizing: border-box; color: #dd1144; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&#39;slug&#39;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt; =&amp;gt; &lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;box-sizing: border-box; color: #dd1144; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&#39;news&#39;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;box-sizing: border-box; color: #777777; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;even&quot; style=&quot;background-color: white; border-color: rgb(255, 255, 255) rgb(255, 255, 255) rgb(255, 255, 255) rgb(224, 224, 224); border-image: initial; border-style: solid; border-width: 0px 0px 0px 1px; box-sizing: border-box; color: #aaaaaa; font-size: inherit; line-height: 16px; list-style: outside decimal; margin: 0px 0px 0px 40px; padding: 1px 5px 1px 14px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;box-sizing: border-box; color: #dd1144; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&#39;has_archive&#39;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt; =&amp;gt; true,&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;odd&quot; style=&quot;background-color: white; border-color: rgb(255, 255, 255) rgb(255, 255, 255) rgb(255, 255, 255) rgb(224, 224, 224); border-image: initial; border-style: solid; border-width: 0px 0px 0px 1px; box-sizing: border-box; color: #aaaaaa; font-size: inherit; line-height: 16px; list-style: outside decimal; margin: 0px 0px 0px 40px; padding: 1px 5px 1px 14px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;box-sizing: border-box; color: #dd1144; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&#39;hierarchical&#39;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt; =&amp;gt; false,&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;even&quot; style=&quot;background-color: white; border-color: rgb(255, 255, 255) rgb(255, 255, 255) rgb(255, 255, 255) rgb(224, 224, 224); border-image: initial; border-style: solid; border-width: 0px 0px 0px 1px; box-sizing: border-box; color: #aaaaaa; font-size: inherit; line-height: 16px; list-style: outside decimal; margin: 0px 0px 0px 40px; padding: 1px 5px 1px 14px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;box-sizing: border-box; color: #777777; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;odd&quot; style=&quot;background-color: white; border-color: rgb(255, 255, 255) rgb(255, 255, 255) rgb(255, 255, 255) rgb(224, 224, 224); border-image: initial; border-style: solid; border-width: 0px 0px 0px 1px; box-sizing: border-box; color: #aaaaaa; font-size: inherit; line-height: 16px; list-style: outside decimal; margin: 0px 0px 0px 40px; padding: 1px 5px 1px 14px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;kw1&quot; style=&quot;box-sizing: border-box; color: #286491; font-family: inherit; font-size: 12px; font-weight: 700; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;register_post_type&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;box-sizing: border-box; color: #777777; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;box-sizing: border-box; color: #dd1144; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&#39;news&#39;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;, $args&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;box-sizing: border-box; color: #777777; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;even&quot; style=&quot;background-color: white; border-color: rgb(255, 255, 255) rgb(255, 255, 255) rgb(255, 255, 255) rgb(224, 224, 224); border-image: initial; border-style: solid; border-width: 0px 0px 0px 1px; box-sizing: border-box; color: #aaaaaa; font-size: inherit; line-height: 16px; list-style: outside decimal; margin: 0px 0px 0px 40px; padding: 1px 5px 1px 14px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;box-sizing: border-box; color: #777777; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;odd&quot; style=&quot;background-color: white; border-color: rgb(255, 255, 255) rgb(255, 255, 255) rgb(255, 255, 255) rgb(224, 224, 224); border-image: initial; border-style: solid; border-width: 0px 0px 0px 1px; box-sizing: border-box; color: #aaaaaa; font-size: inherit; line-height: 16px; list-style: outside decimal; margin: 0px 0px 0px 40px; padding: 1px 5px 1px 14px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;kw1&quot; style=&quot;box-sizing: border-box; color: #286491; font-family: inherit; font-size: 12px; font-weight: 700; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;add_action&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;box-sizing: border-box; color: #777777; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;box-sizing: border-box; color: #dd1144; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&#39;init&#39;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;, &lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;box-sizing: border-box; color: #dd1144; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&#39;cw_post_type_news&#39;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;box-sizing: border-box; color: #777777; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;even&quot; style=&quot;background-color: white; border-color: rgb(255, 255, 255) rgb(255, 255, 255) rgb(255, 255, 255) rgb(224, 224, 224); border-image: initial; border-style: solid; border-width: 0px 0px 0px 1px; box-sizing: border-box; color: #aaaaaa; font-size: inherit; line-height: 16px; list-style: outside decimal; margin: 0px 0px 0px 40px; padding: 1px 5px 1px 14px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;odd&quot; style=&quot;background-color: white; border-color: rgb(255, 255, 255) rgb(255, 255, 255) rgb(255, 255, 255) rgb(224, 224, 224); border-image: initial; border-style: solid; border-width: 0px 0px 0px 1px; box-sizing: border-box; color: #aaaaaa; font-size: inherit; line-height: 16px; list-style: outside decimal; margin: 0px 0px 0px 40px; padding: 1px 5px 5px 14px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;co2&quot; style=&quot;box-sizing: border-box; color: #9999aa; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;/*Custom Post type end*/&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;p style=&quot;box-sizing: border-box; color: #1f2d3d; line-height: 28px; margin: 0px 0px 25px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: #3c4858; font-weight: 600;&quot;&gt;$supports:&lt;/span&gt;&amp;nbsp;Specifies that the post type is compatible and supports all essential features.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; color: #1f2d3d; line-height: 28px; margin: 0px 0px 25px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: #3c4858; font-weight: 600;&quot;&gt;$labels:&lt;/span&gt;&amp;nbsp;Specifies that the post type is referred correctly to the admin area.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; color: #1f2d3d; line-height: 28px; margin: 0px 0px 25px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: #3c4858; font-weight: 600;&quot;&gt;$args:&lt;/span&gt;&amp;nbsp;Specifies a permalink slug of the news and a menu position located just beneath the&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; color: #3c4858; font-weight: 600;&quot;&gt;Posts&lt;/span&gt;&amp;nbsp;menu.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; color: #1f2d3d; line-height: 28px; margin: 0px 0px 25px;&quot;&gt;Now let’s take a look at before and after adding custom post features to our WordPress website.&lt;/p&gt;&lt;h6 style=&quot;box-sizing: border-box; color: #7e8890; font-size: 12px; font-weight: 500; line-height: 1.1; margin-bottom: 10px; margin-top: 10px; text-align: center;&quot;&gt;&lt;img alt=&quot;Before adding custom post features on WordPress&quot; class=&quot;lazy cw_postFancy_img aligncenter wp-image-31269 size-full img-responsive&quot; data-original=&quot;https://www.cloudways.com/blog/wp-content/uploads/image06-77.png&quot; decoding=&quot;async&quot; height=&quot;602&quot; loading=&quot;lazy&quot; sizes=&quot;(max-width: 1352px) 100vw, 1352px&quot; src=&quot;https://www.cloudways.com/blog/wp-content/uploads/image06-77.png&quot; srcset=&quot;https://www.cloudways.com/blog/wp-content/uploads/image06-77.png 1352w, https://www.cloudways.com/blog/wp-content/uploads/image06-77-300x134.png 300w, https://www.cloudways.com/blog/wp-content/uploads/image06-77-768x342.png 768w, https://www.cloudways.com/blog/wp-content/uploads/image06-77-1024x456.png 1024w&quot; style=&quot;border-radius: 4px; border: 1px solid rgb(112, 114, 129); box-shadow: rgba(0, 0, 0, 0.1) 0px 4px 10px; box-sizing: border-box; display: block; height: auto; margin: 0px auto; max-width: 100%; vertical-align: middle;&quot; title=&quot;Before adding custom post features on WordPress&quot; width=&quot;1352&quot; /&gt;&lt;/h6&gt;&lt;p style=&quot;box-sizing: border-box; color: #1f2d3d; line-height: 28px; margin: 0px 0px 25px; text-align: center;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;– Before adding features&lt;/em&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; color: #1f2d3d; line-height: 28px; margin: 0px 0px 25px; text-align: center;&quot;&gt;&lt;img alt=&quot;After adding custom post features on WordPress&quot; class=&quot;lazy cw_postFancy_img aligncenter wp-image-31270 size-full img-responsive&quot; data-original=&quot;https://www.cloudways.com/blog/wp-content/uploads/image02-121.png&quot; decoding=&quot;async&quot; height=&quot;598&quot; loading=&quot;lazy&quot; sizes=&quot;(max-width: 1335px) 100vw, 1335px&quot; src=&quot;https://www.cloudways.com/blog/wp-content/uploads/image02-121.png&quot; srcset=&quot;https://www.cloudways.com/blog/wp-content/uploads/image02-121.png 1335w, https://www.cloudways.com/blog/wp-content/uploads/image02-121-300x134.png 300w, https://www.cloudways.com/blog/wp-content/uploads/image02-121-768x344.png 768w, https://www.cloudways.com/blog/wp-content/uploads/image02-121-1024x459.png 1024w&quot; style=&quot;border-radius: 4px; border: 1px solid rgb(112, 114, 129); box-shadow: rgba(0, 0, 0, 0.1) 0px 4px 10px; box-sizing: border-box; display: block; height: auto; margin: 0px auto; max-width: 100%; vertical-align: middle;&quot; title=&quot;After adding custom post features on WordPress&quot; width=&quot;1335&quot; /&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;– After adding features&lt;/em&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; color: #1f2d3d; line-height: 28px; margin: 0px 0px 25px;&quot;&gt;The steps above tell how to register WordPress custom post types to the backend of any theme. Now let’s learn how to add a custom post on a WordPress website.&lt;/p&gt;&lt;h2 id=&quot;create-new-custom-post&quot; style=&quot;box-sizing: border-box; font-size: 30px; font-weight: 500; line-height: 38px; margin: 0px 0px 15px;&quot;&gt;How to Create a New Custom Post on a WordPress Website&lt;/h2&gt;&lt;p style=&quot;box-sizing: border-box; color: #1f2d3d; line-height: 28px; margin: 0px 0px 25px;&quot;&gt;You can create a new custom post on your WordPress website by following the steps below:&lt;/p&gt;&lt;ul style=&quot;box-sizing: border-box; line-height: 26px; margin-bottom: 25px; margin-top: 0px; padding-left: 0px;&quot;&gt;&lt;li style=&quot;box-sizing: border-box; list-style: none; margin-bottom: 15px; padding-left: 20px; position: relative;&quot;&gt;Click the&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 600;&quot;&gt;registered custom post type&lt;/span&gt;, which in our case is “&lt;span style=&quot;box-sizing: border-box; font-weight: 600;&quot;&gt;News&lt;/span&gt;.”&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box; list-style: none; margin-bottom: 15px; padding-left: 20px; position: relative;&quot;&gt;Click&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 600;&quot;&gt;Add New&lt;/span&gt;.&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box; list-style: none; margin-bottom: 15px; padding-left: 20px; position: relative;&quot;&gt;Type the&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 600;&quot;&gt;title&lt;/span&gt;&amp;nbsp;and&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 600;&quot;&gt;body&lt;/span&gt;&amp;nbsp;of your post.&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box; list-style: none; margin-bottom: 15px; padding-left: 20px; position: relative;&quot;&gt;Type the&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 600;&quot;&gt;excerpt&lt;/span&gt;, and set a&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 600;&quot;&gt;featured image&lt;/span&gt;.&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box; list-style: none; margin-bottom: 15px; padding-left: 20px; position: relative;&quot;&gt;Click the&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 600;&quot;&gt;Publish&lt;/span&gt;&amp;nbsp;button to take the new custom post live.&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;box-sizing: border-box; color: #1f2d3d; line-height: 28px; margin: 0px 0px 25px;&quot;&gt;&lt;img alt=&quot;Create a New Custom Post on a WordPress Website&quot; class=&quot;lazy cw_postFancy_img aligncenter wp-image-31271 size-full img-responsive&quot; data-original=&quot;https://www.cloudways.com/blog/wp-content/uploads/image03-115.png&quot; decoding=&quot;async&quot; height=&quot;600&quot; loading=&quot;lazy&quot; sizes=&quot;(max-width: 1333px) 100vw, 1333px&quot; src=&quot;https://www.cloudways.com/blog/wp-content/uploads/image03-115.png&quot; srcset=&quot;https://www.cloudways.com/blog/wp-content/uploads/image03-115.png 1333w, https://www.cloudways.com/blog/wp-content/uploads/image03-115-300x135.png 300w, https://www.cloudways.com/blog/wp-content/uploads/image03-115-768x346.png 768w, https://www.cloudways.com/blog/wp-content/uploads/image03-115-1024x461.png 1024w&quot; style=&quot;border-radius: 4px; border: 1px solid rgb(112, 114, 129); box-shadow: rgba(0, 0, 0, 0.1) 0px 4px 10px; box-sizing: border-box; display: block; height: auto; margin: 0px auto; max-width: 100%; vertical-align: middle;&quot; title=&quot;Create a New Custom Post on a WordPress Website&quot; width=&quot;1333&quot; /&gt;&lt;/p&gt;&lt;h2 id=&quot;create-template-and-fetching-list&quot; style=&quot;box-sizing: border-box; font-size: 30px; font-weight: 500; line-height: 38px; margin: 0px 0px 15px;&quot;&gt;How to Create a Template and Fetching List&lt;/h2&gt;&lt;p style=&quot;box-sizing: border-box; color: #1f2d3d; line-height: 28px; margin: 0px 0px 25px;&quot;&gt;Creating a template and fetching a list requires creating a new file named template-news.php.&lt;/p&gt;&lt;ul style=&quot;box-sizing: border-box; line-height: 26px; margin-bottom: 25px; margin-top: 0px; padding-left: 0px;&quot;&gt;&lt;li style=&quot;box-sizing: border-box; list-style: none; margin-bottom: 15px; padding-left: 20px; position: relative;&quot;&gt;Place the newly created file in your theme folder.&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box; list-style: none; margin-bottom: 15px; padding-left: 20px; position: relative;&quot;&gt;Add the following code to the file:&lt;/li&gt;&lt;/ul&gt;&lt;div class=&quot;EnlighterJSWrapper enlighterEnlighterJSWrapper&quot; style=&quot;box-sizing: border-box; color: #7e8890; font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 10px; line-height: 16px; margin: 0px; overflow-wrap: break-word; overflow: auto; padding: 0px; position: relative; white-space: pre-wrap;&quot;&gt;&lt;ol class=&quot;hoverEnabled enlighterEnlighterJS EnlighterJS&quot; style=&quot;background-color: #f9f9f9; border-radius: 8px; border: 1px solid rgb(224, 224, 224); box-sizing: border-box; color: #939393; font-size: 11px; line-height: 26px; list-style: none; margin: 0px 0px 20px; overflow-wrap: break-word; overflow: auto; padding: 0px;&quot;&gt;&lt;li class=&quot;odd&quot; style=&quot;background-color: white; border-color: rgb(255, 255, 255) rgb(255, 255, 255) rgb(255, 255, 255) rgb(224, 224, 224); border-image: initial; border-style: solid; border-width: 0px 0px 0px 1px; box-sizing: border-box; color: #aaaaaa; font-size: inherit; line-height: 16px; list-style: outside decimal; margin: 0px 0px 0px 40px; padding: 5px 5px 1px 14px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;?php&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;even&quot; style=&quot;background-color: white; border-color: rgb(255, 255, 255) rgb(255, 255, 255) rgb(255, 255, 255) rgb(224, 224, 224); border-image: initial; border-style: solid; border-width: 0px 0px 0px 1px; box-sizing: border-box; color: #aaaaaa; font-size: inherit; line-height: 16px; list-style: outside decimal; margin: 0px 0px 0px 40px; padding: 1px 5px 1px 14px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;co2&quot; style=&quot;box-sizing: border-box; color: #9999aa; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;/*Template Name: News*/&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;odd&quot; style=&quot;background-color: white; border-color: rgb(255, 255, 255) rgb(255, 255, 255) rgb(255, 255, 255) rgb(224, 224, 224); border-image: initial; border-style: solid; border-width: 0px 0px 0px 1px; box-sizing: border-box; color: #aaaaaa; font-size: inherit; line-height: 16px; list-style: outside decimal; margin: 0px 0px 0px 40px; padding: 1px 5px 1px 14px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;kw1&quot; style=&quot;box-sizing: border-box; color: #286491; font-family: inherit; font-size: 12px; font-weight: 700; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;get_header&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;box-sizing: border-box; color: #777777; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;box-sizing: border-box; color: #777777; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;even&quot; style=&quot;background-color: white; border-color: rgb(255, 255, 255) rgb(255, 255, 255) rgb(255, 255, 255) rgb(224, 224, 224); border-image: initial; border-style: solid; border-width: 0px 0px 0px 1px; box-sizing: border-box; color: #aaaaaa; font-size: inherit; line-height: 16px; list-style: outside decimal; margin: 0px 0px 0px 40px; padding: 1px 5px 1px 14px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;kw1&quot; style=&quot;box-sizing: border-box; color: #286491; font-family: inherit; font-size: 12px; font-weight: 700; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;query_posts&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;box-sizing: border-box; color: #777777; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw1&quot; style=&quot;box-sizing: border-box; color: #286491; font-family: inherit; font-size: 12px; font-weight: 700; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;array&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;box-sizing: border-box; color: #777777; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;odd&quot; style=&quot;background-color: white; border-color: rgb(255, 255, 255) rgb(255, 255, 255) rgb(255, 255, 255) rgb(224, 224, 224); border-image: initial; border-style: solid; border-width: 0px 0px 0px 1px; box-sizing: border-box; color: #aaaaaa; font-size: inherit; line-height: 16px; list-style: outside decimal; margin: 0px 0px 0px 40px; padding: 1px 5px 1px 14px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;   &lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;box-sizing: border-box; color: #dd1144; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&#39;post_type&#39;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt; =&amp;gt; &lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;box-sizing: border-box; color: #dd1144; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&#39;news&#39;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;even&quot; style=&quot;background-color: white; border-color: rgb(255, 255, 255) rgb(255, 255, 255) rgb(255, 255, 255) rgb(224, 224, 224); border-image: initial; border-style: solid; border-width: 0px 0px 0px 1px; box-sizing: border-box; color: #aaaaaa; font-size: inherit; line-height: 16px; list-style: outside decimal; margin: 0px 0px 0px 40px; padding: 1px 5px 1px 14px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;box-sizing: border-box; color: #777777; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;box-sizing: border-box; color: #777777; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;; ?&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;odd&quot; style=&quot;background-color: white; border-color: rgb(255, 255, 255) rgb(255, 255, 255) rgb(255, 255, 255) rgb(224, 224, 224); border-image: initial; border-style: solid; border-width: 0px 0px 0px 1px; box-sizing: border-box; color: #aaaaaa; font-size: inherit; line-height: 16px; list-style: outside decimal; margin: 0px 0px 0px 40px; padding: 1px 5px 1px 14px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;?php&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;even&quot; style=&quot;background-color: white; border-color: rgb(255, 255, 255) rgb(255, 255, 255) rgb(255, 255, 255) rgb(224, 224, 224); border-image: initial; border-style: solid; border-width: 0px 0px 0px 1px; box-sizing: border-box; color: #aaaaaa; font-size: inherit; line-height: 16px; list-style: outside decimal; margin: 0px 0px 0px 40px; padding: 1px 5px 1px 14px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;kw1&quot; style=&quot;box-sizing: border-box; color: #286491; font-family: inherit; font-size: 12px; font-weight: 700; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;while&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;box-sizing: border-box; color: #777777; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw1&quot; style=&quot;box-sizing: border-box; color: #286491; font-family: inherit; font-size: 12px; font-weight: 700; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;have_posts&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;box-sizing: border-box; color: #777777; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;box-sizing: border-box; color: #777777; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;box-sizing: border-box; color: #777777; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt; : &lt;/span&gt;&lt;span class=&quot;kw1&quot; style=&quot;box-sizing: border-box; color: #286491; font-family: inherit; font-size: 12px; font-weight: 700; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;the_post&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;box-sizing: border-box; color: #777777; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;box-sizing: border-box; color: #777777; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;; ?&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;odd&quot; style=&quot;background-color: white; border-color: rgb(255, 255, 255) rgb(255, 255, 255) rgb(255, 255, 255) rgb(224, 224, 224); border-image: initial; border-style: solid; border-width: 0px 0px 0px 1px; box-sizing: border-box; color: #aaaaaa; font-size: inherit; line-height: 16px; list-style: outside decimal; margin: 0px 0px 0px 40px; padding: 1px 5px 1px 14px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;h2&amp;gt;&amp;lt;a href=&lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;box-sizing: border-box; color: #dd1144; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&quot;&amp;lt;?php the_permalink() ?&amp;gt;&quot;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&amp;gt;&amp;lt;?php &lt;/span&gt;&lt;span class=&quot;kw1&quot; style=&quot;box-sizing: border-box; color: #286491; font-family: inherit; font-size: 12px; font-weight: 700; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;the_title&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;box-sizing: border-box; color: #777777; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;box-sizing: border-box; color: #777777; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;; ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;even&quot; style=&quot;background-color: white; border-color: rgb(255, 255, 255) rgb(255, 255, 255) rgb(255, 255, 255) rgb(224, 224, 224); border-image: initial; border-style: solid; border-width: 0px 0px 0px 1px; box-sizing: border-box; color: #aaaaaa; font-size: inherit; line-height: 16px; list-style: outside decimal; margin: 0px 0px 0px 40px; padding: 1px 5px 1px 14px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;p&amp;gt;&amp;lt;?php &lt;/span&gt;&lt;span class=&quot;kw1&quot; style=&quot;box-sizing: border-box; color: #286491; font-family: inherit; font-size: 12px; font-weight: 700; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;the_excerpt&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;box-sizing: border-box; color: #777777; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;box-sizing: border-box; color: #777777; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;; ?&amp;gt;&amp;lt;/p&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;odd&quot; style=&quot;background-color: white; border-color: rgb(255, 255, 255) rgb(255, 255, 255) rgb(255, 255, 255) rgb(224, 224, 224); border-image: initial; border-style: solid; border-width: 0px 0px 0px 1px; box-sizing: border-box; color: #aaaaaa; font-size: inherit; line-height: 16px; list-style: outside decimal; margin: 0px 0px 0px 40px; padding: 1px 5px 1px 14px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;?php endwhile;&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;even&quot; style=&quot;background-color: white; border-color: rgb(255, 255, 255) rgb(255, 255, 255) rgb(255, 255, 255) rgb(224, 224, 224); border-image: initial; border-style: solid; border-width: 0px 0px 0px 1px; box-sizing: border-box; color: #aaaaaa; font-size: inherit; line-height: 16px; list-style: outside decimal; margin: 0px 0px 0px 40px; padding: 1px 5px 1px 14px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;kw1&quot; style=&quot;box-sizing: border-box; color: #286491; font-family: inherit; font-size: 12px; font-weight: 700; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;get_footer&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;box-sizing: border-box; color: #777777; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;box-sizing: border-box; color: #777777; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;odd&quot; style=&quot;background-color: white; border-color: rgb(255, 255, 255) rgb(255, 255, 255) rgb(255, 255, 255) rgb(224, 224, 224); border-image: initial; border-style: solid; border-width: 0px 0px 0px 1px; box-sizing: border-box; color: #aaaaaa; font-size: inherit; line-height: 16px; list-style: outside decimal; margin: 0px 0px 0px 40px; padding: 1px 5px 5px 14px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;h3 id=&quot;selecttemplate&quot; style=&quot;box-sizing: border-box; font-size: 24px; font-weight: 500; line-height: 32px; margin: 0px 0px 20px;&quot;&gt;Select a Template&lt;/h3&gt;&lt;ul style=&quot;box-sizing: border-box; line-height: 26px; margin-bottom: 25px; margin-top: 0px; padding-left: 0px;&quot;&gt;&lt;li style=&quot;box-sizing: border-box; list-style: none; margin-bottom: 15px; padding-left: 20px; position: relative;&quot;&gt;Go to your&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 600;&quot;&gt;WordPress dashboard&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box; list-style: none; margin-bottom: 15px; padding-left: 20px; position: relative;&quot;&gt;Click&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 600;&quot;&gt;Pages&lt;/span&gt;&amp;nbsp;&amp;gt;&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 600;&quot;&gt;Add New&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box; list-style: none; margin-bottom: 15px; padding-left: 20px; position: relative;&quot;&gt;Create a new page named “&lt;span style=&quot;box-sizing: border-box; font-weight: 600;&quot;&gt;News&lt;/span&gt;“&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box; list-style: none; margin-bottom: 15px; padding-left: 20px; position: relative;&quot;&gt;Click&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 600;&quot;&gt;Page Attributes&lt;/span&gt;&amp;nbsp;on the right side and access the drop-down menu under&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 600;&quot;&gt;Template&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box; list-style: none; margin-bottom: 15px; padding-left: 20px; position: relative;&quot;&gt;Select the new template “&lt;span style=&quot;box-sizing: border-box; font-weight: 600;&quot;&gt;News&lt;/span&gt;“&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box; list-style: none; margin-bottom: 15px; padding-left: 20px; position: relative;&quot;&gt;Click the&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 600;&quot;&gt;Update&lt;/span&gt;&amp;nbsp;button to set your template&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;box-sizing: border-box; color: #1f2d3d; line-height: 28px; margin: 0px 0px 25px;&quot;&gt;Refer to the image below for the visual representation of the above steps:&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; color: #1f2d3d; line-height: 28px; margin: 0px 0px 25px;&quot;&gt;&lt;img alt=&quot;Select template&quot; class=&quot;lazy cw_postFancy_img aligncenter wp-image-31272 size-full img-responsive&quot; data-original=&quot;https://www.cloudways.com/blog/wp-content/uploads/image08-46.png&quot; decoding=&quot;async&quot; height=&quot;576&quot; loading=&quot;lazy&quot; sizes=&quot;(max-width: 1333px) 100vw, 1333px&quot; src=&quot;https://www.cloudways.com/blog/wp-content/uploads/image08-46.png&quot; srcset=&quot;https://www.cloudways.com/blog/wp-content/uploads/image08-46.png 1333w, https://www.cloudways.com/blog/wp-content/uploads/image08-46-300x130.png 300w, https://www.cloudways.com/blog/wp-content/uploads/image08-46-768x332.png 768w, https://www.cloudways.com/blog/wp-content/uploads/image08-46-1024x442.png 1024w, https://www.cloudways.com/blog/wp-content/uploads/image08-46-350x150.png 350w&quot; style=&quot;border-radius: 4px; border: 1px solid rgb(112, 114, 129); box-shadow: rgba(0, 0, 0, 0.1) 0px 4px 10px; box-sizing: border-box; display: block; height: auto; margin: 0px auto; max-width: 100%; vertical-align: middle;&quot; title=&quot;Select template&quot; width=&quot;1333&quot; /&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; color: #1f2d3d; line-height: 28px; margin: 0px 0px 25px;&quot;&gt;The image below represents the final display of your listing page:&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; color: #1f2d3d; line-height: 28px; margin: 0px 0px 25px;&quot;&gt;&lt;img alt=&quot;Listing Page Result&quot; class=&quot;lazy cw_postFancy_img aligncenter wp-image-31273 size-full img-responsive&quot; data-original=&quot;https://www.cloudways.com/blog/wp-content/uploads/image05-6.jpg&quot; decoding=&quot;async&quot; height=&quot;892&quot; loading=&quot;lazy&quot; sizes=&quot;(max-width: 906px) 100vw, 906px&quot; src=&quot;https://www.cloudways.com/blog/wp-content/uploads/image05-6.jpg&quot; srcset=&quot;https://www.cloudways.com/blog/wp-content/uploads/image05-6.jpg 906w, https://www.cloudways.com/blog/wp-content/uploads/image05-6-300x295.jpg 300w, https://www.cloudways.com/blog/wp-content/uploads/image05-6-768x756.jpg 768w&quot; style=&quot;border-radius: 4px; border: 1px solid rgb(112, 114, 129); box-shadow: rgba(0, 0, 0, 0.1) 0px 4px 10px; box-sizing: border-box; display: block; height: auto; margin: 0px auto; max-width: 100%; vertical-align: middle;&quot; title=&quot;Listing Page Result&quot; width=&quot;906&quot; /&gt;&lt;/p&gt;&lt;h2 id=&quot;add-menu-for-custom-post-type&quot; style=&quot;box-sizing: border-box; font-size: 30px; font-weight: 500; line-height: 38px; margin: 0px 0px 15px;&quot;&gt;How to Add Menu for Custom Post Type&lt;/h2&gt;&lt;p style=&quot;box-sizing: border-box; color: #1f2d3d; line-height: 28px; margin: 0px 0px 25px;&quot;&gt;Add your custom post type as a part of the Menu options on your WordPress website by following the steps below:&lt;/p&gt;&lt;ul style=&quot;box-sizing: border-box; line-height: 26px; margin-bottom: 25px; margin-top: 0px; padding-left: 0px;&quot;&gt;&lt;li style=&quot;box-sizing: border-box; list-style: none; margin-bottom: 15px; padding-left: 20px; position: relative;&quot;&gt;Go to your&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 600;&quot;&gt;WordPress dashboard&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box; list-style: none; margin-bottom: 15px; padding-left: 20px; position: relative;&quot;&gt;Navigate to&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 600;&quot;&gt;Appearance&lt;/span&gt;&amp;nbsp;&amp;gt;&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 600;&quot;&gt;Menus&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box; list-style: none; margin-bottom: 15px; padding-left: 20px; position: relative;&quot;&gt;Add the&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 600;&quot;&gt;News&lt;/span&gt;&amp;nbsp;page to your main menu to display a navigational link to our newly created WordPress custom post type, News&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;box-sizing: border-box; color: #1f2d3d; line-height: 28px; margin: 0px 0px 25px;&quot;&gt;For further reference, check out the image below.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; color: #1f2d3d; line-height: 28px; margin: 0px 0px 25px;&quot;&gt;&lt;img alt=&quot;Add Menu for Custom Post Type&quot; class=&quot;lazy cw_postFancy_img aligncenter wp-image-31274 size-full img-responsive&quot; data-original=&quot;https://www.cloudways.com/blog/wp-content/uploads/image01-129.png&quot; decoding=&quot;async&quot; height=&quot;566&quot; loading=&quot;lazy&quot; sizes=&quot;(max-width: 1145px) 100vw, 1145px&quot; src=&quot;https://www.cloudways.com/blog/wp-content/uploads/image01-129.png&quot; srcset=&quot;https://www.cloudways.com/blog/wp-content/uploads/image01-129.png 1145w, https://www.cloudways.com/blog/wp-content/uploads/image01-129-300x148.png 300w, https://www.cloudways.com/blog/wp-content/uploads/image01-129-768x380.png 768w, https://www.cloudways.com/blog/wp-content/uploads/image01-129-1024x506.png 1024w&quot; style=&quot;border-radius: 4px; border: 1px solid rgb(112, 114, 129); box-shadow: rgba(0, 0, 0, 0.1) 0px 4px 10px; box-sizing: border-box; display: block; height: auto; margin: 0px auto; max-width: 100%; vertical-align: middle;&quot; title=&quot;Add Menu for Custom Post Type&quot; width=&quot;1145&quot; /&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; color: #1f2d3d; line-height: 28px; margin: 0px 0px 25px;&quot;&gt;And this is how your website will look on the front end. Check out the image&amp;nbsp;below:&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; color: #1f2d3d; line-height: 28px; margin: 0px 0px 25px;&quot;&gt;&lt;img alt=&quot;Front end page result&quot; class=&quot;lazy cw_postFancy_img aligncenter wp-image-31275 size-full img-responsive&quot; data-original=&quot;https://www.cloudways.com/blog/wp-content/uploads/image00-21.jpg&quot; decoding=&quot;async&quot; height=&quot;447&quot; loading=&quot;lazy&quot; sizes=&quot;(max-width: 960px) 100vw, 960px&quot; src=&quot;https://www.cloudways.com/blog/wp-content/uploads/image00-21.jpg&quot; srcset=&quot;https://www.cloudways.com/blog/wp-content/uploads/image00-21.jpg 960w, https://www.cloudways.com/blog/wp-content/uploads/image00-21-300x140.jpg 300w, https://www.cloudways.com/blog/wp-content/uploads/image00-21-768x358.jpg 768w&quot; style=&quot;border-radius: 4px; border: 1px solid rgb(112, 114, 129); box-shadow: rgba(0, 0, 0, 0.1) 0px 4px 10px; box-sizing: border-box; display: block; height: auto; margin: 0px auto; max-width: 100%; vertical-align: middle;&quot; title=&quot;Front end page result&quot; width=&quot;960&quot; /&gt;&lt;/p&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box; list-style: none; margin-bottom: 15px; padding-left: 20px; position: relative;&quot;&gt;&lt;h2 id=&quot;create-detail-page-for-custom-post-type&quot; style=&quot;box-sizing: border-box; font-size: 30px; font-weight: 500; line-height: 38px; margin: 0px 0px 15px;&quot;&gt;How to Create a Detail Page for Custom Post Type&lt;/h2&gt;&lt;p style=&quot;box-sizing: border-box; color: #1f2d3d; line-height: 28px; margin: 0px 0px 25px;&quot;&gt;Create a “detail” page for custom post type by following the steps below:&lt;/p&gt;&lt;ul style=&quot;box-sizing: border-box; line-height: 26px; margin-bottom: 25px; margin-top: 0px; padding-left: 0px;&quot;&gt;&lt;li style=&quot;box-sizing: border-box; list-style: none; margin-bottom: 15px; padding-left: 20px; position: relative;&quot;&gt;Add a new file called single-news.php (located in your WordPress theme)&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box; list-style: none; margin-bottom: 15px; padding-left: 20px; position: relative;&quot;&gt;Add the following code to the file:&lt;/li&gt;&lt;/ul&gt;&lt;div class=&quot;EnlighterJSWrapper enlighterEnlighterJSWrapper&quot; style=&quot;box-sizing: border-box; color: #7e8890; font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 10px; line-height: 16px; margin: 0px; overflow-wrap: break-word; overflow: auto; padding: 0px; position: relative; white-space: pre-wrap;&quot;&gt;&lt;ol class=&quot;hoverEnabled enlighterEnlighterJS EnlighterJS&quot; style=&quot;background-color: #f9f9f9; border-radius: 8px; border: 1px solid rgb(224, 224, 224); box-sizing: border-box; color: #939393; font-size: 11px; line-height: 26px; list-style: none; margin: 0px 0px 20px; overflow-wrap: break-word; overflow: auto; padding: 0px;&quot;&gt;&lt;li class=&quot;odd&quot; style=&quot;background-color: white; border-color: rgb(255, 255, 255) rgb(255, 255, 255) rgb(255, 255, 255) rgb(224, 224, 224); border-image: initial; border-style: solid; border-width: 0px 0px 0px 1px; box-sizing: border-box; color: #aaaaaa; font-size: inherit; line-height: 16px; list-style: outside decimal; margin: 0px 0px 0px 40px; padding: 5px 5px 1px 14px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;?php&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;even&quot; style=&quot;background-color: white; border-color: rgb(255, 255, 255) rgb(255, 255, 255) rgb(255, 255, 255) rgb(224, 224, 224); border-image: initial; border-style: solid; border-width: 0px 0px 0px 1px; box-sizing: border-box; color: #aaaaaa; font-size: inherit; line-height: 16px; list-style: outside decimal; margin: 0px 0px 0px 40px; padding: 1px 5px 1px 14px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;kw1&quot; style=&quot;box-sizing: border-box; color: #286491; font-family: inherit; font-size: 12px; font-weight: 700; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;get_header&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;box-sizing: border-box; color: #777777; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;box-sizing: border-box; color: #777777; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;odd&quot; style=&quot;background-color: white; border-color: rgb(255, 255, 255) rgb(255, 255, 255) rgb(255, 255, 255) rgb(224, 224, 224); border-image: initial; border-style: solid; border-width: 0px 0px 0px 1px; box-sizing: border-box; color: #aaaaaa; font-size: inherit; line-height: 16px; list-style: outside decimal; margin: 0px 0px 0px 40px; padding: 1px 5px 1px 14px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;co2&quot; style=&quot;box-sizing: border-box; color: #9999aa; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;/* Start the Loop */&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;even&quot; style=&quot;background-color: white; border-color: rgb(255, 255, 255) rgb(255, 255, 255) rgb(255, 255, 255) rgb(224, 224, 224); border-image: initial; border-style: solid; border-width: 0px 0px 0px 1px; box-sizing: border-box; color: #aaaaaa; font-size: inherit; line-height: 16px; list-style: outside decimal; margin: 0px 0px 0px 40px; padding: 1px 5px 1px 14px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;kw1&quot; style=&quot;box-sizing: border-box; color: #286491; font-family: inherit; font-size: 12px; font-weight: 700; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;while&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;box-sizing: border-box; color: #777777; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw1&quot; style=&quot;box-sizing: border-box; color: #286491; font-family: inherit; font-size: 12px; font-weight: 700; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;have_posts&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;box-sizing: border-box; color: #777777; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;box-sizing: border-box; color: #777777; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;box-sizing: border-box; color: #777777; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt; : &lt;/span&gt;&lt;span class=&quot;kw1&quot; style=&quot;box-sizing: border-box; color: #286491; font-family: inherit; font-size: 12px; font-weight: 700; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;the_post&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;box-sizing: border-box; color: #777777; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;box-sizing: border-box; color: #777777; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;odd&quot; style=&quot;background-color: white; border-color: rgb(255, 255, 255) rgb(255, 255, 255) rgb(255, 255, 255) rgb(224, 224, 224); border-image: initial; border-style: solid; border-width: 0px 0px 0px 1px; box-sizing: border-box; color: #aaaaaa; font-size: inherit; line-height: 16px; list-style: outside decimal; margin: 0px 0px 0px 40px; padding: 1px 5px 1px 14px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;   &lt;/span&gt;&lt;span class=&quot;kw1&quot; style=&quot;box-sizing: border-box; color: #286491; font-family: inherit; font-size: 12px; font-weight: 700; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;get_template_part&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;box-sizing: border-box; color: #777777; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot; style=&quot;box-sizing: border-box; color: #dd1144; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&#39;template-parts/post/content&#39;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;, &lt;/span&gt;&lt;span class=&quot;kw1&quot; style=&quot;box-sizing: border-box; color: #286491; font-family: inherit; font-size: 12px; font-weight: 700; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;get_post_format&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;box-sizing: border-box; color: #777777; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;box-sizing: border-box; color: #777777; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;box-sizing: border-box; color: #777777; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;even&quot; style=&quot;background-color: white; border-color: rgb(255, 255, 255) rgb(255, 255, 255) rgb(255, 255, 255) rgb(224, 224, 224); border-image: initial; border-style: solid; border-width: 0px 0px 0px 1px; box-sizing: border-box; color: #aaaaaa; font-size: inherit; line-height: 16px; list-style: outside decimal; margin: 0px 0px 0px 40px; padding: 1px 5px 1px 14px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;endwhile;&lt;/span&gt;&lt;span class=&quot;co1&quot; style=&quot;box-sizing: border-box; color: #9999aa; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt; // End of the loop.&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;odd&quot; style=&quot;background-color: white; border-color: rgb(255, 255, 255) rgb(255, 255, 255) rgb(255, 255, 255) rgb(224, 224, 224); border-image: initial; border-style: solid; border-width: 0px 0px 0px 1px; box-sizing: border-box; color: #aaaaaa; font-size: inherit; line-height: 16px; list-style: outside decimal; margin: 0px 0px 0px 40px; padding: 1px 5px 1px 14px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;kw1&quot; style=&quot;box-sizing: border-box; color: #286491; font-family: inherit; font-size: 12px; font-weight: 700; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;get_footer&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;box-sizing: border-box; color: #777777; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;box-sizing: border-box; color: #777777; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;even&quot; style=&quot;background-color: white; border-color: rgb(255, 255, 255) rgb(255, 255, 255) rgb(255, 255, 255) rgb(224, 224, 224); border-image: initial; border-style: solid; border-width: 0px 0px 0px 1px; box-sizing: border-box; color: #aaaaaa; font-size: inherit; line-height: 16px; list-style: outside decimal; margin: 0px 0px 0px 40px; padding: 1px 5px 5px 14px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: black; font-family: inherit; font-size: 12px; line-height: inherit; margin: 0px; padding: 0px;&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;p style=&quot;box-sizing: border-box; color: #1f2d3d; line-height: 28px; margin: 0px 0px 25px;&quot;&gt;Now it’s time to see what your detail page&amp;nbsp;looks&amp;nbsp;like:&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; color: #1f2d3d; line-height: 28px; margin: 0px 0px 25px;&quot;&gt;&lt;img alt=&quot;Detail Page for Custom Post Type&quot; class=&quot;lazy cw_postFancy_img aligncenter wp-image-31276 size-full img-responsive&quot; data-original=&quot;https://www.cloudways.com/blog/wp-content/uploads/image04-8.jpg&quot; decoding=&quot;async&quot; height=&quot;398&quot; loading=&quot;lazy&quot; sizes=&quot;(max-width: 556px) 100vw, 556px&quot; src=&quot;https://www.cloudways.com/blog/wp-content/uploads/image04-8.jpg&quot; srcset=&quot;https://www.cloudways.com/blog/wp-content/uploads/image04-8.jpg 556w, https://www.cloudways.com/blog/wp-content/uploads/image04-8-300x215.jpg 300w&quot; style=&quot;border-radius: 4px; border: 1px solid rgb(112, 114, 129); box-shadow: rgba(0, 0, 0, 0.1) 0px 4px 10px; box-sizing: border-box; display: block; height: auto; margin: 0px auto; max-width: 100%; vertical-align: middle;&quot; title=&quot;Detail Page for Custom Post Type&quot; width=&quot;556&quot; /&gt;&lt;/p&gt;&lt;h2 style=&quot;box-sizing: border-box; font-size: 30px; font-weight: 500; line-height: 38px; margin: 0px 0px 15px;&quot;&gt;Wrapping Up!&lt;/h2&gt;&lt;p style=&quot;box-sizing: border-box; color: #1f2d3d; line-height: 28px; margin: 0px 0px 25px;&quot;&gt;You have now learned how to create a Custom Post Type in WordPress, which is quite complex but can be easily done by following the steps mentioned in this blog. Check out our other blog posts for more helpful guides on managing your WordPress site, such as reducing WordPress load times.&amp;nbsp;Shall you have any queries or suggestions regarding the blog, feel free to comment below.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlinfodata.blogspot.com/feeds/5848846696016605991/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sqlinfodata.blogspot.com/2023/04/how-to-create-custom-post-types-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2706799863772725741/posts/default/5848846696016605991'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2706799863772725741/posts/default/5848846696016605991'/><link rel='alternate' type='text/html' href='http://sqlinfodata.blogspot.com/2023/04/how-to-create-custom-post-types-in.html' title='How to Create Custom Post Types in WordPress'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2706799863772725741.post-7570064190071140013</id><published>2023-04-09T01:06:00.000-07:00</published><updated>2023-04-09T01:06:03.780-07:00</updated><title type='text'>Nidahas Trophy 2018 Final Match, Final Over - India vs Bangladesh</title><content type='html'>&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;iframe allowfullscreen=&quot;&quot; class=&quot;BLOG_video_class&quot; height=&quot;266&quot; src=&quot;https://www.youtube.com/embed/QD2hxpQd_b0&quot; width=&quot;501&quot; youtube-src-id=&quot;QD2hxpQd_b0&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;br /&gt;&amp;nbsp;&lt;p&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlinfodata.blogspot.com/feeds/7570064190071140013/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sqlinfodata.blogspot.com/2023/04/nidahas-trophy-2018-final-match-final.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2706799863772725741/posts/default/7570064190071140013'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2706799863772725741/posts/default/7570064190071140013'/><link rel='alternate' type='text/html' href='http://sqlinfodata.blogspot.com/2023/04/nidahas-trophy-2018-final-match-final.html' title='Nidahas Trophy 2018 Final Match, Final Over - India vs Bangladesh'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/QD2hxpQd_b0/default.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2706799863772725741.post-8948983944793455531</id><published>2023-04-09T01:04:00.003-07:00</published><updated>2023-04-09T01:04:45.004-07:00</updated><title type='text'>Dinesh Karthik hits 22 runs off Rubel Hossain - 19th over of Nidahas Trophy Final</title><content type='html'>&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;iframe allowfullscreen=&quot;&quot; class=&quot;BLOG_video_class&quot; height=&quot;266&quot; src=&quot;https://www.youtube.com/embed/pPwVCIvO7tg&quot; width=&quot;491&quot; youtube-src-id=&quot;pPwVCIvO7tg&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;br /&gt;&amp;nbsp;&lt;p&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlinfodata.blogspot.com/feeds/8948983944793455531/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sqlinfodata.blogspot.com/2023/04/dinesh-karthik-hits-22-runs-off-rubel.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2706799863772725741/posts/default/8948983944793455531'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2706799863772725741/posts/default/8948983944793455531'/><link rel='alternate' type='text/html' href='http://sqlinfodata.blogspot.com/2023/04/dinesh-karthik-hits-22-runs-off-rubel.html' title='Dinesh Karthik hits 22 runs off Rubel Hossain - 19th over of Nidahas Trophy Final'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/pPwVCIvO7tg/default.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2706799863772725741.post-8562011404201244410</id><published>2023-04-09T01:02:00.002-07:00</published><updated>2023-04-09T01:02:24.147-07:00</updated><title type='text'>Virat kohli 100* off 52 balls aus vs Ind 2nd odi 2013</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;iframe allowfullscreen=&quot;&quot; class=&quot;BLOG_video_class&quot; height=&quot;266&quot; src=&quot;https://www.youtube.com/embed/9MxapzT3Cp4&quot; width=&quot;462&quot; youtube-src-id=&quot;9MxapzT3Cp4&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlinfodata.blogspot.com/feeds/8562011404201244410/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sqlinfodata.blogspot.com/2023/04/virat-kohli-100-off-52-balls-aus-vs-ind.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2706799863772725741/posts/default/8562011404201244410'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2706799863772725741/posts/default/8562011404201244410'/><link rel='alternate' type='text/html' href='http://sqlinfodata.blogspot.com/2023/04/virat-kohli-100-off-52-balls-aus-vs-ind.html' title='Virat kohli 100* off 52 balls aus vs Ind 2nd odi 2013'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/9MxapzT3Cp4/default.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2706799863772725741.post-7064963010540372456</id><published>2022-10-23T20:58:00.005-07:00</published><updated>2022-10-23T21:20:38.169-07:00</updated><title type='text'>Behind the scenes of India&#39;s win over Pakistan ICC T20 World Cup 2022</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;iframe allowfullscreen=&quot;&quot; class=&quot;BLOG_video_class&quot; height=&quot;313&quot; src=&quot;https://www.youtube.com/embed/oqIocGEFkqg&quot; width=&quot;569&quot; youtube-src-id=&quot;oqIocGEFkqg&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlinfodata.blogspot.com/feeds/7064963010540372456/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sqlinfodata.blogspot.com/2022/10/india-won-match-against-pakistan-t-20.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2706799863772725741/posts/default/7064963010540372456'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2706799863772725741/posts/default/7064963010540372456'/><link rel='alternate' type='text/html' href='http://sqlinfodata.blogspot.com/2022/10/india-won-match-against-pakistan-t-20.html' title='Behind the scenes of India&#39;s win over Pakistan ICC T20 World Cup 2022'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/oqIocGEFkqg/default.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2706799863772725741.post-7984549226476592474</id><published>2021-12-20T07:53:00.003-08:00</published><updated>2023-04-14T21:10:23.610-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><category scheme="http://www.blogger.com/atom/ns#" term="PHP Functions"/><category scheme="http://www.blogger.com/atom/ns#" term="PHP History"/><category scheme="http://www.blogger.com/atom/ns#" term="PHP Interview questions"/><category scheme="http://www.blogger.com/atom/ns#" term="php variables"/><title type='text'>Difference between Abstract class and Interfaces.</title><content type='html'>&lt;p&gt;&lt;span style=&quot;background-color: white; color: #610b38; font-family: erdana, helvetica, arial, sans-serif; font-size: 25px; text-align: justify;&quot;&gt;Abstract class:&lt;/span&gt;&lt;/p&gt;&lt;ul class=&quot;points&quot; style=&quot;background-color: white; color: #333333; font-family: inter-regular, system-ui, -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 24px; list-style: circle; text-align: justify;&quot;&gt;&lt;li style=&quot;color: black; line-height: 25px; margin-top: 4px; padding: 0.2em;&quot;&gt;Abstract class comes under partial abstraction.&lt;/li&gt;&lt;li style=&quot;color: black; line-height: 25px; margin-top: 4px; padding: 0.2em;&quot;&gt;Abstract classes can maintain abstract methods and non abstract methods.&lt;/li&gt;&lt;li style=&quot;color: black; line-height: 25px; margin-top: 4px; padding: 0.2em;&quot;&gt;In abstract classes, we can create the variables.&lt;/li&gt;&lt;li style=&quot;color: black; line-height: 25px; margin-top: 4px; padding: 0.2em;&quot;&gt;In abstract classes, we can use any access specifier.&lt;/li&gt;&lt;li style=&quot;color: black; line-height: 25px; margin-top: 4px; padding: 0.2em;&quot;&gt;By using &#39;extends&#39; keyword we can access the abstract class features from derived class.&lt;/li&gt;&lt;li style=&quot;color: black; line-height: 25px; margin-top: 4px; padding: 0.2em;&quot;&gt;Multiple inheritance is not possible.&lt;/li&gt;&lt;/ul&gt;&lt;hr style=&quot;background-color: #d4d4d4; border: 0px; clear: both; color: #d4d4d4; font-family: inter-regular, system-ui, -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; height: 1px; text-align: justify;&quot; /&gt;&lt;h2 class=&quot;h2&quot; style=&quot;background-color: white; color: #610b38; font-family: erdana, helvetica, arial, sans-serif; font-size: 25px; font-weight: 400; line-height: 1.3em; text-align: justify;&quot;&gt;Interface:&lt;/h2&gt;&lt;ul class=&quot;points&quot; style=&quot;background-color: white; color: #333333; font-family: inter-regular, system-ui, -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 24px; list-style: circle; text-align: justify;&quot;&gt;&lt;li style=&quot;color: black; line-height: 25px; margin-top: 4px; padding: 0.2em;&quot;&gt;Interface comes under fully abstraction.&lt;/li&gt;&lt;li style=&quot;color: black; line-height: 25px; margin-top: 4px; padding: 0.2em;&quot;&gt;Interfaces can maintain only abstract methods.&lt;/li&gt;&lt;li style=&quot;color: black; line-height: 25px; margin-top: 4px; padding: 0.2em;&quot;&gt;In interfaces, we can&#39;t create the variables.&lt;/li&gt;&lt;li style=&quot;color: black; line-height: 25px; margin-top: 4px; padding: 0.2em;&quot;&gt;In interface, we can use only public access specifier.&lt;/li&gt;&lt;li style=&quot;color: black; line-height: 25px; margin-top: 4px; padding: 0.2em;&quot;&gt;By using &#39;implement&#39; keyword we can get interface from derived class.&lt;/li&gt;&lt;li style=&quot;color: black; line-height: 25px; margin-top: 4px; padding: 0.2em;&quot;&gt;By using interfaces multiple inheritance is possible.&lt;/li&gt;&lt;/ul&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlinfodata.blogspot.com/feeds/7984549226476592474/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sqlinfodata.blogspot.com/2021/12/difference-between-abstract-class-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2706799863772725741/posts/default/7984549226476592474'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2706799863772725741/posts/default/7984549226476592474'/><link rel='alternate' type='text/html' href='http://sqlinfodata.blogspot.com/2021/12/difference-between-abstract-class-and.html' title='Difference between Abstract class and Interfaces.'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2706799863772725741.post-4867096026028237167</id><published>2021-12-20T07:49:00.002-08:00</published><updated>2021-12-20T07:49:49.000-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="MySQL"/><category scheme="http://www.blogger.com/atom/ns#" term="MySQL Indexes"/><category scheme="http://www.blogger.com/atom/ns#" term="MySQL Primary Key Optimization"/><category scheme="http://www.blogger.com/atom/ns#" term="PDO"/><title type='text'>What is the difference between MySQL, MySQLi and PDO?</title><content type='html'>&lt;p&gt;&lt;span face=&quot;urw-din, sans-serif&quot; style=&quot;background-color: white; color: #273239; font-size: 17px; letter-spacing: 0.162px;&quot;&gt;To understand the difference between MySQL, MySQLi, and PDO, we must know about each one of them individually.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; border: 0px; box-sizing: border-box; color: #273239; font-family: urw-din, sans-serif; font-size: 17px; letter-spacing: 0.162px; margin: 0px 0px 10px; padding: 0px; vertical-align: baseline;&quot;&gt;These are nothing but the APIs of PHP that is used to access the MySQL databases and tables. The developers can choose either one of them for their project, however, it must be known that MySQLi cannot be used with PHP 7 and its newer versions. However, developers can use MySQLi with PHP 5, which is now deprecated.&lt;/p&gt;&lt;p style=&quot;background-color: white; border: 0px; box-sizing: border-box; color: #273239; font-family: urw-din, sans-serif; font-size: 17px; letter-spacing: 0.162px; margin: 0px 0px 10px; padding: 0px; vertical-align: baseline;&quot;&gt;Let’s have some more information about each of them:&lt;/p&gt;&lt;ul style=&quot;background-color: white; border: 0px; box-sizing: border-box; color: #273239; display: flex; flex-direction: column; font-family: urw-din, sans-serif; font-size: 17px; letter-spacing: 0.162px; list-style-image: initial; list-style-position: outside; margin: 0px 0px 24px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;li style=&quot;border: 0px; box-sizing: border-box; color: var(--color-black); line-height: 1.58; margin: 0px 0px 0px 24px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border: 0px; box-sizing: border-box; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;MySQL:&lt;/strong&gt;&amp;nbsp;This was the main extension that was designed to help PHP applications send and receive data from MySQL database. However, use of MySQL has been deprecated and removed as of PHP 7 and its newer versions. This is why it is not recommended for new projects, and that’s the reason why MySQLi and PDO extensions are used more nowadays.&lt;/li&gt;&lt;li style=&quot;border: 0px; box-sizing: border-box; color: var(--color-black); line-height: 1.58; margin: 0px 0px 0px 24px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border: 0px; box-sizing: border-box; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;MySQLi:&lt;/strong&gt;&amp;nbsp;The ‘i’ in MySQLi stands for Improved. Therefore, this is also known as the improved version of MySQL. It has many new features that will be covered later in the article.&lt;/li&gt;&lt;li style=&quot;border: 0px; box-sizing: border-box; color: var(--color-black); line-height: 1.58; margin: 0px 0px 0px 24px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border: 0px; box-sizing: border-box; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;PDO – PHP Data Objects:&lt;/strong&gt;&amp;nbsp;The main advantage of using PDO is that it supports, and provides a uniform method of access to 11 different databases.&lt;br /&gt;&lt;span&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;background-color: white; border: 0px; box-sizing: border-box; color: #273239; font-family: urw-din, sans-serif; font-size: 17px; letter-spacing: 0.162px; margin: 0px 0px 10px; padding: 0px; vertical-align: baseline;&quot;&gt;PDO supported databases are:&lt;/p&gt;&lt;div style=&quot;background-color: white; border: 0px; box-sizing: border-box; color: #273239; font-family: urw-din, sans-serif; font-size: 17px; letter-spacing: 0.162px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;div style=&quot;border: 0px; box-sizing: border-box; float: left; margin: 0px; padding: 0px; vertical-align: baseline; width: 293.417px;&quot;&gt;&lt;ul style=&quot;border: 0px; box-sizing: border-box; display: flex; flex-direction: column; list-style-image: initial; list-style-position: outside; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;li style=&quot;border: 0px; box-sizing: border-box; color: var(--color-black); line-height: 1.58; margin: 0px 0px 0px 24px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;CUBRID&lt;/li&gt;&lt;li style=&quot;border: 0px; box-sizing: border-box; color: var(--color-black); line-height: 1.58; margin: 0px 0px 0px 24px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;MS SQL Server&lt;/li&gt;&lt;li style=&quot;border: 0px; box-sizing: border-box; color: var(--color-black); line-height: 1.58; margin: 0px 0px 0px 24px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;Firebird/Interbase&lt;/li&gt;&lt;li style=&quot;border: 0px; box-sizing: border-box; color: var(--color-black); line-height: 1.58; margin: 0px 0px 0px 24px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;IBM&lt;/li&gt;&lt;li style=&quot;border: 0px; box-sizing: border-box; color: var(--color-black); line-height: 1.58; margin: 0px 0px 0px 24px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;Informix&lt;/li&gt;&lt;li style=&quot;border: 0px; box-sizing: border-box; color: var(--color-black); line-height: 1.58; margin: 0px 0px 0px 24px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;MySQL&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; box-sizing: border-box; float: left; margin: 0px; padding: 0px; vertical-align: baseline; width: 293.417px;&quot;&gt;&lt;ul style=&quot;border: 0px; box-sizing: border-box; display: flex; flex-direction: column; list-style-image: initial; list-style-position: outside; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;li style=&quot;border: 0px; box-sizing: border-box; color: var(--color-black); line-height: 1.58; margin: 0px 0px 0px 24px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;Oracle&lt;/li&gt;&lt;li style=&quot;border: 0px; box-sizing: border-box; color: var(--color-black); line-height: 1.58; margin: 0px 0px 0px 24px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;ODBC and DB2&lt;/li&gt;&lt;li style=&quot;border: 0px; box-sizing: border-box; color: var(--color-black); line-height: 1.58; margin: 0px 0px 0px 24px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;PostgreSQL&lt;/li&gt;&lt;li style=&quot;border: 0px; box-sizing: border-box; color: var(--color-black); line-height: 1.58; margin: 0px 0px 0px 24px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;SQLite&lt;/li&gt;&lt;li style=&quot;border: 0px; box-sizing: border-box; color: var(--color-black); line-height: 1.58; margin: 0px 0px 0px 24px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;4D&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;p style=&quot;background-color: white; border: 0px; box-sizing: border-box; color: #273239; font-family: urw-din, sans-serif; font-size: 17px; letter-spacing: 0.162px; margin: 0px 0px 10px; padding: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; border: 0px; box-sizing: border-box; color: #273239; font-family: urw-din, sans-serif; font-size: 17px; letter-spacing: 0.162px; margin: 0px 0px 10px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; border: 0px; box-sizing: border-box; color: #273239; font-family: urw-din, sans-serif; font-size: 17px; letter-spacing: 0.162px; margin: 0px 0px 10px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; border: 0px; box-sizing: border-box; color: #273239; font-family: urw-din, sans-serif; font-size: 17px; letter-spacing: 0.162px; margin: 0px 0px 10px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; border: 0px; box-sizing: border-box; color: #273239; font-family: urw-din, sans-serif; font-size: 17px; letter-spacing: 0.162px; margin: 0px 0px 10px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; border: 0px; box-sizing: border-box; color: #273239; font-family: urw-din, sans-serif; font-size: 17px; letter-spacing: 0.162px; margin: 0px 0px 10px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; border: 0px; box-sizing: border-box; color: #273239; font-family: urw-din, sans-serif; font-size: 17px; letter-spacing: 0.162px; margin: 0px 0px 10px; padding: 0px; vertical-align: baseline;&quot;&gt;However, PDO does not allow the usage of all the features available in the present version of the MySQL server. For example, PDO doesn’t allow the support of MySQL’s multiple statements.&lt;/p&gt;&lt;p style=&quot;background-color: white; border: 0px; box-sizing: border-box; color: #273239; font-family: urw-din, sans-serif; font-size: 17px; letter-spacing: 0.162px; margin: 0px 0px 10px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border: 0px; box-sizing: border-box; letter-spacing: 0.162px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Comparing MySQL, MySQLi, and PDO:&lt;/strong&gt;&lt;/p&gt;&lt;ul style=&quot;background-color: white; border: 0px; box-sizing: border-box; color: #273239; display: flex; flex-direction: column; font-family: urw-din, sans-serif; font-size: 17px; letter-spacing: 0.162px; list-style-image: initial; list-style-position: outside; margin: 0px 0px 24px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;li style=&quot;border: 0px; box-sizing: border-box; color: var(--color-black); line-height: 1.58; margin: 0px 0px 0px 24px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;Connection to the Database&lt;/li&gt;&lt;li style=&quot;border: 0px; box-sizing: border-box; color: var(--color-black); line-height: 1.58; margin: 0px 0px 0px 24px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;Error Handling&lt;/li&gt;&lt;li style=&quot;border: 0px; box-sizing: border-box; color: var(--color-black); line-height: 1.58; margin: 0px 0px 0px 24px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;Data Fetching&lt;/li&gt;&lt;li style=&quot;border: 0px; box-sizing: border-box; color: var(--color-black); line-height: 1.58; margin: 0px 0px 0px 24px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;API Support&lt;/li&gt;&lt;li style=&quot;border: 0px; box-sizing: border-box; color: var(--color-black); line-height: 1.58; margin: 0px 0px 0px 24px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;Security&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;background-color: white; border: 0px; box-sizing: border-box; color: #273239; font-family: urw-din, sans-serif; font-size: 17px; letter-spacing: 0.162px; margin: 0px 0px 10px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border: 0px; box-sizing: border-box; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Connection to the database:&lt;/strong&gt;&lt;/p&gt;&lt;ul style=&quot;background-color: white; border: 0px; box-sizing: border-box; color: #273239; display: flex; flex-direction: column; font-family: urw-din, sans-serif; font-size: 17px; letter-spacing: 0.162px; list-style-image: initial; list-style-position: outside; margin: 0px 0px 24px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;li style=&quot;border: 0px; box-sizing: border-box; color: var(--color-black); line-height: 1.58; margin: 0px 0px 0px 24px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border: 0px; box-sizing: border-box; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;MySQL:&lt;/strong&gt;&amp;nbsp;The MySQL code to connect to the database is:&lt;div class=&quot;noIdeBtnDiv&quot; style=&quot;border: 0px; box-sizing: border-box; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;div class=&quot;code-block&quot; style=&quot;border: 0px; box-sizing: border-box; display: flex; flex-direction: row; margin: 0px 0px 10px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;div class=&quot;code-gutter&quot; style=&quot;border: 0px; box-sizing: border-box; flex-flow: column; margin: 0px; padding: 0px; vertical-align: baseline; width: 40px;&quot;&gt;&lt;div class=&quot;editor-buttons-container&quot; style=&quot;border: 0px; bottom: 0px; box-sizing: border-box; left: 0px; margin: 0px; padding: 0px; position: sticky; top: 120px; vertical-align: baseline; width: 40px;&quot;&gt;&lt;div class=&quot;editor-buttons&quot; style=&quot;align-items: center; border: 0px; box-sizing: border-box; display: flex; flex-flow: column; margin: 0px; padding: 6px 0px 0px; position: sticky; top: 0px; vertical-align: baseline; width: 40px; z-index: 1;&quot;&gt;&lt;div class=&quot;editor-buttons-div&quot; style=&quot;border: 0px; box-sizing: border-box; margin: 0px; padding: 0px; vertical-align: baseline;&quot; title=&quot;Run and Edit&quot;&gt;&lt;i class=&quot;gfg-icon gfg-icon_copy code-sidebar-button padding-2px copy-code-button&quot; id=&quot;copy-code-button&quot; style=&quot;background: var(--gfg-body-color); border-radius: 50%; border: 0px; box-shadow: 0 0 2px 1px var(--gfg-head-shadow); box-sizing: border-box; color: var(--color-black); cursor: pointer; display: inline-block; height: 34px; line-height: 23px; margin: 5px 0px 0px; padding: 0.15em; vertical-align: baseline; width: 34px;&quot; title=&quot;Copy Code&quot;&gt;&lt;/i&gt;&lt;p style=&quot;border: 0px; box-sizing: border-box; color: var(--color-black); line-height: inherit; margin: 0px 0px 10px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;/p&gt;&lt;p style=&quot;border: 0px; box-sizing: border-box; color: var(--color-black); line-height: inherit; margin: 0px 0px 10px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;/p&gt;&lt;p style=&quot;border: 0px; box-sizing: border-box; color: var(--color-black); line-height: inherit; margin: 0px 0px 10px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;i class=&quot;gfg-icon gfg-icon_dark-toggle padding-2px code-sidebar-button dark-editor-button&quot; style=&quot;background: var(--gfg-body-color); border-radius: 50%; border: 0px; box-shadow: 0 0 2px 1px var(--gfg-head-shadow); box-sizing: border-box; color: var(--color-black); cursor: pointer; display: inline-block; height: 34px; line-height: 23px; margin: 5px 0px 0px; padding: 0.15em; vertical-align: baseline; width: 34px;&quot; title=&quot;Dark Mode&quot;&gt;&lt;/i&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;code-container&quot; style=&quot;border: 0px; box-sizing: border-box; flex: 1 1 0%; margin: 0px; min-width: 0px; overflow-y: hidden; padding: 0px; vertical-align: baseline; width: 522.833px;&quot;&gt;&lt;div class=&quot;syntaxhighlighter nogutter&quot; id=&quot;highlighter_210681&quot; style=&quot;border: 0px; box-sizing: border-box; font-size: 1em; margin: 1em 0px; overflow: auto; padding: 0px; position: relative; vertical-align: baseline; width: 522.833px;&quot;&gt;&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; style=&quot;background: 0px 0px; border-collapse: collapse; border-radius: 0px; border-spacing: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: block; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.99em; height: auto; inset: auto; line-height: 1.2em; margin: 25px auto; min-height: auto; outline: 0px; overflow-x: scroll; overflow-y: hidden !important; overflow: scroll hidden; padding: 0px; position: static; table-layout: auto; vertical-align: baseline; width: 522.833px;&quot;&gt;&lt;tbody style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: 0.99em; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&lt;tr style=&quot;background-attachment: initial; background-clip: initial; background-color: var(--gfg-body-color); background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: 0.99em; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&lt;td class=&quot;code&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: 12.5pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 14px 10px; position: static; vertical-align: baseline; width: 561.458px;&quot;&gt;&lt;div class=&quot;container&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 5px; position: relative; vertical-align: baseline; width: auto;&quot;&gt;&lt;div class=&quot;line number1 index0 alt2&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;lt;?php&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number2 index1 alt1&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;undefined spaces&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;nbsp;&lt;/code&gt;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;line number3 index2 alt2&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;comments&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #008200; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;// Add the hostname, username and password of the database&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number4 index3 alt1&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;variable&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #aa7700; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;$connection_link&lt;/code&gt; &lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;= mysql_connect(&lt;/code&gt;&lt;code class=&quot;string&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: blue; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&quot;host&quot;&lt;/code&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;, &lt;/code&gt;&lt;code class=&quot;string&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: blue; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&quot;username&quot;&lt;/code&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;, &lt;/code&gt;&lt;code class=&quot;string&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: blue; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&quot;password&quot;&lt;/code&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;);&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number5 index4 alt2&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;undefined spaces&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;nbsp;&lt;/code&gt;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;line number6 index5 alt1&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;comments&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #008200; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;// Select query for the database&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number7 index6 alt2&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;mysql_select_db(&lt;/code&gt;&lt;code class=&quot;string&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: blue; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&quot;database_name&quot;&lt;/code&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;, &lt;/code&gt;&lt;code class=&quot;variable&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #aa7700; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;$connection_link&lt;/code&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;);&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number8 index7 alt1&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;undefined spaces&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;nbsp;&lt;/code&gt;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;line number9 index8 alt2&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;comments&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #008200; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;// Set the charset, UTF-8 to be used for projects&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number10 index9 alt1&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;mysql_set_charset(&lt;/code&gt;&lt;code class=&quot;string&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: blue; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&#39;UTF-8&#39;&lt;/code&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;, &lt;/code&gt;&lt;code class=&quot;variable&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #aa7700; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;$connection_link&lt;/code&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;);&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number11 index10 alt2&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;undefined spaces&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;nbsp;&lt;/code&gt;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;line number12 index11 alt1&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;?&amp;gt;&lt;/code&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;border: 0px; box-sizing: border-box; color: var(--color-black); line-height: 1.58; margin: 0px 0px 0px 24px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border: 0px; box-sizing: border-box; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;MySQLi:&lt;/strong&gt;&amp;nbsp;In case of MySQLi, there is just a one-line code. The user instantiates a MySQLi instance using the username, password, and name of the database.&lt;div class=&quot;noIdeBtnDiv&quot; style=&quot;border: 0px; box-sizing: border-box; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;div class=&quot;code-block&quot; style=&quot;border: 0px; box-sizing: border-box; display: flex; flex-direction: row; margin: 0px 0px 10px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;div class=&quot;code-gutter&quot; style=&quot;border: 0px; box-sizing: border-box; flex-flow: column; margin: 0px; padding: 0px; vertical-align: baseline; width: 40px;&quot;&gt;&lt;div class=&quot;editor-buttons-container&quot; style=&quot;border: 0px; bottom: 0px; box-sizing: border-box; left: 0px; margin: 0px; padding: 0px; position: sticky; top: 120px; vertical-align: baseline; width: 40px;&quot;&gt;&lt;div class=&quot;editor-buttons&quot; style=&quot;align-items: center; border: 0px; box-sizing: border-box; display: flex; flex-flow: column; margin: 0px; padding: 6px 0px 0px; position: sticky; top: 0px; vertical-align: baseline; width: 40px; z-index: 1;&quot;&gt;&lt;div class=&quot;editor-buttons-div&quot; style=&quot;border: 0px; box-sizing: border-box; margin: 0px; padding: 0px; vertical-align: baseline;&quot; title=&quot;Run and Edit&quot;&gt;&lt;i class=&quot;gfg-icon gfg-icon_copy code-sidebar-button padding-2px copy-code-button&quot; id=&quot;copy-code-button&quot; style=&quot;background: var(--gfg-body-color); border-radius: 50%; border: 0px; box-shadow: 0 0 2px 1px var(--gfg-head-shadow); box-sizing: border-box; color: var(--color-black); cursor: pointer; display: inline-block; height: 34px; line-height: 23px; margin: 5px 0px 0px; padding: 0.15em; vertical-align: baseline; width: 34px;&quot; title=&quot;Copy Code&quot;&gt;&lt;/i&gt;&lt;p style=&quot;border: 0px; box-sizing: border-box; color: var(--color-black); line-height: inherit; margin: 0px 0px 10px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;/p&gt;&lt;p style=&quot;border: 0px; box-sizing: border-box; color: var(--color-black); line-height: inherit; margin: 0px 0px 10px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;/p&gt;&lt;p style=&quot;border: 0px; box-sizing: border-box; color: var(--color-black); line-height: inherit; margin: 0px 0px 10px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;i class=&quot;gfg-icon gfg-icon_dark-toggle padding-2px code-sidebar-button dark-editor-button&quot; style=&quot;background: var(--gfg-body-color); border-radius: 50%; border: 0px; box-shadow: 0 0 2px 1px var(--gfg-head-shadow); box-sizing: border-box; color: var(--color-black); cursor: pointer; display: inline-block; height: 34px; line-height: 23px; margin: 5px 0px 0px; padding: 0.15em; vertical-align: baseline; width: 34px;&quot; title=&quot;Dark Mode&quot;&gt;&lt;/i&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;code-container&quot; style=&quot;border: 0px; box-sizing: border-box; flex: 1 1 0%; margin: 0px; min-width: 0px; overflow-y: hidden; padding: 0px; vertical-align: baseline; width: 522.833px;&quot;&gt;&lt;div class=&quot;syntaxhighlighter nogutter&quot; id=&quot;highlighter_213981&quot; style=&quot;border: 0px; box-sizing: border-box; font-size: 1em; margin: 1em 0px; overflow: auto; padding: 0px; position: relative; vertical-align: baseline; width: 522.833px;&quot;&gt;&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; style=&quot;background: 0px 0px; border-collapse: collapse; border-radius: 0px; border-spacing: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: block; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.99em; height: auto; inset: auto; line-height: 1.2em; margin: 25px auto; min-height: auto; outline: 0px; overflow-x: scroll; overflow-y: hidden !important; overflow: scroll hidden; padding: 0px; position: static; table-layout: auto; vertical-align: baseline; width: 522.833px;&quot;&gt;&lt;tbody style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: 0.99em; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&lt;tr style=&quot;background-attachment: initial; background-clip: initial; background-color: var(--gfg-body-color); background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: 0.99em; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&lt;td class=&quot;code&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: 12.5pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 14px 10px; position: static; vertical-align: baseline; width: 628.042px;&quot;&gt;&lt;div class=&quot;container&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 5px; position: relative; vertical-align: baseline; width: auto;&quot;&gt;&lt;div class=&quot;line number1 index0 alt2&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;lt;?php&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number2 index1 alt1&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;undefined spaces&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;nbsp;&lt;/code&gt;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;line number3 index2 alt2&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;comments&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #008200; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;// Database credentials&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number4 index3 alt1&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;variable&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #aa7700; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;$mysqli_db&lt;/code&gt; &lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;= &lt;/code&gt;&lt;code class=&quot;keyword&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #006699; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; font-weight: 700; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;new&lt;/code&gt; &lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;mysqli(&lt;/code&gt;&lt;code class=&quot;string&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: blue; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&#39;host&#39;&lt;/code&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;, &lt;/code&gt;&lt;code class=&quot;string&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: blue; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&#39;username&#39;&lt;/code&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;, &lt;/code&gt;&lt;code class=&quot;string&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: blue; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&#39;password&#39;&lt;/code&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;, &lt;/code&gt;&lt;code class=&quot;string&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: blue; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&#39;database_name&#39;&lt;/code&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;);&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number5 index4 alt2&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;undefined spaces&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;nbsp;&lt;/code&gt;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;line number6 index5 alt1&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;?&amp;gt;&lt;/code&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;border: 0px; box-sizing: border-box; color: var(--color-black); line-height: 1.58; margin: 0px 0px 0px 24px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border: 0px; box-sizing: border-box; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;PDO:&lt;/strong&gt;&amp;nbsp;In case of PDO, a new PDO object must be created.&lt;div class=&quot;noIdeBtnDiv&quot; style=&quot;border: 0px; box-sizing: border-box; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;div class=&quot;code-block&quot; style=&quot;border: 0px; box-sizing: border-box; display: flex; flex-direction: row; margin: 0px 0px 10px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;div class=&quot;code-gutter&quot; style=&quot;border: 0px; box-sizing: border-box; flex-flow: column; margin: 0px; padding: 0px; vertical-align: baseline; width: 40px;&quot;&gt;&lt;div class=&quot;editor-buttons-container&quot; style=&quot;border: 0px; bottom: 0px; box-sizing: border-box; left: 0px; margin: 0px; padding: 0px; position: sticky; top: 120px; vertical-align: baseline; width: 40px;&quot;&gt;&lt;div class=&quot;editor-buttons&quot; style=&quot;align-items: center; border: 0px; box-sizing: border-box; display: flex; flex-flow: column; margin: 0px; padding: 6px 0px 0px; position: sticky; top: 0px; vertical-align: baseline; width: 40px; z-index: 1;&quot;&gt;&lt;div class=&quot;editor-buttons-div&quot; style=&quot;border: 0px; box-sizing: border-box; margin: 0px; padding: 0px; vertical-align: baseline;&quot; title=&quot;Run and Edit&quot;&gt;&lt;i class=&quot;gfg-icon gfg-icon_copy code-sidebar-button padding-2px copy-code-button&quot; id=&quot;copy-code-button&quot; style=&quot;background: var(--gfg-body-color); border-radius: 50%; border: 0px; box-shadow: 0 0 2px 1px var(--gfg-head-shadow); box-sizing: border-box; color: var(--color-black); cursor: pointer; display: inline-block; height: 34px; line-height: 23px; margin: 5px 0px 0px; padding: 0.15em; vertical-align: baseline; width: 34px;&quot; title=&quot;Copy Code&quot;&gt;&lt;/i&gt;&lt;p style=&quot;border: 0px; box-sizing: border-box; color: var(--color-black); line-height: inherit; margin: 0px 0px 10px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;/p&gt;&lt;p style=&quot;border: 0px; box-sizing: border-box; color: var(--color-black); line-height: inherit; margin: 0px 0px 10px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;/p&gt;&lt;p style=&quot;border: 0px; box-sizing: border-box; color: var(--color-black); line-height: inherit; margin: 0px 0px 10px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;i class=&quot;gfg-icon gfg-icon_dark-toggle padding-2px code-sidebar-button dark-editor-button&quot; style=&quot;background: var(--gfg-body-color); border-radius: 50%; border: 0px; box-shadow: 0 0 2px 1px var(--gfg-head-shadow); box-sizing: border-box; color: var(--color-black); cursor: pointer; display: inline-block; height: 34px; line-height: 23px; margin: 5px 0px 0px; padding: 0.15em; vertical-align: baseline; width: 34px;&quot; title=&quot;Dark Mode&quot;&gt;&lt;/i&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;code-container&quot; style=&quot;border: 0px; box-sizing: border-box; flex: 1 1 0%; margin: 0px; min-width: 0px; overflow-y: hidden; padding: 0px; vertical-align: baseline; width: 522.833px;&quot;&gt;&lt;div class=&quot;syntaxhighlighter nogutter&quot; id=&quot;highlighter_961906&quot; style=&quot;border: 0px; box-sizing: border-box; font-size: 1em; margin: 1em 0px; overflow: auto; padding: 0px; position: relative; vertical-align: baseline; width: 522.833px;&quot;&gt;&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; style=&quot;background: 0px 0px; border-collapse: collapse; border-radius: 0px; border-spacing: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: block; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.99em; height: auto; inset: auto; line-height: 1.2em; margin: 25px auto; min-height: auto; outline: 0px; overflow-x: scroll; overflow-y: hidden !important; overflow: scroll hidden; padding: 0px; position: static; table-layout: auto; vertical-align: baseline; width: 522.833px;&quot;&gt;&lt;tbody style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: 0.99em; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&lt;tr style=&quot;background-attachment: initial; background-clip: initial; background-color: var(--gfg-body-color); background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: 0.99em; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&lt;td class=&quot;code&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: 12.5pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 14px 10px; position: static; vertical-align: baseline; width: 595.094px;&quot;&gt;&lt;div class=&quot;container&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 5px; position: relative; vertical-align: baseline; width: auto;&quot;&gt;&lt;div class=&quot;line number1 index0 alt2&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;lt;?php&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number2 index1 alt1&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;undefined spaces&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;nbsp;&lt;/code&gt;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;line number3 index2 alt2&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;comments&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #008200; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;// Credentials required for connection&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number4 index3 alt1&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;variable&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #aa7700; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;$pdo&lt;/code&gt; &lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;= &lt;/code&gt;&lt;code class=&quot;keyword&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #006699; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; font-weight: 700; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;new&lt;/code&gt; &lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;PDO(&lt;/code&gt;&lt;code class=&quot;string&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: blue; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&#39;mysql:host=host; dbname=database_name; charset=utf8&#39;&lt;/code&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;,&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number5 index4 alt2&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;undefined spaces&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;string&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: blue; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&#39;username&#39;&lt;/code&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;, &lt;/code&gt;&lt;code class=&quot;string&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: blue; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&#39;password&#39;&lt;/code&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;);&amp;nbsp;&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number6 index5 alt1&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;undefined spaces&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;nbsp;&lt;/code&gt;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;line number7 index6 alt2&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;?&amp;gt;&lt;/code&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;p style=&quot;border: 0px; box-sizing: border-box; color: var(--color-black); margin: 0px 0px 10px; padding: 0px; vertical-align: baseline;&quot;&gt;A big advantage of using PDO is that it makes switching the project to another database simpler. Therefore, the only thing to do is to change the connection string and those queries that will not be supported by the new database.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;background-color: white; border: 0px; box-sizing: border-box; color: #273239; font-family: urw-din, sans-serif; font-size: 17px; letter-spacing: 0.162px; margin: 0px 0px 10px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border: 0px; box-sizing: border-box; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Error Handling:&lt;/strong&gt;&amp;nbsp;Error handling is the detection, and resolution of application, programming or communication errors. Error handling helps in maintaining the normal flow of program execution, as the errors in the program are deal gracefully, thus making the program run well.&lt;/p&gt;&lt;ul style=&quot;background-color: white; border: 0px; box-sizing: border-box; color: #273239; display: flex; flex-direction: column; font-family: urw-din, sans-serif; font-size: 17px; letter-spacing: 0.162px; list-style-image: initial; list-style-position: outside; margin: 0px 0px 24px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;li style=&quot;border: 0px; box-sizing: border-box; color: var(--color-black); line-height: 1.58; margin: 0px 0px 0px 24px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border: 0px; box-sizing: border-box; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;MySQL:&lt;/strong&gt;&lt;div class=&quot;noIdeBtnDiv&quot; style=&quot;border: 0px; box-sizing: border-box; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;div class=&quot;code-block&quot; style=&quot;border: 0px; box-sizing: border-box; display: flex; flex-direction: row; margin: 0px 0px 10px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;div class=&quot;code-gutter&quot; style=&quot;border: 0px; box-sizing: border-box; flex-flow: column; margin: 0px; padding: 0px; vertical-align: baseline; width: 40px;&quot;&gt;&lt;div class=&quot;editor-buttons-container&quot; style=&quot;border: 0px; bottom: 0px; box-sizing: border-box; left: 0px; margin: 0px; padding: 0px; position: sticky; top: 120px; vertical-align: baseline; width: 40px;&quot;&gt;&lt;div class=&quot;editor-buttons&quot; style=&quot;align-items: center; border: 0px; box-sizing: border-box; display: flex; flex-flow: column; margin: 0px; padding: 6px 0px 0px; position: sticky; top: 0px; vertical-align: baseline; width: 40px; z-index: 1;&quot;&gt;&lt;div class=&quot;editor-buttons-div&quot; style=&quot;border: 0px; box-sizing: border-box; margin: 0px; padding: 0px; vertical-align: baseline;&quot; title=&quot;Run and Edit&quot;&gt;&lt;i class=&quot;gfg-icon gfg-icon_copy code-sidebar-button padding-2px copy-code-button&quot; id=&quot;copy-code-button&quot; style=&quot;background: var(--gfg-body-color); border-radius: 50%; border: 0px; box-shadow: 0 0 2px 1px var(--gfg-head-shadow); box-sizing: border-box; color: var(--color-black); cursor: pointer; display: inline-block; height: 34px; line-height: 23px; margin: 5px 0px 0px; padding: 0.15em; vertical-align: baseline; width: 34px;&quot; title=&quot;Copy Code&quot;&gt;&lt;/i&gt;&lt;p style=&quot;border: 0px; box-sizing: border-box; color: var(--color-black); line-height: inherit; margin: 0px 0px 10px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;/p&gt;&lt;p style=&quot;border: 0px; box-sizing: border-box; color: var(--color-black); line-height: inherit; margin: 0px 0px 10px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;/p&gt;&lt;p style=&quot;border: 0px; box-sizing: border-box; color: var(--color-black); line-height: inherit; margin: 0px 0px 10px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;i class=&quot;gfg-icon gfg-icon_dark-toggle padding-2px code-sidebar-button dark-editor-button&quot; style=&quot;background: var(--gfg-body-color); border-radius: 50%; border: 0px; box-shadow: 0 0 2px 1px var(--gfg-head-shadow); box-sizing: border-box; color: var(--color-black); cursor: pointer; display: inline-block; height: 34px; line-height: 23px; margin: 5px 0px 0px; padding: 0.15em; vertical-align: baseline; width: 34px;&quot; title=&quot;Dark Mode&quot;&gt;&lt;/i&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;code-container&quot; style=&quot;border: 0px; box-sizing: border-box; flex: 1 1 0%; margin: 0px; min-width: 0px; overflow-y: hidden; padding: 0px; vertical-align: baseline; width: 522.833px;&quot;&gt;&lt;div class=&quot;syntaxhighlighter nogutter&quot; id=&quot;highlighter_377695&quot; style=&quot;border: 0px; box-sizing: border-box; font-size: 1em; margin: 1em 0px; overflow: auto; padding: 0px; position: relative; vertical-align: baseline; width: 522.833px;&quot;&gt;&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; style=&quot;background: 0px 0px; border-collapse: collapse; border-radius: 0px; border-spacing: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: block; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.99em; height: auto; inset: auto; line-height: 1.2em; margin: 25px auto; min-height: auto; outline: 0px; overflow-x: scroll; overflow-y: hidden !important; overflow: scroll hidden; padding: 0px; position: static; table-layout: auto; vertical-align: baseline; width: 522.833px;&quot;&gt;&lt;tbody style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: 0.99em; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&lt;tr style=&quot;background-attachment: initial; background-clip: initial; background-color: var(--gfg-body-color); background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: 0.99em; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&lt;td class=&quot;code&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: 12.5pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 14px 10px; position: static; vertical-align: baseline; width: 561.448px;&quot;&gt;&lt;div class=&quot;container&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 5px; position: relative; vertical-align: baseline; width: auto;&quot;&gt;&lt;div class=&quot;line number1 index0 alt2&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;lt;?php&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number2 index1 alt1&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;undefined spaces&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;nbsp;&lt;/code&gt;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;line number3 index2 alt2&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;variable&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #aa7700; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;$my_result&lt;/code&gt; &lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;= mysql_query(&lt;/code&gt;&lt;code class=&quot;string&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: blue; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&quot;SELECT * FROM table&quot;&lt;/code&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;, &lt;/code&gt;&lt;code class=&quot;variable&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #aa7700; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;$connection_link&lt;/code&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;)&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number4 index3 alt1&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;undefined spaces&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;keyword&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #006699; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; font-weight: 700; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;or&lt;/code&gt; &lt;code class=&quot;keyword&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #006699; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; font-weight: 700; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;die&lt;/code&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;(mysql_error(&lt;/code&gt;&lt;code class=&quot;variable&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #aa7700; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;$connection_link&lt;/code&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;));&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number5 index4 alt2&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;?&amp;gt;&lt;/code&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;p style=&quot;border: 0px; box-sizing: border-box; color: var(--color-black); margin: 0px 0px 10px; padding: 0px; vertical-align: baseline;&quot;&gt;The ‘die’ method is used for error handling in MySQL but it is not considered to be a good approach of error handling. This is because die abruptly ends the script and then display the error to the screen. This can make the database prone to hackers.&lt;/p&gt;&lt;/li&gt;&lt;li style=&quot;border: 0px; box-sizing: border-box; color: var(--color-black); line-height: 1.58; margin: 0px 0px 0px 24px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border: 0px; box-sizing: border-box; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;MySQLi:&lt;/strong&gt;&amp;nbsp;The error handling in MySQLi if a bit easier. The mysqli::$error (mysqli_error) returns a string description of the last error.&lt;div class=&quot;noIdeBtnDiv&quot; style=&quot;border: 0px; box-sizing: border-box; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;div class=&quot;code-block&quot; style=&quot;border: 0px; box-sizing: border-box; display: flex; flex-direction: row; margin: 0px 0px 10px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;div class=&quot;code-gutter&quot; style=&quot;border: 0px; box-sizing: border-box; flex-flow: column; margin: 0px; padding: 0px; vertical-align: baseline; width: 40px;&quot;&gt;&lt;div class=&quot;editor-buttons-container&quot; style=&quot;border: 0px; bottom: 0px; box-sizing: border-box; left: 0px; margin: 0px; padding: 0px; position: sticky; top: 120px; vertical-align: baseline; width: 40px;&quot;&gt;&lt;div class=&quot;editor-buttons&quot; style=&quot;align-items: center; border: 0px; box-sizing: border-box; display: flex; flex-flow: column; margin: 0px; padding: 6px 0px 0px; position: sticky; top: 0px; vertical-align: baseline; width: 40px; z-index: 1;&quot;&gt;&lt;div class=&quot;editor-buttons-div&quot; style=&quot;border: 0px; box-sizing: border-box; margin: 0px; padding: 0px; vertical-align: baseline;&quot; title=&quot;Run and Edit&quot;&gt;&lt;i class=&quot;gfg-icon gfg-icon_copy code-sidebar-button padding-2px copy-code-button&quot; id=&quot;copy-code-button&quot; style=&quot;background: var(--gfg-body-color); border-radius: 50%; border: 0px; box-shadow: 0 0 2px 1px var(--gfg-head-shadow); box-sizing: border-box; color: var(--color-black); cursor: pointer; display: inline-block; height: 34px; line-height: 23px; margin: 5px 0px 0px; padding: 0.15em; vertical-align: baseline; width: 34px;&quot; title=&quot;Copy Code&quot;&gt;&lt;/i&gt;&lt;p style=&quot;border: 0px; box-sizing: border-box; color: var(--color-black); line-height: inherit; margin: 0px 0px 10px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;/p&gt;&lt;p style=&quot;border: 0px; box-sizing: border-box; color: var(--color-black); line-height: inherit; margin: 0px 0px 10px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;/p&gt;&lt;p style=&quot;border: 0px; box-sizing: border-box; color: var(--color-black); line-height: inherit; margin: 0px 0px 10px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;i class=&quot;gfg-icon gfg-icon_dark-toggle padding-2px code-sidebar-button dark-editor-button&quot; style=&quot;background: var(--gfg-body-color); border-radius: 50%; border: 0px; box-shadow: 0 0 2px 1px var(--gfg-head-shadow); box-sizing: border-box; color: var(--color-black); cursor: pointer; display: inline-block; height: 34px; line-height: 23px; margin: 5px 0px 0px; padding: 0.15em; vertical-align: baseline; width: 34px;&quot; title=&quot;Dark Mode&quot;&gt;&lt;/i&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;code-container&quot; style=&quot;border: 0px; box-sizing: border-box; flex: 1 1 0%; margin: 0px; min-width: 0px; overflow-y: hidden; padding: 0px; vertical-align: baseline; width: 522.833px;&quot;&gt;&lt;div class=&quot;syntaxhighlighter nogutter&quot; id=&quot;highlighter_103769&quot; style=&quot;border: 0px; box-sizing: border-box; font-size: 1em; margin: 1em 0px; overflow: auto; padding: 0px; position: relative; vertical-align: baseline; width: 522.833px;&quot;&gt;&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; style=&quot;background: 0px 0px; border-collapse: collapse; border-radius: 0px; border-spacing: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: block; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.99em; height: auto; inset: auto; line-height: 1.2em; margin: 25px auto; min-height: auto; outline: 0px; overflow-x: scroll; overflow-y: hidden !important; overflow: scroll hidden; padding: 0px; position: static; table-layout: auto; vertical-align: baseline; width: 522.833px;&quot;&gt;&lt;tbody style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: 0.99em; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&lt;tr style=&quot;background-attachment: initial; background-clip: initial; background-color: var(--gfg-body-color); background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: 0.99em; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&lt;td class=&quot;code&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: 12.5pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 14px 10px; position: static; vertical-align: baseline; width: 429.094px;&quot;&gt;&lt;div class=&quot;container&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 5px; position: relative; vertical-align: baseline; width: auto;&quot;&gt;&lt;div class=&quot;line number1 index0 alt2&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;lt;?php&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number2 index1 alt1&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;undefined spaces&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;nbsp;&lt;/code&gt;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;line number3 index2 alt2&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;keyword&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #006699; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; font-weight: 700; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;if&lt;/code&gt; &lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;(!&lt;/code&gt;&lt;code class=&quot;variable&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #aa7700; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;$mysqli&lt;/code&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;-&amp;gt;query(&lt;/code&gt;&lt;code class=&quot;string&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: blue; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&quot;SET a=1&quot;&lt;/code&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;)) {&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number4 index3 alt1&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;undefined spaces&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;printf(&lt;/code&gt;&lt;code class=&quot;string&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: blue; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&quot;Errormessage: %s\n&quot;&lt;/code&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;, &lt;/code&gt;&lt;code class=&quot;variable&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #aa7700; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;$mysqli&lt;/code&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;-&amp;gt;error);&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number5 index4 alt2&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;}&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number6 index5 alt1&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;undefined spaces&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;nbsp;&lt;/code&gt;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;line number7 index6 alt2&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;?&amp;gt;&lt;/code&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;border: 0px; box-sizing: border-box; color: var(--color-black); line-height: 1.58; margin: 0px 0px 0px 24px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border: 0px; box-sizing: border-box; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;PDO:&lt;/strong&gt;&amp;nbsp;PDO has the best error handling method out of these three. This is because of the availability of the try-catch block. Also, there are some error modes that can be used for error handling.&lt;ul style=&quot;border: 0px; box-sizing: border-box; flex-direction: column; list-style: outside disc; margin: 5px 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;li style=&quot;border: 0px; box-sizing: border-box; color: var(--color-black); line-height: 1.58; margin: 0px 0px 0px 24px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border: 0px; box-sizing: border-box; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;PDO::ERRMODE_SILENT:&lt;/strong&gt;&amp;nbsp;It is used to check each result and then check $db-&amp;gt;errorInfo() to get error details.&lt;/li&gt;&lt;li style=&quot;border: 0px; box-sizing: border-box; color: var(--color-black); line-height: 1.58; margin: 0px 0px 0px 24px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border: 0px; box-sizing: border-box; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;PDO::ERRMODE_WARNING:&lt;/strong&gt;&amp;nbsp;Warning does not halt the script. This provides run-time warnings and not fatal errors.&lt;/li&gt;&lt;li style=&quot;border: 0px; box-sizing: border-box; color: var(--color-black); line-height: 1.58; margin: 0px 0px 0px 24px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border: 0px; box-sizing: border-box; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;PDO::ERRMODE_EXCEPTION:&lt;/strong&gt;&amp;nbsp;It throws exceptions that show an error raised by PDO. It should not throw a PDOException with your code. It acts much like or die(mysql_error()) when it isn’t caught. But it can catch these PDOException and handle as we want.&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;border: 0px; box-sizing: border-box; color: var(--color-black); margin: 0px 0px 10px; padding: 0px; vertical-align: baseline;&quot;&gt;We can set these error modes as follow:&lt;/p&gt;&lt;div class=&quot;noIdeBtnDiv&quot; style=&quot;border: 0px; box-sizing: border-box; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;div class=&quot;code-block&quot; style=&quot;border: 0px; box-sizing: border-box; display: flex; flex-direction: row; margin: 0px 0px 10px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;div class=&quot;code-gutter&quot; style=&quot;border: 0px; box-sizing: border-box; flex-flow: column; margin: 0px; padding: 0px; vertical-align: baseline; width: 40px;&quot;&gt;&lt;div class=&quot;editor-buttons-container&quot; style=&quot;border: 0px; bottom: 0px; box-sizing: border-box; left: 0px; margin: 0px; padding: 0px; position: sticky; top: 120px; vertical-align: baseline; width: 40px;&quot;&gt;&lt;div class=&quot;editor-buttons&quot; style=&quot;align-items: center; border: 0px; box-sizing: border-box; display: flex; flex-flow: column; margin: 0px; padding: 6px 0px 0px; position: sticky; top: 0px; vertical-align: baseline; width: 40px; z-index: 1;&quot;&gt;&lt;div class=&quot;editor-buttons-div&quot; style=&quot;border: 0px; box-sizing: border-box; margin: 0px; padding: 0px; vertical-align: baseline;&quot; title=&quot;Run and Edit&quot;&gt;&lt;i class=&quot;gfg-icon gfg-icon_copy code-sidebar-button padding-2px copy-code-button&quot; id=&quot;copy-code-button&quot; style=&quot;background: var(--gfg-body-color); border-radius: 50%; border: 0px; box-shadow: 0 0 2px 1px var(--gfg-head-shadow); box-sizing: border-box; color: var(--color-black); cursor: pointer; display: inline-block; height: 34px; line-height: 23px; margin: 5px 0px 0px; padding: 0.15em; vertical-align: baseline; width: 34px;&quot; title=&quot;Copy Code&quot;&gt;&lt;/i&gt;&lt;p style=&quot;border: 0px; box-sizing: border-box; color: var(--color-black); line-height: inherit; margin: 0px 0px 10px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;/p&gt;&lt;p style=&quot;border: 0px; box-sizing: border-box; color: var(--color-black); line-height: inherit; margin: 0px 0px 10px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;/p&gt;&lt;p style=&quot;border: 0px; box-sizing: border-box; color: var(--color-black); line-height: inherit; margin: 0px 0px 10px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;i class=&quot;gfg-icon gfg-icon_dark-toggle padding-2px code-sidebar-button dark-editor-button&quot; style=&quot;background: var(--gfg-body-color); border-radius: 50%; border: 0px; box-shadow: 0 0 2px 1px var(--gfg-head-shadow); box-sizing: border-box; color: var(--color-black); cursor: pointer; display: inline-block; height: 34px; line-height: 23px; margin: 5px 0px 0px; padding: 0.15em; vertical-align: baseline; width: 34px;&quot; title=&quot;Dark Mode&quot;&gt;&lt;/i&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;code-container&quot; style=&quot;border: 0px; box-sizing: border-box; flex: 1 1 0%; margin: 0px; min-width: 0px; overflow-y: hidden; padding: 0px; vertical-align: baseline; width: 522.833px;&quot;&gt;&lt;div class=&quot;syntaxhighlighter nogutter&quot; id=&quot;highlighter_873917&quot; style=&quot;border: 0px; box-sizing: border-box; font-size: 1em; margin: 1em 0px; overflow: auto; padding: 0px; position: relative; vertical-align: baseline; width: 522.833px;&quot;&gt;&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; style=&quot;background: 0px 0px; border-collapse: collapse; border-radius: 0px; border-spacing: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: block; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.99em; height: auto; inset: auto; line-height: 1.2em; margin: 25px auto; min-height: auto; outline: 0px; overflow-x: scroll; overflow-y: hidden !important; overflow: scroll hidden; padding: 0px; position: static; table-layout: auto; vertical-align: baseline; width: 522.833px;&quot;&gt;&lt;tbody style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: 0.99em; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&lt;tr style=&quot;background-attachment: initial; background-clip: initial; background-color: var(--gfg-body-color); background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: 0.99em; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&lt;td class=&quot;code&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: 12.5pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 14px 10px; position: static; vertical-align: baseline; width: 544.24px;&quot;&gt;&lt;div class=&quot;container&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 5px; position: relative; vertical-align: baseline; width: auto;&quot;&gt;&lt;div class=&quot;line number1 index0 alt2&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;lt;?php&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number2 index1 alt1&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;variable&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #aa7700; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;$db&lt;/code&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;-&amp;gt;setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_SILENT );&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number3 index2 alt2&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;variable&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #aa7700; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;$db&lt;/code&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;-&amp;gt;setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING );&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number4 index3 alt1&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;variable&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #aa7700; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;$db&lt;/code&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;-&amp;gt;setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number5 index4 alt2&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;?&amp;gt;&lt;/code&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;p style=&quot;border: 0px; box-sizing: border-box; color: var(--color-black); margin: 0px 0px 10px; padding: 0px; vertical-align: baseline;&quot;&gt;Now, try/catch method can be added as follows:&lt;/p&gt;&lt;div class=&quot;noIdeBtnDiv&quot; style=&quot;border: 0px; box-sizing: border-box; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;div class=&quot;code-block&quot; style=&quot;border: 0px; box-sizing: border-box; display: flex; flex-direction: row; margin: 0px 0px 10px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;div class=&quot;code-gutter&quot; style=&quot;border: 0px; box-sizing: border-box; flex-flow: column; margin: 0px; padding: 0px; vertical-align: baseline; width: 40px;&quot;&gt;&lt;div class=&quot;editor-buttons-container&quot; style=&quot;border: 0px; bottom: 0px; box-sizing: border-box; left: 0px; margin: 0px; padding: 0px; position: sticky; top: 120px; vertical-align: baseline; width: 40px;&quot;&gt;&lt;div class=&quot;editor-buttons&quot; style=&quot;align-items: center; border: 0px; box-sizing: border-box; display: flex; flex-flow: column; margin: 0px; padding: 6px 0px 0px; position: sticky; top: 0px; vertical-align: baseline; width: 40px; z-index: 1;&quot;&gt;&lt;div class=&quot;editor-buttons-div&quot; style=&quot;border: 0px; box-sizing: border-box; margin: 0px; padding: 0px; vertical-align: baseline;&quot; title=&quot;Run and Edit&quot;&gt;&lt;i class=&quot;gfg-icon gfg-icon_copy code-sidebar-button padding-2px copy-code-button&quot; id=&quot;copy-code-button&quot; style=&quot;background: var(--gfg-body-color); border-radius: 50%; border: 0px; box-shadow: 0 0 2px 1px var(--gfg-head-shadow); box-sizing: border-box; color: var(--color-black); cursor: pointer; display: inline-block; height: 34px; line-height: 23px; margin: 5px 0px 0px; padding: 0.15em; vertical-align: baseline; width: 34px;&quot; title=&quot;Copy Code&quot;&gt;&lt;/i&gt;&lt;p style=&quot;border: 0px; box-sizing: border-box; color: var(--color-black); line-height: inherit; margin: 0px 0px 10px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;/p&gt;&lt;p style=&quot;border: 0px; box-sizing: border-box; color: var(--color-black); line-height: inherit; margin: 0px 0px 10px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;/p&gt;&lt;p style=&quot;border: 0px; box-sizing: border-box; color: var(--color-black); line-height: inherit; margin: 0px 0px 10px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;i class=&quot;gfg-icon gfg-icon_dark-toggle padding-2px code-sidebar-button dark-editor-button&quot; style=&quot;background: var(--gfg-body-color); border-radius: 50%; border: 0px; box-shadow: 0 0 2px 1px var(--gfg-head-shadow); box-sizing: border-box; color: var(--color-black); cursor: pointer; display: inline-block; height: 34px; line-height: 23px; margin: 5px 0px 0px; padding: 0.15em; vertical-align: baseline; width: 34px;&quot; title=&quot;Dark Mode&quot;&gt;&lt;/i&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;code-container&quot; style=&quot;border: 0px; box-sizing: border-box; flex: 1 1 0%; margin: 0px; min-width: 0px; overflow-y: hidden; padding: 0px; vertical-align: baseline; width: 522.833px;&quot;&gt;&lt;div class=&quot;syntaxhighlighter nogutter&quot; id=&quot;highlighter_872147&quot; style=&quot;border: 0px; box-sizing: border-box; font-size: 1em; margin: 1em 0px; overflow: auto; padding: 0px; position: relative; vertical-align: baseline; width: 522.833px;&quot;&gt;&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; style=&quot;background: 0px 0px; border-collapse: collapse; border-radius: 0px; border-spacing: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: block; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.99em; height: auto; inset: auto; line-height: 1.2em; margin: 25px auto; min-height: auto; outline: 0px; overflow-x: scroll; overflow-y: hidden !important; overflow: scroll hidden; padding: 0px; position: static; table-layout: auto; vertical-align: baseline; width: 522.833px;&quot;&gt;&lt;tbody style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: 0.99em; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&lt;tr style=&quot;background-attachment: initial; background-clip: initial; background-color: var(--gfg-body-color); background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: 0.99em; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&lt;td class=&quot;code&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: 12.5pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 14px 10px; position: static; vertical-align: baseline; width: 305.688px;&quot;&gt;&lt;div class=&quot;container&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 5px; position: relative; vertical-align: baseline; width: auto;&quot;&gt;&lt;div class=&quot;line number1 index0 alt2&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;lt;?php&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number2 index1 alt1&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;undefined spaces&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;nbsp;&lt;/code&gt;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;line number3 index2 alt2&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;keyword&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #006699; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; font-weight: 700; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;try&lt;/code&gt; &lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;{&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number4 index3 alt1&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;undefined spaces&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;line number5 index4 alt2&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;undefined spaces&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;comments&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #008200; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;// Incorrect query&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number6 index5 alt1&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;undefined spaces&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;variable&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #aa7700; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;$db&lt;/code&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;-&amp;gt;query(&lt;/code&gt;&lt;code class=&quot;string&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: blue; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&#39;hello&#39;&lt;/code&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;);&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number7 index6 alt2&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;}&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number8 index7 alt1&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;undefined spaces&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;nbsp;&lt;/code&gt;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;line number9 index8 alt2&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;keyword&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #006699; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; font-weight: 700; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;catch&lt;/code&gt; &lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;(PDOException &lt;/code&gt;&lt;code class=&quot;variable&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #aa7700; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;$ex&lt;/code&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;) {&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number10 index9 alt1&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;undefined spaces&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;line number11 index10 alt2&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;undefined spaces&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;comments&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #008200; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;// $ex-&amp;gt;getMessage();&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number12 index11 alt1&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;undefined spaces&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;line number13 index12 alt2&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;undefined spaces&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;comments&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #008200; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;// Message to be displayed in&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number14 index13 alt1&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;undefined spaces&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;comments&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #008200; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;// case of such an error&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number15 index14 alt2&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;undefined spaces&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;functions&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: deeppink; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;echo&lt;/code&gt; &lt;code class=&quot;string&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: blue; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&quot;An Error has occurred&quot;&lt;/code&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;;&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number16 index15 alt1&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;}&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number17 index16 alt2&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;undefined spaces&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;nbsp;&lt;/code&gt;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;line number18 index17 alt1&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;?&amp;gt;&lt;/code&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;p style=&quot;border: 0px; box-sizing: border-box; color: var(--color-black); margin: 0px 0px 10px; padding: 0px; vertical-align: baseline;&quot;&gt;An advantage of using the try/catch method is that we can set a normal error message to be displayed to the user, instead of an exception message, as that might be difficult for the general users to comprehend.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;background-color: white; border: 0px; box-sizing: border-box; color: #273239; font-family: urw-din, sans-serif; font-size: 17px; letter-spacing: 0.162px; margin: 0px 0px 10px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border: 0px; box-sizing: border-box; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Data Fetching:&lt;/strong&gt;&lt;/p&gt;&lt;ul style=&quot;background-color: white; border: 0px; box-sizing: border-box; color: #273239; display: flex; flex-direction: column; font-family: urw-din, sans-serif; font-size: 17px; letter-spacing: 0.162px; list-style-image: initial; list-style-position: outside; margin: 0px 0px 24px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;li style=&quot;border: 0px; box-sizing: border-box; color: var(--color-black); line-height: 1.58; margin: 0px 0px 0px 24px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border: 0px; box-sizing: border-box; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;MySQL:&lt;/strong&gt;&amp;nbsp;General programming loops such as for, or while loop can be used for such a purpose. Suppose there is a table named ‘data’ in the database and we want to output the username from each row of the table. While loop can be used in the following way to do the work.&lt;div class=&quot;noIdeBtnDiv&quot; style=&quot;border: 0px; box-sizing: border-box; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;div class=&quot;code-block&quot; style=&quot;border: 0px; box-sizing: border-box; display: flex; flex-direction: row; margin: 0px 0px 10px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;div class=&quot;code-gutter&quot; style=&quot;border: 0px; box-sizing: border-box; flex-flow: column; margin: 0px; padding: 0px; vertical-align: baseline; width: 40px;&quot;&gt;&lt;div class=&quot;editor-buttons-container&quot; style=&quot;border: 0px; bottom: 0px; box-sizing: border-box; left: 0px; margin: 0px; padding: 0px; position: sticky; top: 120px; vertical-align: baseline; width: 40px;&quot;&gt;&lt;div class=&quot;editor-buttons&quot; style=&quot;align-items: center; border: 0px; box-sizing: border-box; display: flex; flex-flow: column; margin: 0px; padding: 6px 0px 0px; position: sticky; top: 0px; vertical-align: baseline; width: 40px; z-index: 1;&quot;&gt;&lt;div class=&quot;editor-buttons-div&quot; style=&quot;border: 0px; box-sizing: border-box; margin: 0px; padding: 0px; vertical-align: baseline;&quot; title=&quot;Run and Edit&quot;&gt;&lt;i class=&quot;gfg-icon gfg-icon_copy code-sidebar-button padding-2px copy-code-button&quot; id=&quot;copy-code-button&quot; style=&quot;background: var(--gfg-body-color); border-radius: 50%; border: 0px; box-shadow: 0 0 2px 1px var(--gfg-head-shadow); box-sizing: border-box; color: var(--color-black); cursor: pointer; display: inline-block; height: 34px; line-height: 23px; margin: 5px 0px 0px; padding: 0.15em; vertical-align: baseline; width: 34px;&quot; title=&quot;Copy Code&quot;&gt;&lt;/i&gt;&lt;p style=&quot;border: 0px; box-sizing: border-box; color: var(--color-black); line-height: inherit; margin: 0px 0px 10px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;/p&gt;&lt;p style=&quot;border: 0px; box-sizing: border-box; color: var(--color-black); line-height: inherit; margin: 0px 0px 10px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;/p&gt;&lt;p style=&quot;border: 0px; box-sizing: border-box; color: var(--color-black); line-height: inherit; margin: 0px 0px 10px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;i class=&quot;gfg-icon gfg-icon_dark-toggle padding-2px code-sidebar-button dark-editor-button&quot; style=&quot;background: var(--gfg-body-color); border-radius: 50%; border: 0px; box-shadow: 0 0 2px 1px var(--gfg-head-shadow); box-sizing: border-box; color: var(--color-black); cursor: pointer; display: inline-block; height: 34px; line-height: 23px; margin: 5px 0px 0px; padding: 0.15em; vertical-align: baseline; width: 34px;&quot; title=&quot;Dark Mode&quot;&gt;&lt;/i&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;code-container&quot; style=&quot;border: 0px; box-sizing: border-box; flex: 1 1 0%; margin: 0px; min-width: 0px; overflow-y: hidden; padding: 0px; vertical-align: baseline; width: 522.833px;&quot;&gt;&lt;div class=&quot;syntaxhighlighter nogutter&quot; id=&quot;highlighter_717942&quot; style=&quot;border: 0px; box-sizing: border-box; font-size: 1em; margin: 1em 0px; overflow: auto; padding: 0px; position: relative; vertical-align: baseline; width: 522.833px;&quot;&gt;&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; style=&quot;background: 0px 0px; border-collapse: collapse; border-radius: 0px; border-spacing: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: block; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.99em; height: auto; inset: auto; line-height: 1.2em; margin: 25px auto; min-height: auto; outline: 0px; overflow-x: scroll; overflow-y: hidden !important; overflow: scroll hidden; padding: 0px; position: static; table-layout: auto; vertical-align: baseline; width: 522.833px;&quot;&gt;&lt;tbody style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: 0.99em; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&lt;tr style=&quot;background-attachment: initial; background-clip: initial; background-color: var(--gfg-body-color); background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: 0.99em; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&lt;td class=&quot;code&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: 12.5pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 14px 10px; position: static; vertical-align: baseline; width: 405.146px;&quot;&gt;&lt;div class=&quot;container&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 5px; position: relative; vertical-align: baseline; width: auto;&quot;&gt;&lt;div class=&quot;line number1 index0 alt2&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;lt;?php&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number2 index1 alt1&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;undefined spaces&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;nbsp;&lt;/code&gt;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;line number3 index2 alt2&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;variable&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #aa7700; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;$my_result&lt;/code&gt; &lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;= mysql_query(&lt;/code&gt;&lt;code class=&quot;string&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: blue; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&#39;SELECT * from data&#39;&lt;/code&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;)&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number4 index3 alt1&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;undefined spaces&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;keyword&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #006699; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; font-weight: 700; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;or&lt;/code&gt; &lt;code class=&quot;keyword&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #006699; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; font-weight: 700; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;die&lt;/code&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;(mysql_error());&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number5 index4 alt2&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;undefined spaces&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;nbsp;&lt;/code&gt;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;line number6 index5 alt1&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;variable&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #aa7700; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;$num_rows&lt;/code&gt; &lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;= mysql_num_rows(&lt;/code&gt;&lt;code class=&quot;variable&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #aa7700; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;$my_result&lt;/code&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;);&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number7 index6 alt2&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;undefined spaces&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;nbsp;&lt;/code&gt;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;line number8 index7 alt1&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;keyword&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #006699; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; font-weight: 700; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;while&lt;/code&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;(&lt;/code&gt;&lt;code class=&quot;variable&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #aa7700; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;$row&lt;/code&gt; &lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;= mysql_fetch_assoc(&lt;/code&gt;&lt;code class=&quot;variable&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #aa7700; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;$my_result&lt;/code&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;)) {&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number9 index8 alt2&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;undefined spaces&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;functions&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: deeppink; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;echo&lt;/code&gt; &lt;code class=&quot;variable&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #aa7700; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;$row&lt;/code&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;[&lt;/code&gt;&lt;code class=&quot;string&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: blue; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&#39;field1&#39;&lt;/code&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;];&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number10 index9 alt1&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;}&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number11 index10 alt2&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;undefined spaces&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;nbsp;&lt;/code&gt;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;line number12 index11 alt1&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;?&amp;gt;&lt;/code&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;border: 0px; box-sizing: border-box; color: var(--color-black); line-height: 1.58; margin: 0px 0px 0px 24px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border: 0px; box-sizing: border-box; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;MySQLi:&lt;/strong&gt;&amp;nbsp;MySQLi uses a loop for this purpose as well. The code, however, will be a bit different.&lt;div class=&quot;noIdeBtnDiv&quot; style=&quot;border: 0px; box-sizing: border-box; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;div class=&quot;code-block&quot; style=&quot;border: 0px; box-sizing: border-box; display: flex; flex-direction: row; margin: 0px 0px 10px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;div class=&quot;code-gutter&quot; style=&quot;border: 0px; box-sizing: border-box; flex-flow: column; margin: 0px; padding: 0px; vertical-align: baseline; width: 40px;&quot;&gt;&lt;div class=&quot;editor-buttons-container&quot; style=&quot;border: 0px; bottom: 0px; box-sizing: border-box; left: 0px; margin: 0px; padding: 0px; position: sticky; top: 120px; vertical-align: baseline; width: 40px;&quot;&gt;&lt;div class=&quot;editor-buttons&quot; style=&quot;align-items: center; border: 0px; box-sizing: border-box; display: flex; flex-flow: column; margin: 0px; padding: 6px 0px 0px; position: sticky; top: 0px; vertical-align: baseline; width: 40px; z-index: 1;&quot;&gt;&lt;div class=&quot;editor-buttons-div&quot; style=&quot;border: 0px; box-sizing: border-box; margin: 0px; padding: 0px; vertical-align: baseline;&quot; title=&quot;Run and Edit&quot;&gt;&lt;i class=&quot;gfg-icon gfg-icon_copy code-sidebar-button padding-2px copy-code-button&quot; id=&quot;copy-code-button&quot; style=&quot;background: var(--gfg-body-color); border-radius: 50%; border: 0px; box-shadow: 0 0 2px 1px var(--gfg-head-shadow); box-sizing: border-box; color: var(--color-black); cursor: pointer; display: inline-block; height: 34px; line-height: 23px; margin: 5px 0px 0px; padding: 0.15em; vertical-align: baseline; width: 34px;&quot; title=&quot;Copy Code&quot;&gt;&lt;/i&gt;&lt;p style=&quot;border: 0px; box-sizing: border-box; color: var(--color-black); line-height: inherit; margin: 0px 0px 10px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;/p&gt;&lt;p style=&quot;border: 0px; box-sizing: border-box; color: var(--color-black); line-height: inherit; margin: 0px 0px 10px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;/p&gt;&lt;p style=&quot;border: 0px; box-sizing: border-box; color: var(--color-black); line-height: inherit; margin: 0px 0px 10px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;i class=&quot;gfg-icon gfg-icon_dark-toggle padding-2px code-sidebar-button dark-editor-button&quot; style=&quot;background: var(--gfg-body-color); border-radius: 50%; border: 0px; box-shadow: 0 0 2px 1px var(--gfg-head-shadow); box-sizing: border-box; color: var(--color-black); cursor: pointer; display: inline-block; height: 34px; line-height: 23px; margin: 5px 0px 0px; padding: 0.15em; vertical-align: baseline; width: 34px;&quot; title=&quot;Dark Mode&quot;&gt;&lt;/i&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;code-container&quot; style=&quot;border: 0px; box-sizing: border-box; flex: 1 1 0%; margin: 0px; min-width: 0px; overflow-y: hidden; padding: 0px; vertical-align: baseline; width: 522.833px;&quot;&gt;&lt;div class=&quot;syntaxhighlighter nogutter&quot; id=&quot;highlighter_4679&quot; style=&quot;border: 0px; box-sizing: border-box; font-size: 1em; margin: 1em 0px; overflow: auto; padding: 0px; position: relative; vertical-align: baseline; width: 522.833px;&quot;&gt;&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; style=&quot;background: 0px 0px; border-collapse: collapse; border-radius: 0px; border-spacing: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: block; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.99em; height: auto; inset: auto; line-height: 1.2em; margin: 25px auto; min-height: auto; outline: 0px; overflow-x: scroll; overflow-y: hidden !important; overflow: scroll hidden; padding: 0px; position: static; table-layout: auto; vertical-align: baseline; width: 522.833px;&quot;&gt;&lt;tbody style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: 0.99em; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&lt;tr style=&quot;background-attachment: initial; background-clip: initial; background-color: var(--gfg-body-color); background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: 0.99em; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&lt;td class=&quot;code&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: 12.5pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 14px 10px; position: static; vertical-align: baseline; width: 364.031px;&quot;&gt;&lt;div class=&quot;container&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 5px; position: relative; vertical-align: baseline; width: auto;&quot;&gt;&lt;div class=&quot;line number1 index0 alt2&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;lt;?php&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number2 index1 alt1&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;undefined spaces&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;nbsp;&lt;/code&gt;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;line number3 index2 alt2&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;keyword&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #006699; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; font-weight: 700; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;while&lt;/code&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;(&lt;/code&gt;&lt;code class=&quot;variable&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #aa7700; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;$row&lt;/code&gt; &lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;= &lt;/code&gt;&lt;code class=&quot;variable&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #aa7700; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;$my_result&lt;/code&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;-&amp;gt;fetch_assoc()) {&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number4 index3 alt1&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;undefined spaces&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;functions&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: deeppink; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;echo&lt;/code&gt; &lt;code class=&quot;variable&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #aa7700; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;$row&lt;/code&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;[&lt;/code&gt;&lt;code class=&quot;string&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: blue; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&#39;username&#39;&lt;/code&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;] . &lt;/code&gt;&lt;code class=&quot;string&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: blue; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&#39;\n&#39;&lt;/code&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;;&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number5 index4 alt2&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;}&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number6 index5 alt1&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;undefined spaces&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;nbsp;&lt;/code&gt;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;line number7 index6 alt2&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;?&amp;gt;&lt;/code&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;border: 0px; box-sizing: border-box; color: var(--color-black); line-height: 1.58; margin: 0px 0px 0px 24px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border: 0px; box-sizing: border-box; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;PDO:&lt;/strong&gt;&amp;nbsp;PDO has many in-built statements that help in such cases.&lt;ul style=&quot;border: 0px; box-sizing: border-box; flex-direction: column; list-style: outside disc; margin: 5px 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;li style=&quot;border: 0px; box-sizing: border-box; color: var(--color-black); line-height: 1.58; margin: 0px 0px 0px 24px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border: 0px; box-sizing: border-box; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;PDOStatement::fetchAll():&lt;/strong&gt;&amp;nbsp;It returns the result in the form of an array, containing all of the result rows.&lt;/li&gt;&lt;li style=&quot;border: 0px; box-sizing: border-box; color: var(--color-black); line-height: 1.58; margin: 0px 0px 0px 24px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border: 0px; box-sizing: border-box; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;PDOStatement::fetchColumn():&lt;/strong&gt;&amp;nbsp;It fetches a single column from the next row of a result set.&lt;/li&gt;&lt;li style=&quot;border: 0px; box-sizing: border-box; color: var(--color-black); line-height: 1.58; margin: 0px 0px 0px 24px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border: 0px; box-sizing: border-box; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;PDOStatement::fetchObject():&lt;/strong&gt;&amp;nbsp;This first fetches the next rows and then returns it as an object.&lt;/li&gt;&lt;li style=&quot;border: 0px; box-sizing: border-box; color: var(--color-black); line-height: 1.58; margin: 0px 0px 0px 24px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border: 0px; box-sizing: border-box; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;PDOStatement::setFetchMode():&lt;/strong&gt;&amp;nbsp;It sets the default fetch mode for the statement.&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;border: 0px; box-sizing: border-box; color: var(--color-black); margin: 0px 0px 10px; padding: 0px; vertical-align: baseline;&quot;&gt;The query is also used for data fetching, as it returns a PDOStatement object that can be used to fetch the data directly by using foreach and for loop.&lt;/p&gt;&lt;div class=&quot;noIdeBtnDiv&quot; style=&quot;border: 0px; box-sizing: border-box; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;div class=&quot;code-block&quot; style=&quot;border: 0px; box-sizing: border-box; display: flex; flex-direction: row; margin: 0px 0px 10px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;div class=&quot;code-gutter&quot; style=&quot;border: 0px; box-sizing: border-box; flex-flow: column; margin: 0px; padding: 0px; vertical-align: baseline; width: 40px;&quot;&gt;&lt;div class=&quot;editor-buttons-container&quot; style=&quot;border: 0px; bottom: 0px; box-sizing: border-box; left: 0px; margin: 0px; padding: 0px; position: sticky; top: 120px; vertical-align: baseline; width: 40px;&quot;&gt;&lt;div class=&quot;editor-buttons&quot; style=&quot;align-items: center; border: 0px; box-sizing: border-box; display: flex; flex-flow: column; margin: 0px; padding: 6px 0px 0px; position: sticky; top: 0px; vertical-align: baseline; width: 40px; z-index: 1;&quot;&gt;&lt;div class=&quot;editor-buttons-div&quot; style=&quot;border: 0px; box-sizing: border-box; margin: 0px; padding: 0px; vertical-align: baseline;&quot; title=&quot;Run and Edit&quot;&gt;&lt;i class=&quot;gfg-icon gfg-icon_copy code-sidebar-button padding-2px copy-code-button&quot; id=&quot;copy-code-button&quot; style=&quot;background: var(--gfg-body-color); border-radius: 50%; border: 0px; box-shadow: 0 0 2px 1px var(--gfg-head-shadow); box-sizing: border-box; color: var(--color-black); cursor: pointer; display: inline-block; height: 34px; line-height: 23px; margin: 5px 0px 0px; padding: 0.15em; vertical-align: baseline; width: 34px;&quot; title=&quot;Copy Code&quot;&gt;&lt;/i&gt;&lt;p style=&quot;border: 0px; box-sizing: border-box; color: var(--color-black); line-height: inherit; margin: 0px 0px 10px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;/p&gt;&lt;p style=&quot;border: 0px; box-sizing: border-box; color: var(--color-black); line-height: inherit; margin: 0px 0px 10px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;/p&gt;&lt;p style=&quot;border: 0px; box-sizing: border-box; color: var(--color-black); line-height: inherit; margin: 0px 0px 10px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;i class=&quot;gfg-icon gfg-icon_dark-toggle padding-2px code-sidebar-button dark-editor-button&quot; style=&quot;background: var(--gfg-body-color); border-radius: 50%; border: 0px; box-shadow: 0 0 2px 1px var(--gfg-head-shadow); box-sizing: border-box; color: var(--color-black); cursor: pointer; display: inline-block; height: 34px; line-height: 23px; margin: 5px 0px 0px; padding: 0.15em; vertical-align: baseline; width: 34px;&quot; title=&quot;Dark Mode&quot;&gt;&lt;/i&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;code-container&quot; style=&quot;border: 0px; box-sizing: border-box; flex: 1 1 0%; margin: 0px; min-width: 0px; overflow-y: hidden; padding: 0px; vertical-align: baseline; width: 522.833px;&quot;&gt;&lt;div class=&quot;syntaxhighlighter nogutter&quot; id=&quot;highlighter_632577&quot; style=&quot;border: 0px; box-sizing: border-box; font-size: 1em; margin: 1em 0px; overflow: auto; padding: 0px; position: relative; vertical-align: baseline; width: 522.833px;&quot;&gt;&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; style=&quot;background: 0px 0px; border-collapse: collapse; border-radius: 0px; border-spacing: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: block; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.99em; height: auto; inset: auto; line-height: 1.2em; margin: 25px auto; min-height: auto; outline: 0px; overflow-x: scroll; overflow-y: hidden !important; overflow: scroll hidden; padding: 0px; position: static; table-layout: auto; vertical-align: baseline; width: 522.833px;&quot;&gt;&lt;tbody style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: 0.99em; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&lt;tr style=&quot;background-attachment: initial; background-clip: initial; background-color: var(--gfg-body-color); background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: 0.99em; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&lt;td class=&quot;code&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: 12.5pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 14px 10px; position: static; vertical-align: baseline; width: 429.844px;&quot;&gt;&lt;div class=&quot;container&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 5px; position: relative; vertical-align: baseline; width: auto;&quot;&gt;&lt;div class=&quot;line number1 index0 alt2&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;lt;?php&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number2 index1 alt1&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;undefined spaces&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;nbsp;&lt;/code&gt;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;line number3 index2 alt2&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;comments&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #008200; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;// Select query&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number4 index3 alt1&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;variable&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #aa7700; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;$stmt&lt;/code&gt; &lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;= &lt;/code&gt;&lt;code class=&quot;variable&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #aa7700; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;$db&lt;/code&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;-&amp;gt;query(&lt;/code&gt;&lt;code class=&quot;string&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: blue; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&#39;SELECT * FROM `data_table`&#39;&lt;/code&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;);&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number5 index4 alt2&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;undefined spaces&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;nbsp;&lt;/code&gt;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;line number6 index5 alt1&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;comments&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #008200; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;// fetchAll is used&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number7 index6 alt2&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;variable&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #aa7700; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;$my_results&lt;/code&gt; &lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;= &lt;/code&gt;&lt;code class=&quot;variable&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #aa7700; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;$stmt&lt;/code&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;-&amp;gt;fetchAll(PDO::FETCH_ASSOC);&amp;nbsp;&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number8 index7 alt1&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;?&amp;gt;&lt;/code&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;background-color: white; border: 0px; box-sizing: border-box; color: #273239; font-family: urw-din, sans-serif; font-size: 17px; letter-spacing: 0.162px; margin: 0px 0px 10px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border: 0px; box-sizing: border-box; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;API Support:&lt;/strong&gt;&amp;nbsp;When it comes to the API support, PDO provides an object-oriented approach. MySQLi provides a procedural way, much similar to the MySQL. This is the reason why developers coming from a MySQL background prefers using MySQLi. However, object-oriented programmers prefer PDO because of its compatibility with a large number of databases.&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;Thus, object-oriented programmers prefer PDO, while procedural programmers prefer MySQL and MySQLi.&lt;/p&gt;&lt;p style=&quot;background-color: white; border: 0px; box-sizing: border-box; color: #273239; font-family: urw-din, sans-serif; font-size: 17px; letter-spacing: 0.162px; margin: 0px 0px 10px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border: 0px; box-sizing: border-box; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Security:&lt;/strong&gt;&amp;nbsp;Database security is used to protect databases and the information they contain from the hackers and their attacks. Hackers generally use SQL injections to disrupt the database. Thus, security from the injections must be ensured.&lt;/p&gt;&lt;p style=&quot;background-color: white; border: 0px; box-sizing: border-box; color: #273239; font-family: urw-din, sans-serif; font-size: 17px; letter-spacing: 0.162px; margin: 0px 0px 10px; padding: 0px; vertical-align: baseline;&quot;&gt;Both PDO and MySQLi provide SQL injection security.&lt;/p&gt;&lt;p style=&quot;background-color: white; border: 0px; box-sizing: border-box; color: #273239; font-family: urw-din, sans-serif; font-size: 17px; letter-spacing: 0.162px; margin: 0px 0px 10px; padding: 0px; vertical-align: baseline;&quot;&gt;Suppose a hacker is trying to inject an SQL injection through the ‘firstname’ HTTP query parameter using the POST method:&lt;/p&gt;&lt;div class=&quot;noIdeBtnDiv&quot; style=&quot;background-color: white; border: 0px; box-sizing: border-box; color: #273239; font-family: urw-din, sans-serif; font-size: 17px; letter-spacing: 0.162px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;div class=&quot;code-block&quot; style=&quot;border: 0px; box-sizing: border-box; display: flex; flex-direction: row; margin: 0px 0px 10px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;div class=&quot;code-gutter&quot; style=&quot;border: 0px; box-sizing: border-box; flex-flow: column; margin: 0px; padding: 0px; vertical-align: baseline; width: 40px;&quot;&gt;&lt;div class=&quot;editor-buttons-container&quot; style=&quot;border: 0px; bottom: 0px; box-sizing: border-box; left: 0px; margin: 0px; padding: 0px; position: sticky; top: 120px; vertical-align: baseline; width: 40px;&quot;&gt;&lt;div class=&quot;editor-buttons&quot; style=&quot;align-items: center; border: 0px; box-sizing: border-box; display: flex; flex-flow: column; margin: 0px; padding: 6px 0px 0px; position: sticky; top: 0px; vertical-align: baseline; width: 40px; z-index: 1;&quot;&gt;&lt;div class=&quot;editor-buttons-div&quot; style=&quot;border: 0px; box-sizing: border-box; margin: 0px; padding: 0px; vertical-align: baseline;&quot; title=&quot;Run and Edit&quot;&gt;&lt;i class=&quot;gfg-icon gfg-icon_copy code-sidebar-button padding-2px copy-code-button&quot; id=&quot;copy-code-button&quot; style=&quot;background: var(--gfg-body-color); border-radius: 50%; border: 0px; box-shadow: 0 0 2px 1px var(--gfg-head-shadow); box-sizing: border-box; color: var(--color-black); cursor: pointer; display: inline-block; height: 34px; line-height: 23px; margin: 5px 0px 0px; padding: 0.15em; vertical-align: baseline; width: 34px;&quot; title=&quot;Copy Code&quot;&gt;&lt;/i&gt;&lt;p style=&quot;border: 0px; box-sizing: border-box; color: var(--color-black); line-height: inherit; margin: 0px 0px 10px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;/p&gt;&lt;p style=&quot;border: 0px; box-sizing: border-box; color: var(--color-black); line-height: inherit; margin: 0px 0px 10px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;/p&gt;&lt;p style=&quot;border: 0px; box-sizing: border-box; color: var(--color-black); line-height: inherit; margin: 0px 0px 10px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;i class=&quot;gfg-icon gfg-icon_dark-toggle padding-2px code-sidebar-button dark-editor-button&quot; style=&quot;background: var(--gfg-body-color); border-radius: 50%; border: 0px; box-shadow: 0 0 2px 1px var(--gfg-head-shadow); box-sizing: border-box; color: var(--color-black); cursor: pointer; display: inline-block; height: 34px; line-height: 23px; margin: 5px 0px 0px; padding: 0.15em; vertical-align: baseline; width: 34px;&quot; title=&quot;Dark Mode&quot;&gt;&lt;/i&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;code-container&quot; style=&quot;border: 0px; box-sizing: border-box; flex: 1 1 0%; margin: 0px; min-width: 0px; overflow-y: hidden; padding: 0px; vertical-align: baseline; width: 546.833px;&quot;&gt;&lt;div class=&quot;syntaxhighlighter nogutter&quot; id=&quot;highlighter_63868&quot; style=&quot;border: 0px; box-sizing: border-box; font-size: 1em; margin: 1em 0px; overflow: auto; padding: 0px; position: relative; vertical-align: baseline; width: 546.833px;&quot;&gt;&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; style=&quot;background: 0px 0px; border-collapse: collapse; border-radius: 0px; border-spacing: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: block; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.99em; height: auto; inset: auto; line-height: 1.2em; margin: 25px auto; min-height: auto; outline: 0px; overflow-x: scroll; overflow-y: hidden !important; overflow: scroll hidden; padding: 0px; position: static; table-layout: auto; vertical-align: baseline; width: 546.833px;&quot;&gt;&lt;tbody style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: 0.99em; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&lt;tr style=&quot;background-attachment: initial; background-clip: initial; background-color: var(--gfg-body-color); background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: 0.99em; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&lt;td class=&quot;code&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: 12.5pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 14px 10px; position: static; vertical-align: baseline; width: 420.865px;&quot;&gt;&lt;div class=&quot;container&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 5px; position: relative; vertical-align: baseline; width: auto;&quot;&gt;&lt;div class=&quot;line number1 index0 alt2&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;variable&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #aa7700; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;$_POST&lt;/code&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;[&lt;/code&gt;&lt;code class=&quot;string&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: blue; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&#39;firstname&#39;&lt;/code&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;] = &lt;/code&gt;&lt;code class=&quot;string&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: blue; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&quot;&#39;; DELETE FROM users; /*&quot;&lt;/code&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;p style=&quot;background-color: white; border: 0px; box-sizing: border-box; color: #273239; font-family: urw-din, sans-serif; font-size: 17px; letter-spacing: 0.162px; margin: 0px 0px 10px; padding: 0px; vertical-align: baseline;&quot;&gt;If the injection escapes, it will be added in the query “as it is”. Thus, it will delete all rows from the users table.&lt;/p&gt;&lt;p style=&quot;background-color: white; border: 0px; box-sizing: border-box; color: #273239; font-family: urw-din, sans-serif; font-size: 17px; letter-spacing: 0.162px; margin: 0px 0px 10px; padding: 0px; vertical-align: baseline;&quot;&gt;In PDO, manual escaping is there to add security.&lt;/p&gt;&lt;div class=&quot;noIdeBtnDiv&quot; style=&quot;background-color: white; border: 0px; box-sizing: border-box; color: #273239; font-family: urw-din, sans-serif; font-size: 17px; letter-spacing: 0.162px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;div class=&quot;code-block&quot; style=&quot;border: 0px; box-sizing: border-box; display: flex; flex-direction: row; margin: 0px 0px 10px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;div class=&quot;code-gutter&quot; style=&quot;border: 0px; box-sizing: border-box; flex-flow: column; margin: 0px; padding: 0px; vertical-align: baseline; width: 40px;&quot;&gt;&lt;div class=&quot;editor-buttons-container&quot; style=&quot;border: 0px; bottom: 0px; box-sizing: border-box; left: 0px; margin: 0px; padding: 0px; position: sticky; top: 120px; vertical-align: baseline; width: 40px;&quot;&gt;&lt;div class=&quot;editor-buttons&quot; style=&quot;align-items: center; border: 0px; box-sizing: border-box; display: flex; flex-flow: column; margin: 0px; padding: 6px 0px 0px; position: sticky; top: 0px; vertical-align: baseline; width: 40px; z-index: 1;&quot;&gt;&lt;div class=&quot;editor-buttons-div&quot; style=&quot;border: 0px; box-sizing: border-box; margin: 0px; padding: 0px; vertical-align: baseline;&quot; title=&quot;Run and Edit&quot;&gt;&lt;i class=&quot;gfg-icon gfg-icon_copy code-sidebar-button padding-2px copy-code-button&quot; id=&quot;copy-code-button&quot; style=&quot;background: var(--gfg-body-color); border-radius: 50%; border: 0px; box-shadow: 0 0 2px 1px var(--gfg-head-shadow); box-sizing: border-box; color: var(--color-black); cursor: pointer; display: inline-block; height: 34px; line-height: 23px; margin: 5px 0px 0px; padding: 0.15em; vertical-align: baseline; width: 34px;&quot; title=&quot;Copy Code&quot;&gt;&lt;/i&gt;&lt;p style=&quot;border: 0px; box-sizing: border-box; color: var(--color-black); line-height: inherit; margin: 0px 0px 10px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;/p&gt;&lt;p style=&quot;border: 0px; box-sizing: border-box; color: var(--color-black); line-height: inherit; margin: 0px 0px 10px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;/p&gt;&lt;p style=&quot;border: 0px; box-sizing: border-box; color: var(--color-black); line-height: inherit; margin: 0px 0px 10px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;i class=&quot;gfg-icon gfg-icon_dark-toggle padding-2px code-sidebar-button dark-editor-button&quot; style=&quot;background: var(--gfg-body-color); border-radius: 50%; border: 0px; box-shadow: 0 0 2px 1px var(--gfg-head-shadow); box-sizing: border-box; color: var(--color-black); cursor: pointer; display: inline-block; height: 34px; line-height: 23px; margin: 5px 0px 0px; padding: 0.15em; vertical-align: baseline; width: 34px;&quot; title=&quot;Dark Mode&quot;&gt;&lt;/i&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;code-container&quot; style=&quot;border: 0px; box-sizing: border-box; flex: 1 1 0%; margin: 0px; min-width: 0px; overflow-y: hidden; padding: 0px; vertical-align: baseline; width: 546.833px;&quot;&gt;&lt;div class=&quot;syntaxhighlighter nogutter&quot; id=&quot;highlighter_435167&quot; style=&quot;border: 0px; box-sizing: border-box; font-size: 1em; margin: 1em 0px; overflow: auto; padding: 0px; position: relative; vertical-align: baseline; width: 546.833px;&quot;&gt;&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; style=&quot;background: 0px 0px; border-collapse: collapse; border-radius: 0px; border-spacing: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: block; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 0.99em; height: auto; inset: auto; line-height: 1.2em; margin: 25px auto; min-height: auto; outline: 0px; overflow-x: scroll; overflow-y: hidden !important; overflow: scroll hidden; padding: 0px; position: static; table-layout: auto; vertical-align: baseline; width: 546.833px;&quot;&gt;&lt;tbody style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: 0.99em; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&lt;tr style=&quot;background-attachment: initial; background-clip: initial; background-color: var(--gfg-body-color); background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: 0.99em; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&lt;td class=&quot;code&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: 12.5pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 14px 10px; position: static; vertical-align: baseline; width: 470.219px;&quot;&gt;&lt;div class=&quot;container&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 5px; position: relative; vertical-align: baseline; width: auto;&quot;&gt;&lt;div class=&quot;line number1 index0 alt2&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;variable&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #aa7700; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;$name&lt;/code&gt; &lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;= PDO::quote(&lt;/code&gt;&lt;code class=&quot;variable&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #aa7700; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;$_POST&lt;/code&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;[&lt;/code&gt;&lt;code class=&quot;string&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: blue; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&#39;name&#39;&lt;/code&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;]);&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number2 index1 alt1&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;variable&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #aa7700; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;$pdo&lt;/code&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;-&amp;gt;query(&lt;/code&gt;&lt;code class=&quot;string&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: blue; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&quot;SELECT * FROM users WHERE name = $name&quot;&lt;/code&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;);&lt;/code&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;p style=&quot;background-color: white; border: 0px; box-sizing: border-box; color: #273239; font-family: urw-din, sans-serif; font-size: 17px; letter-spacing: 0.162px; margin: 0px 0px 10px; padding: 0px; vertical-align: baseline;&quot;&gt;The difference between PDO::quote() and mysqli_real_escape_string() is that the former escapes the string and the quote, while the latter will only escape the string and the quotes will have to be added manually.&lt;/p&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlinfodata.blogspot.com/feeds/4867096026028237167/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sqlinfodata.blogspot.com/2021/12/what-is-difference-between-mysql-mysqli.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2706799863772725741/posts/default/4867096026028237167'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2706799863772725741/posts/default/4867096026028237167'/><link rel='alternate' type='text/html' href='http://sqlinfodata.blogspot.com/2021/12/what-is-difference-between-mysql-mysqli.html' title='What is the difference between MySQL, MySQLi and PDO?'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2706799863772725741.post-3923621718966840585</id><published>2021-12-20T07:41:00.002-08:00</published><updated>2021-12-20T07:42:03.226-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><category scheme="http://www.blogger.com/atom/ns#" term="PHP Functions"/><category scheme="http://www.blogger.com/atom/ns#" term="PHP Interview questions"/><category scheme="http://www.blogger.com/atom/ns#" term="php variables"/><title type='text'>The Difference Between Abstract Class and Interface in PHP</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h2 style=&quot;background-color: white; box-sizing: border-box; color: #212121; font-family: Roboto, sans-serif; font-size: 24px; font-weight: 400; line-height: 1.1; margin-bottom: 0px; margin-top: 0px;&quot;&gt;Introduction&amp;nbsp;&lt;/h2&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #212121; font-family: &amp;quot;open sans&amp;quot;, sans-serif; font-size: 16px;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #212121; font-family: &amp;quot;open sans&amp;quot;, sans-serif; font-size: 16px;&quot;&gt;Before diving deep into the difference between abstract class and interface&lt;strong style=&quot;box-sizing: border-box;&quot;&gt;,&amp;nbsp;&lt;/strong&gt;you must understand one basic thing: these are two completely different classes that cannot be used as an alternative to one another.&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #212121; font-family: &amp;quot;open sans&amp;quot;, sans-serif; font-size: 16px;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #212121; font-family: &amp;quot;open sans&amp;quot;, sans-serif; font-size: 16px;&quot;&gt;Interface classes completely empty the shells while expecting child classes to implement everything for them. Abstract classes not only contain the common piece of information between the shells inside but also expect the child classes within to fill in the gaps.&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #212121; font-family: &amp;quot;open sans&amp;quot;, sans-serif; font-size: 16px;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #212121; font-family: &amp;quot;open sans&amp;quot;, sans-serif; font-size: 16px;&quot;&gt;Let us dive in a bit deeper to actually understand the difference minutely.&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #212121; font-family: &amp;quot;open sans&amp;quot;, sans-serif; font-size: 16px;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #212121; font-family: &amp;quot;open sans&amp;quot;, sans-serif; font-size: 16px;&quot;&gt;If you want to read about PHP Array questions then you can visit here. This will help you crack your PHP interviews.&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #212121; font-family: &amp;quot;open sans&amp;quot;, sans-serif; font-size: 16px;&quot;&gt;&lt;br /&gt;&lt;span&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #212121; font-family: &amp;quot;open sans&amp;quot;, sans-serif; font-size: 16px;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;h2 style=&quot;background-color: white; box-sizing: border-box; color: #212121; font-family: Roboto, sans-serif; font-size: 24px; font-weight: 400; line-height: 1.1; margin-bottom: 0px; margin-top: 0px;&quot;&gt;Interface Class&lt;/h2&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #212121; font-family: &amp;quot;open sans&amp;quot;, sans-serif; font-size: 16px;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #212121; font-family: &amp;quot;open sans&amp;quot;, sans-serif; font-size: 16px;&quot;&gt;As we already know, an interface is actually defined by an interface keyword where all the methods are abstract. In addition to this, all the methods declared in this type of class must be declared in public which reflects the true nature of an interface.&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #212121; font-family: &amp;quot;open sans&amp;quot;, sans-serif; font-size: 16px;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #212121; font-family: &amp;quot;open sans&amp;quot;, sans-serif; font-size: 16px;&quot;&gt;Let&#39;s help to demonstrate that with an example:&lt;/div&gt;&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: #e7e5dc; box-sizing: border-box; color: #212121; font-family: Consolas, &amp;quot;Courier New&amp;quot;, Courier, mono, serif; font-size: 16px; margin: 18px 0px; overflow: auto; padding-top: 1px; width: 762.396px;&quot;&gt;&lt;div class=&quot;bar&quot; style=&quot;box-sizing: border-box; padding-left: 45px;&quot;&gt;&lt;/div&gt;&lt;ol class=&quot;dp-c&quot; start=&quot;1&quot; style=&quot;background-color: white; border: none; box-sizing: border-box; color: #5c5c5c; list-style-image: initial; list-style-position: initial; margin: 0px 0px 1px 45px; padding: 0px;&quot;&gt;&lt;li class=&quot;alt&quot; style=&quot;border-bottom: none; border-image: initial; border-left: 3px solid rgb(108, 226, 108); border-right: none; border-top: none; box-sizing: border-box; color: inherit; line-height: 18px; list-style-image: initial; list-style-position: outside !important; list-style-type: decimal-leading-zero; list-style: outside decimal-leading-zero; margin: 0px; padding: 0px 3px 0px 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; border: none; box-sizing: border-box; color: black; margin: 0px; padding: 0px;&quot;&gt;&lt;span class=&quot;keyword&quot; style=&quot;background-color: inherit; border: none; box-sizing: border-box; color: #006699; font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;interface&lt;/span&gt;&lt;span style=&quot;background-color: inherit; border: none; box-sizing: border-box; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp;Logger&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;background-color: #f8f8f8; border-bottom: none; border-image: initial; border-left: 3px solid rgb(108, 226, 108); border-right: none; border-top: none; box-sizing: border-box; line-height: 18px; list-style-image: initial; list-style-position: outside !important; list-style-type: decimal-leading-zero; list-style: outside decimal-leading-zero; margin: 0px; padding: 0px 3px 0px 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; border: none; box-sizing: border-box; color: black; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;background-color: inherit; border: none; box-sizing: border-box; color: #006699; font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;background-color: inherit; border: none; box-sizing: border-box; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;alt&quot; style=&quot;border-bottom: none; border-image: initial; border-left: 3px solid rgb(108, 226, 108); border-right: none; border-top: none; box-sizing: border-box; color: inherit; line-height: 18px; list-style-image: initial; list-style-position: outside !important; list-style-type: decimal-leading-zero; list-style: outside decimal-leading-zero; margin: 0px; padding: 0px 3px 0px 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; border: none; box-sizing: border-box; color: black; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;background-color: inherit; border: none; box-sizing: border-box; color: #006699; font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;background-color: inherit; border: none; box-sizing: border-box; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp;execute();&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;background-color: #f8f8f8; border-bottom: none; border-image: initial; border-left: 3px solid rgb(108, 226, 108); border-right: none; border-top: none; box-sizing: border-box; line-height: 18px; list-style-image: initial; list-style-position: outside !important; list-style-type: decimal-leading-zero; list-style: outside decimal-leading-zero; margin: 0px; padding: 0px 3px 0px 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; border: none; box-sizing: border-box; color: black; margin: 0px; padding: 0px;&quot;&gt;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #212121; font-family: &amp;quot;open sans&amp;quot;, sans-serif; font-size: 16px;&quot;&gt;As you can see above, in the interface, the method body is not defined. Only the name and the parameters are being defined. Now, let&#39;s move on to the abstract class.&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #212121; font-family: &amp;quot;open sans&amp;quot;, sans-serif; font-size: 16px;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;h2 style=&quot;background-color: white; box-sizing: border-box; color: #212121; font-family: Roboto, sans-serif; font-size: 24px; font-weight: 400; line-height: 1.1; margin-bottom: 0px; margin-top: 0px;&quot;&gt;Abstract Class&lt;/h2&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #212121; font-family: &amp;quot;open sans&amp;quot;, sans-serif; font-size: 16px;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #212121; font-family: &amp;quot;open sans&amp;quot;, sans-serif; font-size: 16px;&quot;&gt;In PHP, an abstract class is one being partially implemented by any developer. It might contain at least one abstract method which is basically a method without any written code. It just contains the name and the parameters and has been marked as “abstract”.&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #212121; font-family: &amp;quot;open sans&amp;quot;, sans-serif; font-size: 16px;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #212121; font-family: &amp;quot;open sans&amp;quot;, sans-serif; font-size: 16px;&quot;&gt;By definition, an abstract class is simply a function definition whose purpose is to serve the programmer by telling them the method in question must be implemented in a child class.&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #212121; font-family: &amp;quot;open sans&amp;quot;, sans-serif; font-size: 16px;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #212121; font-family: &amp;quot;open sans&amp;quot;, sans-serif; font-size: 16px;&quot;&gt;Here is an example to demonstrate the abstract class:&lt;/div&gt;&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: #e7e5dc; box-sizing: border-box; color: #212121; font-family: Consolas, &amp;quot;Courier New&amp;quot;, Courier, mono, serif; font-size: 16px; margin: 18px 0px; overflow: auto; padding-top: 1px; width: 762.396px;&quot;&gt;&lt;div class=&quot;bar&quot; style=&quot;box-sizing: border-box; padding-left: 45px;&quot;&gt;&lt;/div&gt;&lt;ol class=&quot;dp-c&quot; start=&quot;1&quot; style=&quot;background-color: white; border: none; box-sizing: border-box; color: #5c5c5c; list-style-image: initial; list-style-position: initial; margin: 0px 0px 1px 45px; padding: 0px;&quot;&gt;&lt;li class=&quot;alt&quot; style=&quot;border-bottom: none; border-image: initial; border-left: 3px solid rgb(108, 226, 108); border-right: none; border-top: none; box-sizing: border-box; color: inherit; line-height: 18px; list-style-image: initial; list-style-position: outside !important; list-style-type: decimal-leading-zero; list-style: outside decimal-leading-zero; margin: 0px; padding: 0px 3px 0px 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; border: none; box-sizing: border-box; color: black; margin: 0px; padding: 0px;&quot;&gt;&lt;span class=&quot;keyword&quot; style=&quot;background-color: inherit; border: none; box-sizing: border-box; color: #006699; font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;abstract&lt;/span&gt;&lt;span style=&quot;background-color: inherit; border: none; box-sizing: border-box; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;keyword&quot; style=&quot;background-color: inherit; border: none; box-sizing: border-box; color: #006699; font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;background-color: inherit; border: none; box-sizing: border-box; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp;AbstractClass&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;background-color: #f8f8f8; border-bottom: none; border-image: initial; border-left: 3px solid rgb(108, 226, 108); border-right: none; border-top: none; box-sizing: border-box; line-height: 18px; list-style-image: initial; list-style-position: outside !important; list-style-type: decimal-leading-zero; list-style: outside decimal-leading-zero; margin: 0px; padding: 0px 3px 0px 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; border: none; box-sizing: border-box; color: black; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;background-color: inherit; border: none; box-sizing: border-box; color: #006699; font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;abstract&lt;/span&gt;&lt;span style=&quot;background-color: inherit; border: none; box-sizing: border-box; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;keyword&quot; style=&quot;background-color: inherit; border: none; box-sizing: border-box; color: #006699; font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;protected&lt;/span&gt;&lt;span style=&quot;background-color: inherit; border: none; box-sizing: border-box; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;alt&quot; style=&quot;border-bottom: none; border-image: initial; border-left: 3px solid rgb(108, 226, 108); border-right: none; border-top: none; box-sizing: border-box; color: inherit; line-height: 18px; list-style-image: initial; list-style-position: outside !important; list-style-type: decimal-leading-zero; list-style: outside decimal-leading-zero; margin: 0px; padding: 0px 3px 0px 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; border: none; box-sizing: border-box; color: black; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;background-color: inherit; border: none; box-sizing: border-box; color: #006699; font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;background-color: inherit; border: none; box-sizing: border-box; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp;getValue();&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;background-color: #f8f8f8; border-bottom: none; border-image: initial; border-left: 3px solid rgb(108, 226, 108); border-right: none; border-top: none; box-sizing: border-box; line-height: 18px; list-style-image: initial; list-style-position: outside !important; list-style-type: decimal-leading-zero; list-style: outside decimal-leading-zero; margin: 0px; padding: 0px 3px 0px 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; border: none; box-sizing: border-box; color: black; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;background-color: inherit; border: none; box-sizing: border-box; color: #006699; font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;background-color: inherit; border: none; box-sizing: border-box; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;alt&quot; style=&quot;border-bottom: none; border-image: initial; border-left: 3px solid rgb(108, 226, 108); border-right: none; border-top: none; box-sizing: border-box; color: inherit; line-height: 18px; list-style-image: initial; list-style-position: outside !important; list-style-type: decimal-leading-zero; list-style: outside decimal-leading-zero; margin: 0px; padding: 0px 3px 0px 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; border: none; box-sizing: border-box; color: black; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;background-color: inherit; border: none; box-sizing: border-box; color: #006699; font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;background-color: inherit; border: none; box-sizing: border-box; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp;printOut()&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;background-color: #f8f8f8; border-bottom: none; border-image: initial; border-left: 3px solid rgb(108, 226, 108); border-right: none; border-top: none; box-sizing: border-box; line-height: 18px; list-style-image: initial; list-style-position: outside !important; list-style-type: decimal-leading-zero; list-style: outside decimal-leading-zero; margin: 0px; padding: 0px 3px 0px 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; border: none; box-sizing: border-box; color: black; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;print&amp;nbsp;$&lt;span class=&quot;keyword&quot; style=&quot;background-color: inherit; border: none; box-sizing: border-box; color: #006699; font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;this&lt;/span&gt;&lt;span style=&quot;background-color: inherit; border: none; box-sizing: border-box; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp;-&amp;nbsp;&amp;gt;&amp;nbsp;getValue().&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;alt&quot; style=&quot;border-bottom: none; border-image: initial; border-left: 3px solid rgb(108, 226, 108); border-right: none; border-top: none; box-sizing: border-box; color: inherit; line-height: 18px; list-style-image: initial; list-style-position: outside !important; list-style-type: decimal-leading-zero; list-style: outside decimal-leading-zero; margin: 0px; padding: 0px 3px 0px 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; border: none; box-sizing: border-box; color: black; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;string&quot; style=&quot;background-color: inherit; border: none; box-sizing: border-box; color: blue; margin: 0px; padding: 0px;&quot;&gt;&quot;\n&quot;&lt;/span&gt;&lt;span style=&quot;background-color: inherit; border: none; box-sizing: border-box; margin: 0px; padding: 0px;&quot;&gt;;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;background-color: #f8f8f8; border-bottom: none; border-image: initial; border-left: 3px solid rgb(108, 226, 108); border-right: none; border-top: none; box-sizing: border-box; line-height: 18px; list-style-image: initial; list-style-position: outside !important; list-style-type: decimal-leading-zero; list-style: outside decimal-leading-zero; margin: 0px; padding: 0px 3px 0px 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; border: none; box-sizing: border-box; color: black; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;alt&quot; style=&quot;border-bottom: none; border-image: initial; border-left: 3px solid rgb(108, 226, 108); border-right: none; border-top: none; box-sizing: border-box; color: inherit; line-height: 18px; list-style-image: initial; list-style-position: outside !important; list-style-type: decimal-leading-zero; list-style: outside decimal-leading-zero; margin: 0px; padding: 0px 3px 0px 10px;&quot;&gt;&lt;span style=&quot;background-color: inherit; border: none; box-sizing: border-box; color: black; margin: 0px; padding: 0px;&quot;&gt;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #212121; font-family: &amp;quot;open sans&amp;quot;, sans-serif; font-size: 16px;&quot;&gt;Now that you have been acquainted with what is an abstract an interface class, its time to delve into their differences, step by step.&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #212121; font-family: &amp;quot;open sans&amp;quot;, sans-serif; font-size: 16px;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #212121; font-family: &amp;quot;open sans&amp;quot;, sans-serif; font-size: 16px;&quot;&gt;Here’s a table depicting the difference between abstract and interface class in PHP.&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #212121; font-family: &amp;quot;open sans&amp;quot;, sans-serif; font-size: 16px;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #212121; font-family: &amp;quot;open sans&amp;quot;, sans-serif; font-size: 16px;&quot;&gt;&lt;table bgcolor=&quot;#ffffff&quot; border=&quot;1&quot; cellspacing=&quot;1&quot; style=&quot;border-collapse: collapse; color: #333333; outline: 0px; width: 100%px;&quot;&gt;&lt;tbody style=&quot;box-sizing: border-box; outline: 0px;&quot;&gt;&lt;tr bgcolor=&quot;#0270bf&quot; style=&quot;box-sizing: border-box; outline: 0px;&quot;&gt;&lt;td style=&quot;border: 1px dashed rgb(171, 171, 171); box-sizing: border-box;&quot;&gt;&lt;div style=&quot;box-sizing: border-box; font-size: 16px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: white;&quot;&gt;Interface Class&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;border: 1px dashed rgb(171, 171, 171); box-sizing: border-box;&quot;&gt;&lt;div style=&quot;box-sizing: border-box; font-size: 16px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: white;&quot;&gt;Abstract Class&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box;&quot;&gt;&lt;td style=&quot;border: 1px dashed rgb(171, 171, 171); box-sizing: border-box;&quot;&gt;&lt;div style=&quot;box-sizing: border-box; font-size: 16px;&quot;&gt;Interface class supports multiple inheritance feature&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;border: 1px dashed rgb(171, 171, 171); box-sizing: border-box;&quot;&gt;&lt;div style=&quot;box-sizing: border-box; font-size: 16px;&quot;&gt;Abstract class does not support multiple inheritances.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box;&quot;&gt;&lt;td style=&quot;border: 1px dashed rgb(171, 171, 171); box-sizing: border-box;&quot;&gt;&lt;div style=&quot;box-sizing: border-box; font-size: 16px;&quot;&gt;This does not contain a data member.&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;border: 1px dashed rgb(171, 171, 171); box-sizing: border-box;&quot;&gt;&lt;div style=&quot;box-sizing: border-box; font-size: 16px;&quot;&gt;Abstract class does contain a data member.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box;&quot;&gt;&lt;td style=&quot;border: 1px dashed rgb(171, 171, 171); box-sizing: border-box;&quot;&gt;&lt;div style=&quot;box-sizing: border-box; font-size: 16px;&quot;&gt;The interface does not allow containers.&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;border: 1px dashed rgb(171, 171, 171); box-sizing: border-box;&quot;&gt;&lt;div style=&quot;box-sizing: border-box; font-size: 16px;&quot;&gt;The abstract class supports containers.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box;&quot;&gt;&lt;td style=&quot;border: 1px dashed rgb(171, 171, 171); box-sizing: border-box;&quot;&gt;&lt;div style=&quot;box-sizing: border-box; font-size: 16px;&quot;&gt;An interface class only contains incomplete members which refer to the signature of the member.&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;border: 1px dashed rgb(171, 171, 171); box-sizing: border-box;&quot;&gt;&lt;div style=&quot;box-sizing: border-box; font-size: 16px;&quot;&gt;Abstract class contains both incomplete(i.e. abstract) and complete members.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box;&quot;&gt;&lt;td style=&quot;border: 1px dashed rgb(171, 171, 171); box-sizing: border-box;&quot;&gt;&lt;div style=&quot;box-sizing: border-box; font-size: 16px;&quot;&gt;Since everything is assumed to be public, an interface class does not have access modifiers by default.&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;border: 1px dashed rgb(171, 171, 171); box-sizing: border-box;&quot;&gt;&lt;div style=&quot;box-sizing: border-box; font-size: 16px;&quot;&gt;An abstract class can contain access modifiers within subs, functions, and properties.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box;&quot;&gt;&lt;td style=&quot;border: 1px dashed rgb(171, 171, 171); box-sizing: border-box;&quot;&gt;&lt;div style=&quot;box-sizing: border-box; font-size: 16px;&quot;&gt;Any member of an interface cannot be static.&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;border: 1px dashed rgb(171, 171, 171); box-sizing: border-box;&quot;&gt;&lt;div style=&quot;box-sizing: border-box; font-size: 16px;&quot;&gt;Only a complete member of the abstract class can be static.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #212121; font-family: &amp;quot;open sans&amp;quot;, sans-serif; font-size: 16px;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;h2 style=&quot;background-color: white; box-sizing: border-box; color: #212121; font-family: Roboto, sans-serif; font-size: 24px; font-weight: 400; line-height: 1.1; margin-bottom: 0px; margin-top: 0px;&quot;&gt;Conclusion&amp;nbsp;&lt;/h2&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #212121; font-family: &amp;quot;open sans&amp;quot;, sans-serif; font-size: 16px;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #212121; font-family: &amp;quot;open sans&amp;quot;, sans-serif; font-size: 16px;&quot;&gt;Now that you have learned abstract class and interface differences, it will be much easier to implement them on your project.&amp;nbsp;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlinfodata.blogspot.com/feeds/3923621718966840585/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sqlinfodata.blogspot.com/2021/12/the-difference-between-abstract-class.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2706799863772725741/posts/default/3923621718966840585'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2706799863772725741/posts/default/3923621718966840585'/><link rel='alternate' type='text/html' href='http://sqlinfodata.blogspot.com/2021/12/the-difference-between-abstract-class.html' title='The Difference Between Abstract Class and Interface in PHP'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2706799863772725741.post-3814239455220232768</id><published>2021-12-18T08:15:00.001-08:00</published><updated>2021-12-18T08:15:08.798-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Database"/><category scheme="http://www.blogger.com/atom/ns#" term="DBMS"/><category scheme="http://www.blogger.com/atom/ns#" term="MySQL"/><category scheme="http://www.blogger.com/atom/ns#" term="MySQL Indexes"/><category scheme="http://www.blogger.com/atom/ns#" term="MySQL Primary Key Optimization"/><title type='text'>What is a foreign key? Write a query to implement the same in MySQL.</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;span style=&quot;background-color: white; font-family: proxima_novaregular; font-size: 20px;&quot;&gt;A foreign key is used to connect two tables. A FOREIGN KEY is a field (or assortment of it) in one table that alludes to the PRIMARY KEY in another table. The FOREIGN KEY requirement is utilised to forestall activities that would crush joins between tables.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;-webkit-font-smoothing: antialiased; background-color: white; box-sizing: inherit; font-family: proxima_novaregular; font-size: 20px; line-height: 1.75; margin: 0px 0px 30px; padding: 0px;&quot;&gt;&lt;span data-preserver-spaces=&quot;true&quot; style=&quot;box-sizing: inherit; margin: 0px; padding: 0px;&quot;&gt;To assign a foreign key, it is important to mention it while creating the table. It can be assigned by invoking the FOREIGN KEY query. Something like this:&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;-webkit-font-smoothing: antialiased; background-color: white; box-sizing: inherit; font-family: proxima_novaregular; font-size: 20px; line-height: 1.75; margin: 0px 0px 30px; padding: 0px;&quot;&gt;&lt;span data-preserver-spaces=&quot;true&quot; style=&quot;box-sizing: inherit; margin: 0px; padding: 0px;&quot;&gt;FOREIGN KEY (Any_ID) REFERENCES Table_to_reference(Any_ID)&lt;/span&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlinfodata.blogspot.com/feeds/3814239455220232768/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sqlinfodata.blogspot.com/2021/12/what-is-foreign-key-write-query-to.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2706799863772725741/posts/default/3814239455220232768'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2706799863772725741/posts/default/3814239455220232768'/><link rel='alternate' type='text/html' href='http://sqlinfodata.blogspot.com/2021/12/what-is-foreign-key-write-query-to.html' title='What is a foreign key? Write a query to implement the same in MySQL.'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2706799863772725741.post-6954153134609426812</id><published>2021-12-18T08:13:00.005-08:00</published><updated>2021-12-18T08:13:38.223-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Database"/><category scheme="http://www.blogger.com/atom/ns#" term="DBMS"/><category scheme="http://www.blogger.com/atom/ns#" term="MySQL"/><category scheme="http://www.blogger.com/atom/ns#" term="MySQL Indexes"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL"/><title type='text'>Write a query for a column addition in MySQL</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;span style=&quot;background-color: white; font-family: proxima_novaregular; font-size: 20px;&quot;&gt;For this, an ALTER TABLE query is required. Once invoked, simply mention the column and its definition. Something like this:&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;-webkit-font-smoothing: antialiased; background-color: white; box-sizing: inherit; font-family: proxima_novaregular; font-size: 20px; line-height: 1.75; margin: 0px 0px 30px; padding: 0px;&quot;&gt;&lt;span data-preserver-spaces=&quot;true&quot; style=&quot;box-sizing: inherit; margin: 0px; padding: 0px;&quot;&gt;ALTER TABLE cars&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;-webkit-font-smoothing: antialiased; background-color: white; box-sizing: inherit; font-family: proxima_novaregular; font-size: 20px; line-height: 1.75; margin: 0px 0px 30px; padding: 0px;&quot;&gt;&lt;span data-preserver-spaces=&quot;true&quot; style=&quot;box-sizing: inherit; margin: 0px; padding: 0px;&quot;&gt;ADD COLUMN engine VARCHAR(80) AFTER colour;&lt;/span&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlinfodata.blogspot.com/feeds/6954153134609426812/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sqlinfodata.blogspot.com/2021/12/write-query-for-column-addition-in-mysql.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2706799863772725741/posts/default/6954153134609426812'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2706799863772725741/posts/default/6954153134609426812'/><link rel='alternate' type='text/html' href='http://sqlinfodata.blogspot.com/2021/12/write-query-for-column-addition-in-mysql.html' title='Write a query for a column addition in MySQL'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2706799863772725741.post-638039848532284306</id><published>2021-12-18T08:11:00.003-08:00</published><updated>2023-04-14T21:11:01.119-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Database"/><category scheme="http://www.blogger.com/atom/ns#" term="DBMS"/><category scheme="http://www.blogger.com/atom/ns#" term="MySQL"/><category scheme="http://www.blogger.com/atom/ns#" term="MySQL Indexes"/><category scheme="http://www.blogger.com/atom/ns#" term="Sql Interview Questions"/><title type='text'>What are the tables in MySQL? Explain the types.</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;span data-preserver-spaces=&quot;true&quot; style=&quot;box-sizing: inherit; font-family: proxima_novaregular; font-size: 20px; margin: 0px; padding: 0px;&quot;&gt;This is a must-know&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: inherit; font-family: proxima_novaregular; font-size: 20px; font-weight: 600; margin: 0px; padding: 0px;&quot;&gt;MySQL interview question&lt;/span&gt;&lt;span data-preserver-spaces=&quot;true&quot; style=&quot;box-sizing: inherit; font-family: proxima_novaregular; font-size: 20px; margin: 0px; padding: 0px;&quot;&gt;. Let’s see the answer-&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;-webkit-font-smoothing: antialiased; background-color: white; box-sizing: inherit; font-family: proxima_novaregular; font-size: 20px; line-height: 1.75; margin: 0px 0px 30px; padding: 0px;&quot;&gt;&lt;span data-preserver-spaces=&quot;true&quot; style=&quot;box-sizing: inherit; margin: 0px; padding: 0px;&quot;&gt;MySQL stores everything in logical tables. Tables can be thought of as the core storage structure of MySQL. And hence tables are also known as storage engines. Here are the storage engines provided by MySQL:&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;-webkit-font-smoothing: antialiased; background-color: white; box-sizing: inherit; font-family: proxima_novaregular; font-size: 20px; line-height: 1.75; margin: 0px 0px 30px; padding: 0px;&quot;&gt;&lt;span data-preserver-spaces=&quot;true&quot; style=&quot;box-sizing: inherit; margin: 0px; padding: 0px;&quot;&gt;·&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: inherit; font-weight: 600; margin: 0px; padding: 0px;&quot;&gt;MyISAM&lt;/span&gt;&lt;span data-preserver-spaces=&quot;true&quot; style=&quot;box-sizing: inherit; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp;– MyISAM is the default storage engine for MySQL. It extends the former ISAM storage engine. MyISAM offers big storage, up to 256TB! The tables can also be compressed to get extra storage. MyISAM tables are not transaction-safe.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;-webkit-font-smoothing: antialiased; background-color: white; box-sizing: inherit; font-family: proxima_novaregular; font-size: 20px; line-height: 1.75; margin: 0px 0px 30px; padding: 0px;&quot;&gt;&lt;span data-preserver-spaces=&quot;true&quot; style=&quot;box-sizing: inherit; margin: 0px; padding: 0px;&quot;&gt;·&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: inherit; font-weight: 600; margin: 0px; padding: 0px;&quot;&gt;MERGE&lt;/span&gt;&lt;span data-preserver-spaces=&quot;true&quot; style=&quot;box-sizing: inherit; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp;– A MERGE table is a virtual table that consolidates different MyISAM tables that have a comparable structure to one table. MERGE tables use the indexes of the base tables, as they do not have indexes of their own.&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;p&gt;&lt;/p&gt;&lt;p style=&quot;-webkit-font-smoothing: antialiased; background-color: white; box-sizing: inherit; font-family: proxima_novaregular; font-size: 20px; line-height: 1.75; margin: 0px 0px 30px; padding: 0px;&quot;&gt;&lt;span data-preserver-spaces=&quot;true&quot; style=&quot;box-sizing: inherit; margin: 0px; padding: 0px;&quot;&gt;·&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: inherit; font-weight: 600; margin: 0px; padding: 0px;&quot;&gt;ARCHIVE&lt;/span&gt;&lt;span data-preserver-spaces=&quot;true&quot; style=&quot;box-sizing: inherit; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp;– As the name suggests, Archive helps in archiving the tables by compressing them, in-turn reducing the storage space. Hence, you can store a lot of records with the Archive. It uses the compression-decompression procedure while writing and reading the table records. It is done using the Zlib library.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;-webkit-font-smoothing: antialiased; background-color: white; box-sizing: inherit; font-family: proxima_novaregular; font-size: 20px; line-height: 1.75; margin: 0px 0px 30px; padding: 0px;&quot;&gt;&lt;span data-preserver-spaces=&quot;true&quot; style=&quot;box-sizing: inherit; margin: 0px; padding: 0px;&quot;&gt;·&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: inherit; font-weight: 600; margin: 0px; padding: 0px;&quot;&gt;CSV&lt;/span&gt;&lt;span data-preserver-spaces=&quot;true&quot; style=&quot;box-sizing: inherit; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp;– This is more like a storage format. CSV engine stores the values in the Comma-separated values (CSV) format. This engine makes it easier to migrate the tables into a non-SQL pipeline.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;-webkit-font-smoothing: antialiased; background-color: white; box-sizing: inherit; font-family: proxima_novaregular; font-size: 20px; line-height: 1.75; margin: 0px 0px 30px; padding: 0px;&quot;&gt;&lt;span data-preserver-spaces=&quot;true&quot; style=&quot;box-sizing: inherit; margin: 0px; padding: 0px;&quot;&gt;·&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: inherit; font-weight: 600; margin: 0px; padding: 0px;&quot;&gt;InnoDB&lt;/span&gt;&lt;span data-preserver-spaces=&quot;true&quot; style=&quot;box-sizing: inherit; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp;– InnoDB is the most optimal while choosing an engine to drive performance. InnoDB is a transaction-safe engine. Hence it is ACID-compliant and can efficiently restore your database to the most stable state in case of a crash.&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;!--more--&gt;&lt;p&gt;&lt;/p&gt;&lt;p style=&quot;-webkit-font-smoothing: antialiased; background-color: white; box-sizing: inherit; font-family: proxima_novaregular; font-size: 20px; line-height: 1.75; margin: 0px 0px 30px; padding: 0px;&quot;&gt;&lt;span data-preserver-spaces=&quot;true&quot; style=&quot;box-sizing: inherit; margin: 0px; padding: 0px;&quot;&gt;·&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: inherit; font-weight: 600; margin: 0px; padding: 0px;&quot;&gt;Memory&lt;/span&gt;&lt;span data-preserver-spaces=&quot;true&quot; style=&quot;box-sizing: inherit; margin: 0px; padding: 0px;&quot;&gt;– Memory tables were formerly known as HEAP. With memory tables, there can be a performance boost as the tables are stored in the memory. But it does not work with large data tables due to the same reason.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;-webkit-font-smoothing: antialiased; background-color: white; box-sizing: inherit; font-family: proxima_novaregular; font-size: 20px; line-height: 1.75; margin: 0px 0px 30px; padding: 0px;&quot;&gt;&lt;span data-preserver-spaces=&quot;true&quot; style=&quot;box-sizing: inherit; margin: 0px; padding: 0px;&quot;&gt;·&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: inherit; font-weight: 600; margin: 0px; padding: 0px;&quot;&gt;Federated&amp;nbsp;&lt;/span&gt;&lt;span data-preserver-spaces=&quot;true&quot; style=&quot;box-sizing: inherit; margin: 0px; padding: 0px;&quot;&gt;– Federated tables allow accessing remote MySQL server tables. It can be done without any third-party integration or cluster technology.&lt;/span&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlinfodata.blogspot.com/feeds/638039848532284306/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sqlinfodata.blogspot.com/2021/12/what-are-tables-in-mysql-explain-types.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2706799863772725741/posts/default/638039848532284306'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2706799863772725741/posts/default/638039848532284306'/><link rel='alternate' type='text/html' href='http://sqlinfodata.blogspot.com/2021/12/what-are-tables-in-mysql-explain-types.html' title='What are the tables in MySQL? Explain the types.'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2706799863772725741.post-2800989512797299351</id><published>2021-09-15T10:21:00.003-07:00</published><updated>2021-09-16T04:45:14.875-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="MySQL"/><category scheme="http://www.blogger.com/atom/ns#" term="MySQL Indexes"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL"/><category scheme="http://www.blogger.com/atom/ns#" term="Sql Interview Questions"/><title type='text'>How To Delete Duplicate Rows in MySQL</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;span face=&quot;-apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, Oxygen-Sans, Ubuntu, Cantarell, &amp;quot;Helvetica Neue&amp;quot;, sans-serif&quot; style=&quot;font-size: 16px; font-weight: bolder;&quot;&gt;Summary&lt;/span&gt;&lt;span face=&quot;-apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, Oxygen-Sans, Ubuntu, Cantarell, &amp;quot;Helvetica Neue&amp;quot;, sans-serif&quot; style=&quot;background-color: white; font-size: 16px;&quot;&gt;: in this tutorial, you will learn various ways to delete duplicate rows in MySQL.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, Oxygen-Sans, Ubuntu, Cantarell, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 16px;&quot;&gt;In the previous tutorial, we have shown you how to&amp;nbsp;&lt;a href=&quot;https://www.mysqltutorial.org/mysql-find-duplicate-values/&quot; style=&quot;background-color: transparent; text-decoration-line: none;&quot;&gt;find duplicate values in a table&lt;/a&gt;. Once the duplicates rows are identified, you may want to delete them to clean up your data.&lt;/p&gt;&lt;h2 style=&quot;background-color: white; color: var(--heading-color); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, Oxygen-Sans, Ubuntu, Cantarell, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 1.5rem; font-weight: 400; margin-bottom: 1rem; padding: 0px;&quot;&gt;Prepare sample data&lt;/h2&gt;&lt;p style=&quot;background-color: white; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, Oxygen-Sans, Ubuntu, Cantarell, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 16px;&quot;&gt;The following script&amp;nbsp;&lt;a href=&quot;https://www.mysqltutorial.org/mysql-create-table/&quot; style=&quot;background-color: transparent; text-decoration-line: none;&quot;&gt;creates table&lt;/a&gt;&amp;nbsp;&lt;code style=&quot;background-color: var(--inline-code-bg-color); border-radius: 3px; color: var(--inline-code-color); font-family: var(--font-family-code); font-size: 0.875rem; padding: 0.25em 0.5em;&quot;&gt;contacts&lt;/code&gt;&amp;nbsp;and&amp;nbsp;&lt;a href=&quot;https://www.mysqltutorial.org/mysql-insert-statement.aspx&quot; style=&quot;background-color: transparent; text-decoration-line: none;&quot;&gt;inserts&amp;nbsp;&lt;/a&gt;sample data into the&amp;nbsp;&lt;code style=&quot;background-color: var(--inline-code-bg-color); border-radius: 3px; color: var(--inline-code-color); font-family: var(--font-family-code); font-size: 0.875rem; padding: 0.25em 0.5em;&quot;&gt;contacts&lt;/code&gt;&amp;nbsp;table for the demonstration.&lt;/p&gt;&lt;pre aria-describedby=&quot;shcb-language-1&quot; class=&quot;wp-block-code&quot; data-shcb-language-name=&quot;SQL (Structured Query Language)&quot; data-shcb-language-slug=&quot;sql&quot; style=&quot;background-color: white; border: 0px; font-family: monospace, monospace; font-size: 16px; padding: 0px; position: relative;&quot;&gt;&lt;div style=&quot;overflow: auto;&quot;&gt;&lt;code class=&quot;hljs language-sql&quot; style=&quot;background: rgb(51, 51, 51); box-sizing: border-box; color: white; display: block; font-family: var(--font-family-code); font-size: 0.9rem; overflow-x: auto; padding: 1rem;&quot;&gt;&lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;DROP&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;TABLE&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;IF&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;EXISTS&lt;/span&gt; contacts;

&lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;CREATE&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;TABLE&lt;/span&gt; contacts (
    &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;id&lt;/span&gt; &lt;span class=&quot;hljs-built_in&quot; style=&quot;color: #ffffaa;&quot;&gt;INT&lt;/span&gt; PRIMARY &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;KEY&lt;/span&gt; AUTO_INCREMENT,
    first_name &lt;span class=&quot;hljs-built_in&quot; style=&quot;color: #ffffaa;&quot;&gt;VARCHAR&lt;/span&gt;(&lt;span class=&quot;hljs-number&quot; style=&quot;color: #d36363;&quot;&gt;50&lt;/span&gt;) &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;NOT&lt;/span&gt; &lt;span class=&quot;hljs-literal&quot; style=&quot;color: #fcc28c;&quot;&gt;NULL&lt;/span&gt;,
    last_name &lt;span class=&quot;hljs-built_in&quot; style=&quot;color: #ffffaa;&quot;&gt;VARCHAR&lt;/span&gt;(&lt;span class=&quot;hljs-number&quot; style=&quot;color: #d36363;&quot;&gt;50&lt;/span&gt;) &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;NOT&lt;/span&gt; &lt;span class=&quot;hljs-literal&quot; style=&quot;color: #fcc28c;&quot;&gt;NULL&lt;/span&gt;, 
    email &lt;span class=&quot;hljs-built_in&quot; style=&quot;color: #ffffaa;&quot;&gt;VARCHAR&lt;/span&gt;(&lt;span class=&quot;hljs-number&quot; style=&quot;color: #d36363;&quot;&gt;255&lt;/span&gt;) &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;NOT&lt;/span&gt; &lt;span class=&quot;hljs-literal&quot; style=&quot;color: #fcc28c;&quot;&gt;NULL&lt;/span&gt;
);

&lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;INSERT&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;INTO&lt;/span&gt; contacts (first_name,last_name,email) 
&lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;VALUES&lt;/span&gt; (&lt;span class=&quot;hljs-string&quot; style=&quot;color: #a2fca2;&quot;&gt;&#39;Carine &#39;&lt;/span&gt;,&lt;span class=&quot;hljs-string&quot; style=&quot;color: #a2fca2;&quot;&gt;&#39;Schmitt&#39;&lt;/span&gt;,&lt;span class=&quot;hljs-string&quot; style=&quot;color: #a2fca2;&quot;&gt;&#39;carine.schmitt@verizon.net&#39;&lt;/span&gt;),
       (&lt;span class=&quot;hljs-string&quot; style=&quot;color: #a2fca2;&quot;&gt;&#39;Jean&#39;&lt;/span&gt;,&lt;span class=&quot;hljs-string&quot; style=&quot;color: #a2fca2;&quot;&gt;&#39;King&#39;&lt;/span&gt;,&lt;span class=&quot;hljs-string&quot; style=&quot;color: #a2fca2;&quot;&gt;&#39;jean.king@me.com&#39;&lt;/span&gt;),
       (&lt;span class=&quot;hljs-string&quot; style=&quot;color: #a2fca2;&quot;&gt;&#39;Peter&#39;&lt;/span&gt;,&lt;span class=&quot;hljs-string&quot; style=&quot;color: #a2fca2;&quot;&gt;&#39;Ferguson&#39;&lt;/span&gt;,&lt;span class=&quot;hljs-string&quot; style=&quot;color: #a2fca2;&quot;&gt;&#39;peter.ferguson@google.com&#39;&lt;/span&gt;),
       (&lt;span class=&quot;hljs-string&quot; style=&quot;color: #a2fca2;&quot;&gt;&#39;Janine &#39;&lt;/span&gt;,&lt;span class=&quot;hljs-string&quot; style=&quot;color: #a2fca2;&quot;&gt;&#39;Labrune&#39;&lt;/span&gt;,&lt;span class=&quot;hljs-string&quot; style=&quot;color: #a2fca2;&quot;&gt;&#39;janine.labrune@aol.com&#39;&lt;/span&gt;),
       (&lt;span class=&quot;hljs-string&quot; style=&quot;color: #a2fca2;&quot;&gt;&#39;Jonas &#39;&lt;/span&gt;,&lt;span class=&quot;hljs-string&quot; style=&quot;color: #a2fca2;&quot;&gt;&#39;Bergulfsen&#39;&lt;/span&gt;,&lt;span class=&quot;hljs-string&quot; style=&quot;color: #a2fca2;&quot;&gt;&#39;jonas.bergulfsen@mac.com&#39;&lt;/span&gt;),
       (&lt;span class=&quot;hljs-string&quot; style=&quot;color: #a2fca2;&quot;&gt;&#39;Janine &#39;&lt;/span&gt;,&lt;span class=&quot;hljs-string&quot; style=&quot;color: #a2fca2;&quot;&gt;&#39;Labrune&#39;&lt;/span&gt;,&lt;span class=&quot;hljs-string&quot; style=&quot;color: #a2fca2;&quot;&gt;&#39;janine.labrune@aol.com&#39;&lt;/span&gt;),
       (&lt;span class=&quot;hljs-string&quot; style=&quot;color: #a2fca2;&quot;&gt;&#39;Susan&#39;&lt;/span&gt;,&lt;span class=&quot;hljs-string&quot; style=&quot;color: #a2fca2;&quot;&gt;&#39;Nelson&#39;&lt;/span&gt;,&lt;span class=&quot;hljs-string&quot; style=&quot;color: #a2fca2;&quot;&gt;&#39;susan.nelson@comcast.net&#39;&lt;/span&gt;),
       (&lt;span class=&quot;hljs-string&quot; style=&quot;color: #a2fca2;&quot;&gt;&#39;Zbyszek &#39;&lt;/span&gt;,&lt;span class=&quot;hljs-string&quot; style=&quot;color: #a2fca2;&quot;&gt;&#39;Piestrzeniewicz&#39;&lt;/span&gt;,&lt;span class=&quot;hljs-string&quot; style=&quot;color: #a2fca2;&quot;&gt;&#39;zbyszek.piestrzeniewicz@att.net&#39;&lt;/span&gt;),
       (&lt;span class=&quot;hljs-string&quot; style=&quot;color: #a2fca2;&quot;&gt;&#39;Roland&#39;&lt;/span&gt;,&lt;span class=&quot;hljs-string&quot; style=&quot;color: #a2fca2;&quot;&gt;&#39;Keitel&#39;&lt;/span&gt;,&lt;span class=&quot;hljs-string&quot; style=&quot;color: #a2fca2;&quot;&gt;&#39;roland.keitel@yahoo.com&#39;&lt;/span&gt;),
       (&lt;span class=&quot;hljs-string&quot; style=&quot;color: #a2fca2;&quot;&gt;&#39;Julie&#39;&lt;/span&gt;,&lt;span class=&quot;hljs-string&quot; style=&quot;color: #a2fca2;&quot;&gt;&#39;Murphy&#39;&lt;/span&gt;,&lt;span class=&quot;hljs-string&quot; style=&quot;color: #a2fca2;&quot;&gt;&#39;julie.murphy@yahoo.com&#39;&lt;/span&gt;),
       (&lt;span class=&quot;hljs-string&quot; style=&quot;color: #a2fca2;&quot;&gt;&#39;Kwai&#39;&lt;/span&gt;,&lt;span class=&quot;hljs-string&quot; style=&quot;color: #a2fca2;&quot;&gt;&#39;Lee&#39;&lt;/span&gt;,&lt;span class=&quot;hljs-string&quot; style=&quot;color: #a2fca2;&quot;&gt;&#39;kwai.lee@google.com&#39;&lt;/span&gt;),
       (&lt;span class=&quot;hljs-string&quot; style=&quot;color: #a2fca2;&quot;&gt;&#39;Jean&#39;&lt;/span&gt;,&lt;span class=&quot;hljs-string&quot; style=&quot;color: #a2fca2;&quot;&gt;&#39;King&#39;&lt;/span&gt;,&lt;span class=&quot;hljs-string&quot; style=&quot;color: #a2fca2;&quot;&gt;&#39;jean.king@me.com&#39;&lt;/span&gt;),
       (&lt;span class=&quot;hljs-string&quot; style=&quot;color: #a2fca2;&quot;&gt;&#39;Susan&#39;&lt;/span&gt;,&lt;span class=&quot;hljs-string&quot; style=&quot;color: #a2fca2;&quot;&gt;&#39;Nelson&#39;&lt;/span&gt;,&lt;span class=&quot;hljs-string&quot; style=&quot;color: #a2fca2;&quot;&gt;&#39;susan.nelson@comcast.net&#39;&lt;/span&gt;),
       (&lt;span class=&quot;hljs-string&quot; style=&quot;color: #a2fca2;&quot;&gt;&#39;Roland&#39;&lt;/span&gt;,&lt;span class=&quot;hljs-string&quot; style=&quot;color: #a2fca2;&quot;&gt;&#39;Keitel&#39;&lt;/span&gt;,&lt;span class=&quot;hljs-string&quot; style=&quot;color: #a2fca2;&quot;&gt;&#39;roland.keitel@yahoo.com&#39;&lt;/span&gt;);
&lt;/code&gt;&lt;/div&gt;&lt;small class=&quot;shcb-language&quot; id=&quot;shcb-language-1&quot; style=&quot;border: 0px; clip-path: inset(50%); clip: rect(1px, 1px, 1px, 1px); font-size: 12.8px; height: 1px; margin: -1px; overflow-wrap: normal; overflow: hidden; padding: 0px; position: absolute; width: 1px; word-break: normal;&quot;&gt;&lt;span class=&quot;shcb-language__label&quot;&gt;Code language:&lt;/span&gt; &lt;span class=&quot;shcb-language__name&quot;&gt;SQL (Structured Query Language)&lt;/span&gt; &lt;span class=&quot;shcb-language__paren&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;shcb-language__slug&quot;&gt;sql&lt;/span&gt;&lt;span class=&quot;shcb-language__paren&quot;&gt;)&lt;/span&gt;&lt;/small&gt;&lt;i class=&quot;icon-copy btn-copy-code&quot; style=&quot;background-image: var(--icon-copy-url); background-repeat: no-repeat; cursor: pointer; display: block; height: 20px; margin: 0.5rem; opacity: 0; position: absolute; right: 0px; top: 0px; transition: opacity 0.2s linear 0s; width: 20px;&quot;&gt;&lt;/i&gt;&lt;/pre&gt;&lt;p style=&quot;background-color: white; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, Oxygen-Sans, Ubuntu, Cantarell, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 16px;&quot;&gt;Note that you can execute this script to recreate test data after you execute a&amp;nbsp;&lt;code style=&quot;background-color: var(--inline-code-bg-color); border-radius: 3px; color: var(--inline-code-color); font-family: var(--font-family-code); font-size: 0.875rem; padding: 0.25em 0.5em;&quot;&gt;&lt;a href=&quot;https://www.mysqltutorial.org/mysql-delete-statement.aspx&quot; style=&quot;background-color: transparent; text-decoration-line: none;&quot;&gt;DELETE&lt;/a&gt;&lt;/code&gt;&amp;nbsp;statement.&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;p&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, Oxygen-Sans, Ubuntu, Cantarell, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 16px;&quot;&gt;This query returns data from the contacts table:&lt;/p&gt;&lt;pre aria-describedby=&quot;shcb-language-2&quot; class=&quot;wp-block-code&quot; data-shcb-language-name=&quot;SQL (Structured Query Language)&quot; data-shcb-language-slug=&quot;sql&quot; style=&quot;background-color: white; border: 0px; font-family: monospace, monospace; font-size: 16px; padding: 0px; position: relative;&quot;&gt;&lt;div style=&quot;overflow: auto;&quot;&gt;&lt;code class=&quot;hljs language-sql&quot; style=&quot;background: rgb(51, 51, 51); box-sizing: border-box; color: white; display: block; font-family: var(--font-family-code); font-size: 0.9rem; overflow-x: auto; padding: 1rem;&quot;&gt;&lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;SELECT&lt;/span&gt; * &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;FROM&lt;/span&gt; contacts
&lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;ORDER&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;BY&lt;/span&gt; email;&lt;/code&gt;&lt;/div&gt;&lt;small class=&quot;shcb-language&quot; id=&quot;shcb-language-2&quot; style=&quot;border: 0px; clip-path: inset(50%); clip: rect(1px, 1px, 1px, 1px); font-size: 12.8px; height: 1px; margin: -1px; overflow-wrap: normal; overflow: hidden; padding: 0px; position: absolute; width: 1px; word-break: normal;&quot;&gt;&lt;span class=&quot;shcb-language__label&quot;&gt;Code language:&lt;/span&gt; &lt;span class=&quot;shcb-language__name&quot;&gt;SQL (Structured Query Language)&lt;/span&gt; &lt;span class=&quot;shcb-language__paren&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;shcb-language__slug&quot;&gt;sql&lt;/span&gt;&lt;span class=&quot;shcb-language__paren&quot;&gt;)&lt;/span&gt;&lt;/small&gt;&lt;i class=&quot;icon-copy btn-copy-code&quot; style=&quot;background-image: var(--icon-copy-url); background-repeat: no-repeat; cursor: pointer; display: block; height: 20px; margin: 0.5rem; opacity: 0; position: absolute; right: 0px; top: 0px; transition: opacity 0.2s linear 0s; width: 20px;&quot;&gt;&lt;/i&gt;&lt;/pre&gt;&lt;figure class=&quot;wp-block-image&quot; style=&quot;background-color: white; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, Oxygen-Sans, Ubuntu, Cantarell, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 16px; margin: 1em 0px;&quot;&gt;&lt;img alt=&quot;&quot; class=&quot;wp-image-7811 lazyloaded&quot; data-sizes=&quot;(max-width: 415px) 100vw, 415px&quot; data-src=&quot;https://www.mysqltutorial.org/wp-content/uploads/2019/08/MySQL-Delete-Duplicate-Rows-Sample-Table.png&quot; data-srcset=&quot;https://www.mysqltutorial.org/wp-content/uploads/2019/08/MySQL-Delete-Duplicate-Rows-Sample-Table.png 415w, https://www.mysqltutorial.org/wp-content/uploads/2019/08/MySQL-Delete-Duplicate-Rows-Sample-Table-200x144.png 200w&quot; height=&quot;299&quot; sizes=&quot;(max-width: 415px) 100vw, 415px&quot; src=&quot;https://www.mysqltutorial.org/wp-content/uploads/2019/08/MySQL-Delete-Duplicate-Rows-Sample-Table.png&quot; srcset=&quot;https://www.mysqltutorial.org/wp-content/uploads/2019/08/MySQL-Delete-Duplicate-Rows-Sample-Table.png 415w, https://www.mysqltutorial.org/wp-content/uploads/2019/08/MySQL-Delete-Duplicate-Rows-Sample-Table-200x144.png 200w&quot; style=&quot;border-radius: inherit; border-style: none; filter: var(--image-filter); height: auto; max-width: 100%;&quot; width=&quot;415&quot; /&gt;&lt;/figure&gt;&lt;p style=&quot;background-color: white; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, Oxygen-Sans, Ubuntu, Cantarell, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 16px;&quot;&gt;The following query returns the duplicate emails in the&amp;nbsp;&lt;code style=&quot;background-color: var(--inline-code-bg-color); border-radius: 3px; color: var(--inline-code-color); font-family: var(--font-family-code); font-size: 0.875rem; padding: 0.25em 0.5em;&quot;&gt;contacts&lt;/code&gt;&amp;nbsp;table:&lt;/p&gt;&lt;pre aria-describedby=&quot;shcb-language-3&quot; class=&quot;wp-block-code&quot; data-shcb-language-name=&quot;SQL (Structured Query Language)&quot; data-shcb-language-slug=&quot;sql&quot; style=&quot;background-color: white; border: 0px; font-family: monospace, monospace; font-size: 16px; padding: 0px; position: relative;&quot;&gt;&lt;div style=&quot;overflow: auto;&quot;&gt;&lt;code class=&quot;hljs language-sql&quot; style=&quot;background: rgb(51, 51, 51); box-sizing: border-box; color: white; display: block; font-family: var(--font-family-code); font-size: 0.9rem; overflow-x: auto; padding: 1rem;&quot;&gt;&lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;SELECT&lt;/span&gt; 
    email, &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;COUNT&lt;/span&gt;(email)
&lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;FROM&lt;/span&gt;
    contacts
&lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;GROUP&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;BY&lt;/span&gt; 
    email
&lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;HAVING&lt;/span&gt; 
    &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;COUNT&lt;/span&gt;(email) &amp;gt; &lt;span class=&quot;hljs-number&quot; style=&quot;color: #d36363;&quot;&gt;1&lt;/span&gt;;
&lt;/code&gt;&lt;/div&gt;&lt;small class=&quot;shcb-language&quot; id=&quot;shcb-language-3&quot; style=&quot;border: 0px; clip-path: inset(50%); clip: rect(1px, 1px, 1px, 1px); font-size: 12.8px; height: 1px; margin: -1px; overflow-wrap: normal; overflow: hidden; padding: 0px; position: absolute; width: 1px; word-break: normal;&quot;&gt;&lt;span class=&quot;shcb-language__label&quot;&gt;Code language:&lt;/span&gt; &lt;span class=&quot;shcb-language__name&quot;&gt;SQL (Structured Query Language)&lt;/span&gt; &lt;span class=&quot;shcb-language__paren&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;shcb-language__slug&quot;&gt;sql&lt;/span&gt;&lt;span class=&quot;shcb-language__paren&quot;&gt;)&lt;/span&gt;&lt;/small&gt;&lt;i class=&quot;icon-copy btn-copy-code&quot; style=&quot;background-image: var(--icon-copy-url); background-repeat: no-repeat; cursor: pointer; display: block; height: 20px; margin: 0.5rem; opacity: 0; position: absolute; right: 0px; top: 0px; transition: opacity 0.2s linear 0s; width: 20px;&quot;&gt;&lt;/i&gt;&lt;/pre&gt;&lt;figure class=&quot;wp-block-image&quot; style=&quot;background-color: white; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, Oxygen-Sans, Ubuntu, Cantarell, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 16px; margin: 1em 0px;&quot;&gt;&lt;img alt=&quot;Delete duplicate rows in MySQL&quot; class=&quot;wp-image-6309 ls-is-cached lazyloaded&quot; data-sizes=&quot;(max-width: 272px) 100vw, 272px&quot; data-src=&quot;https://www.mysqltutorial.org/wp-content/uploads/2017/07/MySQL-find-duplicate-values-example.png&quot; data-srcset=&quot;https://www.mysqltutorial.org/wp-content/uploads/2017/07/MySQL-find-duplicate-values-example.png 272w, https://www.mysqltutorial.org/wp-content/uploads/2017/07/MySQL-find-duplicate-values-example-270x98.png 270w&quot; height=&quot;98&quot; sizes=&quot;(max-width: 272px) 100vw, 272px&quot; src=&quot;https://www.mysqltutorial.org/wp-content/uploads/2017/07/MySQL-find-duplicate-values-example.png&quot; srcset=&quot;https://www.mysqltutorial.org/wp-content/uploads/2017/07/MySQL-find-duplicate-values-example.png 272w, https://www.mysqltutorial.org/wp-content/uploads/2017/07/MySQL-find-duplicate-values-example-270x98.png 270w&quot; style=&quot;border-radius: inherit; border-style: none; filter: var(--image-filter); height: auto; max-width: 100%;&quot; title=&quot;Delete duplicate rows in MySQL&quot; width=&quot;272&quot; /&gt;&lt;/figure&gt;&lt;p style=&quot;background-color: white; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, Oxygen-Sans, Ubuntu, Cantarell, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 16px;&quot;&gt;As you can see, we have four rows with duplicate emails.&lt;/p&gt;&lt;h2 style=&quot;background-color: white; color: var(--heading-color); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, Oxygen-Sans, Ubuntu, Cantarell, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 1.5rem; font-weight: 400; margin-bottom: 1rem; padding: 0px;&quot;&gt;A) Delete duplicate rows using&amp;nbsp;&lt;code style=&quot;background: 0px 0px; border-radius: 0px; color: var(--heading-color); font-family: var(--font-family); font-size: 1.5rem; padding: 0px;&quot;&gt;DELETE JOIN&lt;/code&gt;&amp;nbsp;statement&lt;/h2&gt;&lt;p style=&quot;background-color: white; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, Oxygen-Sans, Ubuntu, Cantarell, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 16px;&quot;&gt;MySQL provides you with the&amp;nbsp;&lt;code style=&quot;background-color: var(--inline-code-bg-color); border-radius: 3px; color: var(--inline-code-color); font-family: var(--font-family-code); font-size: 0.875rem; padding: 0.25em 0.5em;&quot;&gt;&lt;a href=&quot;https://www.mysqltutorial.org/mysql-delete-join/&quot; style=&quot;background-color: transparent; text-decoration-line: none;&quot;&gt;DELETE JOIN&lt;/a&gt;&lt;/code&gt;&amp;nbsp;statement that allows you to remove duplicate rows quickly.&lt;/p&gt;&lt;p style=&quot;background-color: white; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, Oxygen-Sans, Ubuntu, Cantarell, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 16px;&quot;&gt;The following statement deletes duplicate rows and keeps the highest id:&lt;/p&gt;&lt;pre aria-describedby=&quot;shcb-language-4&quot; class=&quot;wp-block-code&quot; data-shcb-language-name=&quot;SQL (Structured Query Language)&quot; data-shcb-language-slug=&quot;sql&quot; style=&quot;background-color: white; border: 0px; font-family: monospace, monospace; font-size: 16px; padding: 0px; position: relative;&quot;&gt;&lt;div style=&quot;overflow: auto;&quot;&gt;&lt;code class=&quot;hljs language-sql&quot; style=&quot;background: rgb(51, 51, 51); box-sizing: border-box; color: white; display: block; font-family: var(--font-family-code); font-size: 0.9rem; overflow-x: auto; padding: 1rem;&quot;&gt;&lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;DELETE&lt;/span&gt; t1 &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;FROM&lt;/span&gt; contacts t1
&lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;INNER&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;JOIN&lt;/span&gt; contacts t2 
&lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;WHERE&lt;/span&gt; 
    t1.id &amp;lt; t2.id &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;AND&lt;/span&gt; 
    t1.email = t2.email;&lt;/code&gt;&lt;/div&gt;&lt;small class=&quot;shcb-language&quot; id=&quot;shcb-language-4&quot; style=&quot;border: 0px; clip-path: inset(50%); clip: rect(1px, 1px, 1px, 1px); font-size: 12.8px; height: 1px; margin: -1px; overflow-wrap: normal; overflow: hidden; padding: 0px; position: absolute; width: 1px; word-break: normal;&quot;&gt;&lt;span class=&quot;shcb-language__label&quot;&gt;Code language:&lt;/span&gt; &lt;span class=&quot;shcb-language__name&quot;&gt;SQL (Structured Query Language)&lt;/span&gt; &lt;span class=&quot;shcb-language__paren&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;shcb-language__slug&quot;&gt;sql&lt;/span&gt;&lt;span class=&quot;shcb-language__paren&quot;&gt;)&lt;/span&gt;&lt;/small&gt;&lt;i class=&quot;icon-copy btn-copy-code&quot; style=&quot;background-image: var(--icon-copy-url); background-repeat: no-repeat; cursor: pointer; display: block; height: 20px; margin: 0.5rem; opacity: 0; position: absolute; right: 0px; top: 0px; transition: opacity 0.2s linear 0s; width: 20px;&quot;&gt;&lt;/i&gt;&lt;/pre&gt;&lt;p style=&quot;background-color: white; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, Oxygen-Sans, Ubuntu, Cantarell, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 16px;&quot;&gt;This query references the contacts table twice, therefore, it uses the&amp;nbsp;&lt;a href=&quot;https://www.mysqltutorial.org/mysql-alias/&quot; style=&quot;background-color: transparent; text-decoration-line: none;&quot;&gt;table alias&lt;/a&gt;&amp;nbsp;t1 and t2.&lt;/p&gt;&lt;p style=&quot;background-color: white; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, Oxygen-Sans, Ubuntu, Cantarell, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 16px;&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, Oxygen-Sans, Ubuntu, Cantarell, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 16px;&quot;&gt;The output is:&lt;/p&gt;&lt;pre aria-describedby=&quot;shcb-language-5&quot; class=&quot;wp-block-code&quot; data-shcb-language-name=&quot;CSS&quot; data-shcb-language-slug=&quot;css&quot; style=&quot;background-color: white; border: 0px; font-family: monospace, monospace; font-size: 16px; padding: 0px; position: relative;&quot;&gt;&lt;div style=&quot;overflow: auto;&quot;&gt;&lt;code class=&quot;hljs language-css&quot; style=&quot;background: rgb(51, 51, 51); box-sizing: border-box; color: white; display: block; font-family: var(--font-family-code); font-size: 0.9rem; overflow-x: auto; padding: 1rem;&quot;&gt;&lt;span class=&quot;hljs-selector-tag&quot; style=&quot;color: #fcc28c;&quot;&gt;Query&lt;/span&gt; &lt;span class=&quot;hljs-selector-tag&quot; style=&quot;color: #fcc28c;&quot;&gt;OK&lt;/span&gt;, 4 &lt;span class=&quot;hljs-selector-tag&quot; style=&quot;color: #fcc28c;&quot;&gt;rows&lt;/span&gt; &lt;span class=&quot;hljs-selector-tag&quot; style=&quot;color: #fcc28c;&quot;&gt;affected&lt;/span&gt; (0&lt;span class=&quot;hljs-selector-class&quot; style=&quot;color: #ade5fc;&quot;&gt;.10&lt;/span&gt; &lt;span class=&quot;hljs-selector-tag&quot; style=&quot;color: #fcc28c;&quot;&gt;sec&lt;/span&gt;)&lt;/code&gt;&lt;/div&gt;&lt;small class=&quot;shcb-language&quot; id=&quot;shcb-language-5&quot; style=&quot;border: 0px; clip-path: inset(50%); clip: rect(1px, 1px, 1px, 1px); font-size: 12.8px; height: 1px; margin: -1px; overflow-wrap: normal; overflow: hidden; padding: 0px; position: absolute; width: 1px; word-break: normal;&quot;&gt;&lt;span class=&quot;shcb-language__label&quot;&gt;Code language:&lt;/span&gt; &lt;span class=&quot;shcb-language__name&quot;&gt;CSS&lt;/span&gt; &lt;span class=&quot;shcb-language__paren&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;shcb-language__slug&quot;&gt;css&lt;/span&gt;&lt;span class=&quot;shcb-language__paren&quot;&gt;)&lt;/span&gt;&lt;/small&gt;&lt;i class=&quot;icon-copy btn-copy-code&quot; style=&quot;background-image: var(--icon-copy-url); background-repeat: no-repeat; cursor: pointer; display: block; height: 20px; margin: 0.5rem; opacity: 0; position: absolute; right: 0px; top: 0px; transition: opacity 0.2s linear 0s; width: 20px;&quot;&gt;&lt;/i&gt;&lt;/pre&gt;&lt;p style=&quot;background-color: white; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, Oxygen-Sans, Ubuntu, Cantarell, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 16px;&quot;&gt;It indicated that four rows have been deleted. You can execute the query that find duplicate emails again to verify the delete:&lt;/p&gt;&lt;pre aria-describedby=&quot;shcb-language-6&quot; class=&quot;wp-block-code&quot; data-shcb-language-name=&quot;SQL (Structured Query Language)&quot; data-shcb-language-slug=&quot;sql&quot; style=&quot;background-color: white; border: 0px; font-family: monospace, monospace; font-size: 16px; padding: 0px; position: relative;&quot;&gt;&lt;div style=&quot;overflow: auto;&quot;&gt;&lt;code class=&quot;hljs language-sql&quot; style=&quot;background: rgb(51, 51, 51); box-sizing: border-box; color: white; display: block; font-family: var(--font-family-code); font-size: 0.9rem; overflow-x: auto; padding: 1rem;&quot;&gt;&lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;SELECT&lt;/span&gt; 
    email, 
    &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;COUNT&lt;/span&gt;(email)
&lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;FROM&lt;/span&gt;
    contacts
&lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;GROUP&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;BY&lt;/span&gt; 
    email
&lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;HAVING&lt;/span&gt; 
    &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;COUNT&lt;/span&gt;(email) &amp;gt; &lt;span class=&quot;hljs-number&quot; style=&quot;color: #d36363;&quot;&gt;1&lt;/span&gt;;
&lt;/code&gt;&lt;/div&gt;&lt;small class=&quot;shcb-language&quot; id=&quot;shcb-language-6&quot; style=&quot;border: 0px; clip-path: inset(50%); clip: rect(1px, 1px, 1px, 1px); font-size: 12.8px; height: 1px; margin: -1px; overflow-wrap: normal; overflow: hidden; padding: 0px; position: absolute; width: 1px; word-break: normal;&quot;&gt;&lt;span class=&quot;shcb-language__label&quot;&gt;Code language:&lt;/span&gt; &lt;span class=&quot;shcb-language__name&quot;&gt;SQL (Structured Query Language)&lt;/span&gt; &lt;span class=&quot;shcb-language__paren&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;shcb-language__slug&quot;&gt;sql&lt;/span&gt;&lt;span class=&quot;shcb-language__paren&quot;&gt;)&lt;/span&gt;&lt;/small&gt;&lt;i class=&quot;icon-copy btn-copy-code&quot; style=&quot;background-image: var(--icon-copy-url); background-repeat: no-repeat; cursor: pointer; display: block; height: 20px; margin: 0.5rem; opacity: 0; position: absolute; right: 0px; top: 0px; transition: opacity 0.2s linear 0s; width: 20px;&quot;&gt;&lt;/i&gt;&lt;/pre&gt;&lt;p style=&quot;background-color: white; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, Oxygen-Sans, Ubuntu, Cantarell, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 16px;&quot;&gt;The query returns an empty set, which means that the duplicate rows have been deleted.&lt;/p&gt;&lt;p style=&quot;background-color: white; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, Oxygen-Sans, Ubuntu, Cantarell, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 16px;&quot;&gt;Let’s verify data from the&amp;nbsp;&lt;code style=&quot;background-color: var(--inline-code-bg-color); border-radius: 3px; color: var(--inline-code-color); font-family: var(--font-family-code); font-size: 0.875rem; padding: 0.25em 0.5em;&quot;&gt;contacts&lt;/code&gt;&amp;nbsp;table:&lt;/p&gt;&lt;pre aria-describedby=&quot;shcb-language-7&quot; class=&quot;wp-block-code&quot; data-shcb-language-name=&quot;SQL (Structured Query Language)&quot; data-shcb-language-slug=&quot;sql&quot; style=&quot;background-color: white; border: 0px; font-family: monospace, monospace; font-size: 16px; padding: 0px; position: relative;&quot;&gt;&lt;div style=&quot;overflow: auto;&quot;&gt;&lt;code class=&quot;hljs language-sql&quot; style=&quot;background: rgb(51, 51, 51); box-sizing: border-box; color: white; display: block; font-family: var(--font-family-code); font-size: 0.9rem; overflow-x: auto; padding: 1rem;&quot;&gt;&lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;SELECT&lt;/span&gt; * &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;FROM&lt;/span&gt; contacts;
&lt;/code&gt;&lt;/div&gt;&lt;small class=&quot;shcb-language&quot; id=&quot;shcb-language-7&quot; style=&quot;border: 0px; clip-path: inset(50%); clip: rect(1px, 1px, 1px, 1px); font-size: 12.8px; height: 1px; margin: -1px; overflow-wrap: normal; overflow: hidden; padding: 0px; position: absolute; width: 1px; word-break: normal;&quot;&gt;&lt;span class=&quot;shcb-language__label&quot;&gt;Code language:&lt;/span&gt; &lt;span class=&quot;shcb-language__name&quot;&gt;SQL (Structured Query Language)&lt;/span&gt; &lt;span class=&quot;shcb-language__paren&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;shcb-language__slug&quot;&gt;sql&lt;/span&gt;&lt;span class=&quot;shcb-language__paren&quot;&gt;)&lt;/span&gt;&lt;/small&gt;&lt;i class=&quot;icon-copy btn-copy-code&quot; style=&quot;background-image: var(--icon-copy-url); background-repeat: no-repeat; cursor: pointer; display: block; height: 20px; margin: 0.5rem; opacity: 0; position: absolute; right: 0px; top: 0px; transition: opacity 0.2s linear 0s; width: 20px;&quot;&gt;&lt;/i&gt;&lt;/pre&gt;&lt;figure class=&quot;wp-block-image&quot; style=&quot;background-color: white; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, Oxygen-Sans, Ubuntu, Cantarell, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 16px; margin: 1em 0px;&quot;&gt;&lt;img alt=&quot;MySQL delete duplicate rows - DELETE JOIN keeps Highest ID&quot; class=&quot;wp-image-6315 lazyloaded&quot; data-sizes=&quot;(max-width: 384px) 100vw, 384px&quot; data-src=&quot;https://www.mysqltutorial.org/wp-content/uploads/2017/07/MySQL-delete-duplicate-rows-DELETE-JOIN-keeps-Highest-ID.png&quot; data-srcset=&quot;https://www.mysqltutorial.org/wp-content/uploads/2017/07/MySQL-delete-duplicate-rows-DELETE-JOIN-keeps-Highest-ID.png 384w, https://www.mysqltutorial.org/wp-content/uploads/2017/07/MySQL-delete-duplicate-rows-DELETE-JOIN-keeps-Highest-ID-300x170.png 300w&quot; height=&quot;217&quot; sizes=&quot;(max-width: 384px) 100vw, 384px&quot; src=&quot;https://www.mysqltutorial.org/wp-content/uploads/2017/07/MySQL-delete-duplicate-rows-DELETE-JOIN-keeps-Highest-ID.png&quot; srcset=&quot;https://www.mysqltutorial.org/wp-content/uploads/2017/07/MySQL-delete-duplicate-rows-DELETE-JOIN-keeps-Highest-ID.png 384w, https://www.mysqltutorial.org/wp-content/uploads/2017/07/MySQL-delete-duplicate-rows-DELETE-JOIN-keeps-Highest-ID-300x170.png 300w&quot; style=&quot;border-radius: inherit; border-style: none; filter: var(--image-filter); height: auto; max-width: 100%;&quot; title=&quot;MySQL delete duplicate rows - DELETE JOIN keeps Highest ID&quot; width=&quot;384&quot; /&gt;&lt;/figure&gt;&lt;p style=&quot;background-color: white; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, Oxygen-Sans, Ubuntu, Cantarell, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 16px;&quot;&gt;The rows with id 2, 4, 7, and 9 have been deleted.&lt;/p&gt;&lt;p style=&quot;background-color: white; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, Oxygen-Sans, Ubuntu, Cantarell, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 16px;&quot;&gt;In case you want to delete duplicate rows and keep the lowest id, you can use the following statement:&lt;/p&gt;&lt;pre aria-describedby=&quot;shcb-language-8&quot; class=&quot;wp-block-code&quot; data-shcb-language-name=&quot;SQL (Structured Query Language)&quot; data-shcb-language-slug=&quot;sql&quot; style=&quot;background-color: white; border: 0px; font-family: monospace, monospace; font-size: 16px; padding: 0px; position: relative;&quot;&gt;&lt;div style=&quot;overflow: auto;&quot;&gt;&lt;code class=&quot;hljs language-sql&quot; style=&quot;background: rgb(51, 51, 51); box-sizing: border-box; color: white; display: block; font-family: var(--font-family-code); font-size: 0.9rem; overflow-x: auto; padding: 1rem;&quot;&gt;&lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;DELETE&lt;/span&gt; c1 &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;FROM&lt;/span&gt; contacts c1
&lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;INNER&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;JOIN&lt;/span&gt; contacts c2 
&lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;WHERE&lt;/span&gt;
    c1.id &amp;gt; c2.id &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;AND&lt;/span&gt; 
    c1.email = c2.email;
&lt;/code&gt;&lt;/div&gt;&lt;small class=&quot;shcb-language&quot; id=&quot;shcb-language-8&quot; style=&quot;border: 0px; clip-path: inset(50%); clip: rect(1px, 1px, 1px, 1px); font-size: 12.8px; height: 1px; margin: -1px; overflow-wrap: normal; overflow: hidden; padding: 0px; position: absolute; width: 1px; word-break: normal;&quot;&gt;&lt;span class=&quot;shcb-language__label&quot;&gt;Code language:&lt;/span&gt; &lt;span class=&quot;shcb-language__name&quot;&gt;SQL (Structured Query Language)&lt;/span&gt; &lt;span class=&quot;shcb-language__paren&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;shcb-language__slug&quot;&gt;sql&lt;/span&gt;&lt;span class=&quot;shcb-language__paren&quot;&gt;)&lt;/span&gt;&lt;/small&gt;&lt;i class=&quot;icon-copy btn-copy-code&quot; style=&quot;background-image: var(--icon-copy-url); background-repeat: no-repeat; cursor: pointer; display: block; height: 20px; margin: 0.5rem; opacity: 0; position: absolute; right: 0px; top: 0px; transition: opacity 0.2s linear 0s; width: 20px;&quot;&gt;&lt;/i&gt;&lt;/pre&gt;&lt;p style=&quot;background-color: white; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, Oxygen-Sans, Ubuntu, Cantarell, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 16px;&quot;&gt;Note that you can execute the script for creating&amp;nbsp;&lt;code style=&quot;background-color: var(--inline-code-bg-color); border-radius: 3px; color: var(--inline-code-color); font-family: var(--font-family-code); font-size: 0.875rem; padding: 0.25em 0.5em;&quot;&gt;contacts&lt;/code&gt;&amp;nbsp;table again and test this query. The following output shows the data of the&amp;nbsp;&lt;code style=&quot;background-color: var(--inline-code-bg-color); border-radius: 3px; color: var(--inline-code-color); font-family: var(--font-family-code); font-size: 0.875rem; padding: 0.25em 0.5em;&quot;&gt;contacts&lt;/code&gt;&amp;nbsp;table after removing duplicate rows.&lt;/p&gt;&lt;figure class=&quot;wp-block-image&quot; style=&quot;background-color: white; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, Oxygen-Sans, Ubuntu, Cantarell, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 16px; margin: 1em 0px;&quot;&gt;&lt;img alt=&quot;MySQL delete duplicate rows - DELETE JOIN keeps lowest ID&quot; class=&quot;wp-image-6316 lazyloaded&quot; data-sizes=&quot;(max-width: 387px) 100vw, 387px&quot; data-src=&quot;https://www.mysqltutorial.org/wp-content/uploads/2017/07/MySQL-delete-duplicate-rows-DELETE-JOIN-keeps-lowest-ID.png&quot; data-srcset=&quot;https://www.mysqltutorial.org/wp-content/uploads/2017/07/MySQL-delete-duplicate-rows-DELETE-JOIN-keeps-lowest-ID.png 387w, https://www.mysqltutorial.org/wp-content/uploads/2017/07/MySQL-delete-duplicate-rows-DELETE-JOIN-keeps-lowest-ID-300x169.png 300w&quot; height=&quot;218&quot; sizes=&quot;(max-width: 387px) 100vw, 387px&quot; src=&quot;https://www.mysqltutorial.org/wp-content/uploads/2017/07/MySQL-delete-duplicate-rows-DELETE-JOIN-keeps-lowest-ID.png&quot; srcset=&quot;https://www.mysqltutorial.org/wp-content/uploads/2017/07/MySQL-delete-duplicate-rows-DELETE-JOIN-keeps-lowest-ID.png 387w, https://www.mysqltutorial.org/wp-content/uploads/2017/07/MySQL-delete-duplicate-rows-DELETE-JOIN-keeps-lowest-ID-300x169.png 300w&quot; style=&quot;border-radius: inherit; border-style: none; filter: var(--image-filter); height: auto; max-width: 100%;&quot; title=&quot;MySQL delete duplicate rows - DELETE JOIN keeps lowest ID&quot; width=&quot;387&quot; /&gt;&lt;/figure&gt;&lt;h2 style=&quot;background-color: white; color: var(--heading-color); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, Oxygen-Sans, Ubuntu, Cantarell, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 1.5rem; font-weight: 400; margin-bottom: 1rem; padding: 0px;&quot;&gt;B) Delete duplicate rows using an intermediate table&lt;/h2&gt;&lt;p style=&quot;background-color: white; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, Oxygen-Sans, Ubuntu, Cantarell, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 16px;&quot;&gt;The following shows the steps for removing duplicate rows using an intermediate table:&lt;/p&gt;&lt;ol style=&quot;background-color: white; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, Oxygen-Sans, Ubuntu, Cantarell, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 16px; padding: 0px 0px 0px 1rem;&quot;&gt;&lt;li style=&quot;list-style-type: decimal; margin: 0px 0px 1rem 1rem;&quot;&gt;&lt;a href=&quot;https://www.mysqltutorial.org/mysql-create-table/&quot; style=&quot;background-color: transparent; text-decoration-line: none;&quot;&gt;Create a new table&lt;/a&gt;&amp;nbsp;with the structure the same as the original table that you want to delete duplicate rows.&lt;/li&gt;&lt;li style=&quot;list-style-type: decimal; margin: 0px 0px 1rem 1rem;&quot;&gt;&lt;a href=&quot;https://www.mysqltutorial.org/mysql-insert-statement.aspx&quot; style=&quot;background-color: transparent; text-decoration-line: none;&quot;&gt;Insert&lt;/a&gt;&amp;nbsp;distinct rows from the original table to the immediate table.&lt;/li&gt;&lt;li style=&quot;list-style-type: decimal; margin: 0px 0px 1rem 1rem;&quot;&gt;&lt;a href=&quot;https://www.mysqltutorial.org/mysql-drop-table&quot; style=&quot;background-color: transparent; text-decoration-line: none;&quot;&gt;Drop the original table&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href=&quot;https://www.mysqltutorial.org/mysql-rename-table/&quot; style=&quot;background-color: transparent; text-decoration-line: none;&quot;&gt;rename&lt;/a&gt;&amp;nbsp;the immediate table to the original table.&lt;/li&gt;&lt;/ol&gt;&lt;p style=&quot;background-color: white; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, Oxygen-Sans, Ubuntu, Cantarell, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 16px;&quot;&gt;The following queries illustrate the steps:&lt;/p&gt;&lt;p style=&quot;background-color: white; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, Oxygen-Sans, Ubuntu, Cantarell, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 16px;&quot;&gt;Step 1. Create a new table whose structure is the same as the original table:&lt;/p&gt;&lt;pre aria-describedby=&quot;shcb-language-9&quot; class=&quot;wp-block-code&quot; data-shcb-language-name=&quot;SQL (Structured Query Language)&quot; data-shcb-language-slug=&quot;sql&quot; style=&quot;background-color: white; border: 0px; font-family: monospace, monospace; font-size: 16px; padding: 0px; position: relative;&quot;&gt;&lt;div style=&quot;overflow: auto;&quot;&gt;&lt;code class=&quot;hljs language-sql&quot; style=&quot;background: rgb(51, 51, 51); box-sizing: border-box; color: white; display: block; font-family: var(--font-family-code); font-size: 0.9rem; overflow-x: auto; padding: 1rem;&quot;&gt;&lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;CREATE&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;TABLE&lt;/span&gt; source_copy &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;LIKE&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;source&lt;/span&gt;;
&lt;/code&gt;&lt;/div&gt;&lt;small class=&quot;shcb-language&quot; id=&quot;shcb-language-9&quot; style=&quot;border: 0px; clip-path: inset(50%); clip: rect(1px, 1px, 1px, 1px); font-size: 12.8px; height: 1px; margin: -1px; overflow-wrap: normal; overflow: hidden; padding: 0px; position: absolute; width: 1px; word-break: normal;&quot;&gt;&lt;span class=&quot;shcb-language__label&quot;&gt;Code language:&lt;/span&gt; &lt;span class=&quot;shcb-language__name&quot;&gt;SQL (Structured Query Language)&lt;/span&gt; &lt;span class=&quot;shcb-language__paren&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;shcb-language__slug&quot;&gt;sql&lt;/span&gt;&lt;span class=&quot;shcb-language__paren&quot;&gt;)&lt;/span&gt;&lt;/small&gt;&lt;i class=&quot;icon-copy btn-copy-code&quot; style=&quot;background-image: var(--icon-copy-url); background-repeat: no-repeat; cursor: pointer; display: block; height: 20px; margin: 0.5rem; opacity: 0; position: absolute; right: 0px; top: 0px; transition: opacity 0.2s linear 0s; width: 20px;&quot;&gt;&lt;/i&gt;&lt;/pre&gt;&lt;p style=&quot;background-color: white; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, Oxygen-Sans, Ubuntu, Cantarell, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 16px;&quot;&gt;Step 2. Insert distinct rows from the original table to the new table:&lt;/p&gt;&lt;pre aria-describedby=&quot;shcb-language-10&quot; class=&quot;wp-block-code&quot; data-shcb-language-name=&quot;SQL (Structured Query Language)&quot; data-shcb-language-slug=&quot;sql&quot; style=&quot;background-color: white; border: 0px; font-family: monospace, monospace; font-size: 16px; padding: 0px; position: relative;&quot;&gt;&lt;div style=&quot;overflow: auto;&quot;&gt;&lt;code class=&quot;hljs language-sql&quot; style=&quot;background: rgb(51, 51, 51); box-sizing: border-box; color: white; display: block; font-family: var(--font-family-code); font-size: 0.9rem; overflow-x: auto; padding: 1rem;&quot;&gt;&lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;INSERT&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;INTO&lt;/span&gt; source_copy
&lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;SELECT&lt;/span&gt; * &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;FROM&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;source&lt;/span&gt;
&lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;GROUP&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;BY&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;col&lt;/span&gt;; &lt;span class=&quot;hljs-comment&quot; style=&quot;color: #888888;&quot;&gt;-- column that has duplicate values&lt;/span&gt;
&lt;/code&gt;&lt;/div&gt;&lt;small class=&quot;shcb-language&quot; id=&quot;shcb-language-10&quot; style=&quot;border: 0px; clip-path: inset(50%); clip: rect(1px, 1px, 1px, 1px); font-size: 12.8px; height: 1px; margin: -1px; overflow-wrap: normal; overflow: hidden; padding: 0px; position: absolute; width: 1px; word-break: normal;&quot;&gt;&lt;span class=&quot;shcb-language__label&quot;&gt;Code language:&lt;/span&gt; &lt;span class=&quot;shcb-language__name&quot;&gt;SQL (Structured Query Language)&lt;/span&gt; &lt;span class=&quot;shcb-language__paren&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;shcb-language__slug&quot;&gt;sql&lt;/span&gt;&lt;span class=&quot;shcb-language__paren&quot;&gt;)&lt;/span&gt;&lt;/small&gt;&lt;i class=&quot;icon-copy btn-copy-code&quot; style=&quot;background-image: var(--icon-copy-url); background-repeat: no-repeat; cursor: pointer; display: block; height: 20px; margin: 0.5rem; opacity: 0; position: absolute; right: 0px; top: 0px; transition: opacity 0.2s linear 0s; width: 20px;&quot;&gt;&lt;/i&gt;&lt;/pre&gt;&lt;p style=&quot;background-color: white; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, Oxygen-Sans, Ubuntu, Cantarell, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 16px;&quot;&gt;Step 3. drop the original table and rename the immediate table to the original one&lt;/p&gt;&lt;pre aria-describedby=&quot;shcb-language-11&quot; class=&quot;wp-block-code&quot; data-shcb-language-name=&quot;SQL (Structured Query Language)&quot; data-shcb-language-slug=&quot;sql&quot; style=&quot;background-color: white; border: 0px; font-family: monospace, monospace; font-size: 16px; padding: 0px; position: relative;&quot;&gt;&lt;div style=&quot;overflow: auto;&quot;&gt;&lt;code class=&quot;hljs language-sql&quot; style=&quot;background: rgb(51, 51, 51); box-sizing: border-box; color: white; display: block; font-family: var(--font-family-code); font-size: 0.9rem; overflow-x: auto; padding: 1rem;&quot;&gt;&lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;DROP&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;TABLE&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;source&lt;/span&gt;;
&lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;ALTER&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;TABLE&lt;/span&gt; source_copy &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;RENAME&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;TO&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;source&lt;/span&gt;;
&lt;/code&gt;&lt;/div&gt;&lt;small class=&quot;shcb-language&quot; id=&quot;shcb-language-11&quot; style=&quot;border: 0px; clip-path: inset(50%); clip: rect(1px, 1px, 1px, 1px); font-size: 12.8px; height: 1px; margin: -1px; overflow-wrap: normal; overflow: hidden; padding: 0px; position: absolute; width: 1px; word-break: normal;&quot;&gt;&lt;span class=&quot;shcb-language__label&quot;&gt;Code language:&lt;/span&gt; &lt;span class=&quot;shcb-language__name&quot;&gt;SQL (Structured Query Language)&lt;/span&gt; &lt;span class=&quot;shcb-language__paren&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;shcb-language__slug&quot;&gt;sql&lt;/span&gt;&lt;span class=&quot;shcb-language__paren&quot;&gt;)&lt;/span&gt;&lt;/small&gt;&lt;i class=&quot;icon-copy btn-copy-code&quot; style=&quot;background-image: var(--icon-copy-url); background-repeat: no-repeat; cursor: pointer; display: block; height: 20px; margin: 0.5rem; opacity: 0; position: absolute; right: 0px; top: 0px; transition: opacity 0.2s linear 0s; width: 20px;&quot;&gt;&lt;/i&gt;&lt;/pre&gt;&lt;p style=&quot;background-color: white; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, Oxygen-Sans, Ubuntu, Cantarell, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 16px;&quot;&gt;For example, the following statements delete rows with duplicate emails from the&amp;nbsp;&lt;code style=&quot;background-color: var(--inline-code-bg-color); border-radius: 3px; color: var(--inline-code-color); font-family: var(--font-family-code); font-size: 0.875rem; padding: 0.25em 0.5em;&quot;&gt;contacts&lt;/code&gt;&amp;nbsp;table:&lt;/p&gt;&lt;pre aria-describedby=&quot;shcb-language-12&quot; class=&quot;wp-block-code&quot; data-shcb-language-name=&quot;SQL (Structured Query Language)&quot; data-shcb-language-slug=&quot;sql&quot; style=&quot;background-color: white; border: 0px; font-family: monospace, monospace; font-size: 16px; padding: 0px; position: relative;&quot;&gt;&lt;div style=&quot;overflow: auto;&quot;&gt;&lt;code class=&quot;hljs language-sql&quot; style=&quot;background: rgb(51, 51, 51); box-sizing: border-box; color: white; display: block; font-family: var(--font-family-code); font-size: 0.9rem; overflow-x: auto; padding: 1rem;&quot;&gt;&lt;span class=&quot;hljs-comment&quot; style=&quot;color: #888888;&quot;&gt;-- step 1&lt;/span&gt;
&lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;CREATE&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;TABLE&lt;/span&gt; contacts_temp 
&lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;LIKE&lt;/span&gt; contacts;

&lt;span class=&quot;hljs-comment&quot; style=&quot;color: #888888;&quot;&gt;-- step 2&lt;/span&gt;
&lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;INSERT&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;INTO&lt;/span&gt; contacts_temp
&lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;SELECT&lt;/span&gt; * 
&lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;FROM&lt;/span&gt; contacts 
&lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;GROUP&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;BY&lt;/span&gt; email;


&lt;span class=&quot;hljs-comment&quot; style=&quot;color: #888888;&quot;&gt;-- step 3&lt;/span&gt;
&lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;DROP&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;TABLE&lt;/span&gt; contacts;

&lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;ALTER&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;TABLE&lt;/span&gt; contacts_temp 
&lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;RENAME&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;TO&lt;/span&gt; contacts;
&lt;/code&gt;&lt;/div&gt;&lt;small class=&quot;shcb-language&quot; id=&quot;shcb-language-12&quot; style=&quot;border: 0px; clip-path: inset(50%); clip: rect(1px, 1px, 1px, 1px); font-size: 12.8px; height: 1px; margin: -1px; overflow-wrap: normal; overflow: hidden; padding: 0px; position: absolute; width: 1px; word-break: normal;&quot;&gt;&lt;span class=&quot;shcb-language__label&quot;&gt;Code language:&lt;/span&gt; &lt;span class=&quot;shcb-language__name&quot;&gt;SQL (Structured Query Language)&lt;/span&gt; &lt;span class=&quot;shcb-language__paren&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;shcb-language__slug&quot;&gt;sql&lt;/span&gt;&lt;span class=&quot;shcb-language__paren&quot;&gt;)&lt;/span&gt;&lt;/small&gt;&lt;i class=&quot;icon-copy btn-copy-code&quot; style=&quot;background-image: var(--icon-copy-url); background-repeat: no-repeat; cursor: pointer; display: block; height: 20px; margin: 0.5rem; opacity: 0; position: absolute; right: 0px; top: 0px; transition: opacity 0.2s linear 0s; width: 20px;&quot;&gt;&lt;/i&gt;&lt;/pre&gt;&lt;h2 style=&quot;background-color: white; color: var(--heading-color); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, Oxygen-Sans, Ubuntu, Cantarell, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 1.5rem; font-weight: 400; margin-bottom: 1rem; padding: 0px;&quot;&gt;C) Delete duplicate rows using the&amp;nbsp;&lt;code style=&quot;background: 0px 0px; border-radius: 0px; color: var(--heading-color); font-family: var(--font-family); font-size: 1.5rem; padding: 0px;&quot;&gt;ROW_NUMBER()&lt;/code&gt;&amp;nbsp;function&lt;/h2&gt;&lt;div class=&quot;note&quot; style=&quot;background-color: white; border-color: rgb(233, 236, 239) rgb(233, 236, 239) rgb(233, 236, 239) rgb(91, 192, 222); border-image: initial; border-radius: 0.25rem; border-style: solid; border-width: 1px 1px 1px 0.25rem; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, Oxygen-Sans, Ubuntu, Cantarell, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 16px; margin: 16px 0px; padding: 1.25rem;&quot;&gt;Note that the&amp;nbsp;&lt;code style=&quot;font-family: monospace, monospace; font-size: 1em;&quot;&gt;&lt;a href=&quot;https://www.mysqltutorial.org/mysql-window-functions/mysql-row_number-function/&quot; style=&quot;background-color: transparent; text-decoration-line: none;&quot;&gt;ROW_NUMBER()&lt;/a&gt;&lt;/code&gt;&amp;nbsp;function has been supported since MySQL version 8.02 so you should check your MySQL version before using the function.&lt;/div&gt;&lt;p style=&quot;background-color: white; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, Oxygen-Sans, Ubuntu, Cantarell, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 16px;&quot;&gt;The following statement uses the&amp;nbsp;&lt;code style=&quot;background-color: var(--inline-code-bg-color); border-radius: 3px; color: var(--inline-code-color); font-family: var(--font-family-code); font-size: 0.875rem; padding: 0.25em 0.5em;&quot;&gt;&lt;a href=&quot;https://www.mysqltutorial.org/mysql-window-functions/mysql-row_number-function/&quot; style=&quot;background-color: transparent; text-decoration-line: none;&quot;&gt;ROW_NUMBER()&lt;/a&gt;&lt;/code&gt;&amp;nbsp;function to assign a sequential integer number to each row. If the email is duplicate, the row number will be greater than one.&lt;/p&gt;&lt;pre aria-describedby=&quot;shcb-language-13&quot; class=&quot;wp-block-code&quot; data-shcb-language-name=&quot;SQL (Structured Query Language)&quot; data-shcb-language-slug=&quot;sql&quot; style=&quot;background-color: white; border: 0px; font-family: monospace, monospace; font-size: 16px; padding: 0px; position: relative;&quot;&gt;&lt;div style=&quot;overflow: auto;&quot;&gt;&lt;code class=&quot;hljs language-sql&quot; style=&quot;background: rgb(51, 51, 51); box-sizing: border-box; color: white; display: block; font-family: var(--font-family-code); font-size: 0.9rem; overflow-x: auto; padding: 1rem;&quot;&gt;&lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;SELECT&lt;/span&gt; 
	&lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;id&lt;/span&gt;, 
    email, 
    ROW_NUMBER() &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;OVER&lt;/span&gt; ( 
		&lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;PARTITION&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;BY&lt;/span&gt; email 
        &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;ORDER&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;BY&lt;/span&gt; email
	) &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;AS&lt;/span&gt; row_num 
&lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;FROM&lt;/span&gt; contacts;&lt;/code&gt;&lt;/div&gt;&lt;small class=&quot;shcb-language&quot; id=&quot;shcb-language-13&quot; style=&quot;border: 0px; clip-path: inset(50%); clip: rect(1px, 1px, 1px, 1px); font-size: 12.8px; height: 1px; margin: -1px; overflow-wrap: normal; overflow: hidden; padding: 0px; position: absolute; width: 1px; word-break: normal;&quot;&gt;&lt;span class=&quot;shcb-language__label&quot;&gt;Code language:&lt;/span&gt; &lt;span class=&quot;shcb-language__name&quot;&gt;SQL (Structured Query Language)&lt;/span&gt; &lt;span class=&quot;shcb-language__paren&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;shcb-language__slug&quot;&gt;sql&lt;/span&gt;&lt;span class=&quot;shcb-language__paren&quot;&gt;)&lt;/span&gt;&lt;/small&gt;&lt;i class=&quot;icon-copy btn-copy-code&quot; style=&quot;background-image: var(--icon-copy-url); background-repeat: no-repeat; cursor: pointer; display: block; height: 20px; margin: 0.5rem; opacity: 0; position: absolute; right: 0px; top: 0px; transition: opacity 0.2s linear 0s; width: 20px;&quot;&gt;&lt;/i&gt;&lt;/pre&gt;&lt;p style=&quot;background-color: white; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, Oxygen-Sans, Ubuntu, Cantarell, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 16px;&quot;&gt;The following statement returns id list of the duplicate rows:&lt;/p&gt;&lt;pre aria-describedby=&quot;shcb-language-14&quot; class=&quot;wp-block-code&quot; data-shcb-language-name=&quot;SQL (Structured Query Language)&quot; data-shcb-language-slug=&quot;sql&quot; style=&quot;background-color: white; border: 0px; font-family: monospace, monospace; font-size: 16px; padding: 0px; position: relative;&quot;&gt;&lt;div style=&quot;overflow: auto;&quot;&gt;&lt;code class=&quot;hljs language-sql&quot; style=&quot;background: rgb(51, 51, 51); box-sizing: border-box; color: white; display: block; font-family: var(--font-family-code); font-size: 0.9rem; overflow-x: auto; padding: 1rem;&quot;&gt;&lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;SELECT&lt;/span&gt; 
	&lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;id&lt;/span&gt; 
&lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;FROM&lt;/span&gt; (
	&lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;SELECT&lt;/span&gt; 
		&lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;id&lt;/span&gt;,
		ROW_NUMBER() &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;OVER&lt;/span&gt; (
			&lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;PARTITION&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;BY&lt;/span&gt; email
			&lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;ORDER&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;BY&lt;/span&gt; email) &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;AS&lt;/span&gt; row_num
	&lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;FROM&lt;/span&gt; 
		contacts
) t
&lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;WHERE&lt;/span&gt; 
	row_num &amp;gt; &lt;span class=&quot;hljs-number&quot; style=&quot;color: #d36363;&quot;&gt;1&lt;/span&gt;;&lt;/code&gt;&lt;/div&gt;&lt;small class=&quot;shcb-language&quot; id=&quot;shcb-language-14&quot; style=&quot;border: 0px; clip-path: inset(50%); clip: rect(1px, 1px, 1px, 1px); font-size: 12.8px; height: 1px; margin: -1px; overflow-wrap: normal; overflow: hidden; padding: 0px; position: absolute; width: 1px; word-break: normal;&quot;&gt;&lt;span class=&quot;shcb-language__label&quot;&gt;Code language:&lt;/span&gt; &lt;span class=&quot;shcb-language__name&quot;&gt;SQL (Structured Query Language)&lt;/span&gt; &lt;span class=&quot;shcb-language__paren&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;shcb-language__slug&quot;&gt;sql&lt;/span&gt;&lt;span class=&quot;shcb-language__paren&quot;&gt;)&lt;/span&gt;&lt;/small&gt;&lt;i class=&quot;icon-copy btn-copy-code&quot; style=&quot;background-image: var(--icon-copy-url); background-repeat: no-repeat; cursor: pointer; display: block; height: 20px; margin: 0.5rem; opacity: 0; position: absolute; right: 0px; top: 0px; transition: opacity 0.2s linear 0s; width: 20px;&quot;&gt;&lt;/i&gt;&lt;/pre&gt;&lt;figure class=&quot;wp-block-image&quot; style=&quot;background-color: white; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, Oxygen-Sans, Ubuntu, Cantarell, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 16px; margin: 1em 0px;&quot;&gt;&lt;img alt=&quot;MySQL Delete Duplicate Rows - ROW_NUMBER function with subquery&quot; class=&quot;wp-image-7407 lazyloaded&quot; data-src=&quot;https://www.mysqltutorial.org/wp-content/uploads/2018/09/MySQL-Delete-Duplicate-Rows-ROW_NUMBER-function-with-subquery.png&quot; height=&quot;89&quot; src=&quot;https://www.mysqltutorial.org/wp-content/uploads/2018/09/MySQL-Delete-Duplicate-Rows-ROW_NUMBER-function-with-subquery.png&quot; style=&quot;border-radius: inherit; border-style: none; filter: var(--image-filter); height: auto; max-width: 100%;&quot; width=&quot;62&quot; /&gt;&lt;/figure&gt;&lt;p style=&quot;background-color: white; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, Oxygen-Sans, Ubuntu, Cantarell, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 16px;&quot;&gt;And you just delete the duplicate rows from the&amp;nbsp;&lt;code style=&quot;background-color: var(--inline-code-bg-color); border-radius: 3px; color: var(--inline-code-color); font-family: var(--font-family-code); font-size: 0.875rem; padding: 0.25em 0.5em;&quot;&gt;contacts&lt;/code&gt;&amp;nbsp;table using the&amp;nbsp;&lt;code style=&quot;background-color: var(--inline-code-bg-color); border-radius: 3px; color: var(--inline-code-color); font-family: var(--font-family-code); font-size: 0.875rem; padding: 0.25em 0.5em;&quot;&gt;&lt;a href=&quot;https://www.mysqltutorial.org/mysql-delete-statement.aspx&quot; style=&quot;background-color: transparent; text-decoration-line: none;&quot;&gt;DELETE&lt;/a&gt;&lt;/code&gt;&amp;nbsp;statement with a&amp;nbsp;&lt;a href=&quot;https://www.mysqltutorial.org/mysql-subquery/&quot; style=&quot;background-color: transparent; text-decoration-line: none;&quot;&gt;subquery&lt;/a&gt;&amp;nbsp;&lt;a href=&quot;https://www.mysqltutorial.org/mysql-basics/mysql-in/&quot; style=&quot;background-color: transparent; text-decoration-line: none;&quot;&gt;in&lt;/a&gt;&amp;nbsp;the&amp;nbsp;&lt;code style=&quot;background-color: var(--inline-code-bg-color); border-radius: 3px; color: var(--inline-code-color); font-family: var(--font-family-code); font-size: 0.875rem; padding: 0.25em 0.5em;&quot;&gt;&lt;a href=&quot;https://www.mysqltutorial.org/mysql-where/&quot; style=&quot;background-color: transparent; text-decoration-line: none;&quot;&gt;WHERE&lt;/a&gt;&lt;/code&gt;&amp;nbsp;clause:&lt;/p&gt;&lt;pre aria-describedby=&quot;shcb-language-15&quot; class=&quot;wp-block-code&quot; data-shcb-language-name=&quot;SQL (Structured Query Language)&quot; data-shcb-language-slug=&quot;sql&quot; style=&quot;background-color: white; border: 0px; font-family: monospace, monospace; font-size: 16px; padding: 0px; position: relative;&quot;&gt;&lt;div style=&quot;overflow: auto;&quot;&gt;&lt;code class=&quot;hljs language-sql&quot; style=&quot;background: rgb(51, 51, 51); box-sizing: border-box; color: white; display: block; font-family: var(--font-family-code); font-size: 0.9rem; overflow-x: auto; padding: 1rem;&quot;&gt;&lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;DELETE&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;FROM&lt;/span&gt; contacts 
&lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;WHERE&lt;/span&gt; 
	&lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;id&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;IN&lt;/span&gt; (
	&lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;SELECT&lt;/span&gt; 
		&lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;id&lt;/span&gt; 
	&lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;FROM&lt;/span&gt; (
		&lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;SELECT&lt;/span&gt; 
			&lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;id&lt;/span&gt;,
			ROW_NUMBER() &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;OVER&lt;/span&gt; (
				&lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;PARTITION&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;BY&lt;/span&gt; email
				&lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;ORDER&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;BY&lt;/span&gt; email) &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;AS&lt;/span&gt; row_num
		&lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;FROM&lt;/span&gt; 
			contacts
		
	) t
    &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;WHERE&lt;/span&gt; row_num &amp;gt; &lt;span class=&quot;hljs-number&quot; style=&quot;color: #d36363;&quot;&gt;1&lt;/span&gt;
);
&lt;/code&gt;&lt;/div&gt;&lt;small class=&quot;shcb-language&quot; id=&quot;shcb-language-15&quot; style=&quot;border: 0px; clip-path: inset(50%); clip: rect(1px, 1px, 1px, 1px); font-size: 12.8px; height: 1px; margin: -1px; overflow-wrap: normal; overflow: hidden; padding: 0px; position: absolute; width: 1px; word-break: normal;&quot;&gt;&lt;span class=&quot;shcb-language__label&quot;&gt;Code language:&lt;/span&gt; &lt;span class=&quot;shcb-language__name&quot;&gt;SQL (Structured Query Language)&lt;/span&gt; &lt;span class=&quot;shcb-language__paren&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;shcb-language__slug&quot;&gt;sql&lt;/span&gt;&lt;span class=&quot;shcb-language__paren&quot;&gt;)&lt;/span&gt;&lt;/small&gt;&lt;i class=&quot;icon-copy btn-copy-code&quot; style=&quot;background-image: var(--icon-copy-url); background-repeat: no-repeat; cursor: pointer; display: block; height: 20px; margin: 0.5rem; opacity: 0; position: absolute; right: 0px; top: 0px; transition: opacity 0.2s linear 0s; width: 20px;&quot;&gt;&lt;/i&gt;&lt;/pre&gt;&lt;p style=&quot;background-color: white; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, Oxygen-Sans, Ubuntu, Cantarell, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 16px;&quot;&gt;MySQL issued the following message:&lt;/p&gt;&lt;pre class=&quot;wp-block-code&quot; style=&quot;background-color: white; border: 0px; font-family: monospace, monospace; font-size: 16px; padding: 0px; position: relative;&quot;&gt;&lt;div style=&quot;overflow: auto;&quot;&gt;&lt;code class=&quot;hljs&quot; style=&quot;background: rgb(51, 51, 51); box-sizing: border-box; color: white; display: block; font-family: var(--font-family-code); font-size: 0.9rem; overflow-x: auto; padding: 1rem;&quot;&gt;4 row(s) affected&lt;/code&gt;&lt;/div&gt;&lt;i class=&quot;icon-copy btn-copy-code&quot; style=&quot;background-image: var(--icon-copy-url); background-repeat: no-repeat; cursor: pointer; display: block; height: 20px; margin: 0.5rem; opacity: 0; position: absolute; right: 0px; top: 0px; transition: opacity 0.2s linear 0s; width: 20px;&quot;&gt;&lt;/i&gt;&lt;/pre&gt;&lt;p style=&quot;background-color: white; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, Oxygen-Sans, Ubuntu, Cantarell, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 16px;&quot;&gt;In this tutorial, you have learned how to delete duplicate rows in MySQL by using the the&amp;nbsp;&lt;code style=&quot;background-color: var(--inline-code-bg-color); border-radius: 3px; color: var(--inline-code-color); font-family: var(--font-family-code); font-size: 0.875rem; padding: 0.25em 0.5em;&quot;&gt;DELETE JOIN&lt;/code&gt;&amp;nbsp;statement or an intermediate table.&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlinfodata.blogspot.com/feeds/2800989512797299351/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sqlinfodata.blogspot.com/2021/09/how-to-delete-duplicate-rows-in-mysql.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2706799863772725741/posts/default/2800989512797299351'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2706799863772725741/posts/default/2800989512797299351'/><link rel='alternate' type='text/html' href='http://sqlinfodata.blogspot.com/2021/09/how-to-delete-duplicate-rows-in-mysql.html' title='How To Delete Duplicate Rows in MySQL'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2706799863772725741.post-5844025531601006886</id><published>2021-09-15T10:18:00.006-07:00</published><updated>2021-09-16T04:46:17.211-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Database"/><category scheme="http://www.blogger.com/atom/ns#" term="MySQL"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL"/><category scheme="http://www.blogger.com/atom/ns#" term="Sql Interview Questions"/><title type='text'>How To Find Duplicate Values in MySQL</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;span face=&quot;-apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, Oxygen-Sans, Ubuntu, Cantarell, &amp;quot;Helvetica Neue&amp;quot;, sans-serif&quot; style=&quot;font-size: 16px; font-weight: bolder;&quot;&gt;Summary&lt;/span&gt;&lt;span face=&quot;-apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, Oxygen-Sans, Ubuntu, Cantarell, &amp;quot;Helvetica Neue&amp;quot;, sans-serif&quot; style=&quot;background-color: white; font-size: 16px;&quot;&gt;: in this tutorial, you will learn how to find duplicate values of one or more columns in MySQL.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, Oxygen-Sans, Ubuntu, Cantarell, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 16px;&quot;&gt;Data duplication happens because of many reasons. Finding duplicate values is one of the important tasks that you must deal with when working with the databases.&lt;/p&gt;&lt;h2 style=&quot;background-color: white; color: var(--heading-color); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, Oxygen-Sans, Ubuntu, Cantarell, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 1.5rem; font-weight: 400; margin-bottom: 1rem; padding: 0px;&quot;&gt;Setting up a sample table&lt;/h2&gt;&lt;p style=&quot;background-color: white; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, Oxygen-Sans, Ubuntu, Cantarell, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 16px;&quot;&gt;First,&amp;nbsp;&lt;a href=&quot;https://www.mysqltutorial.org/mysql-create-table/&quot; style=&quot;background-color: transparent; text-decoration-line: none;&quot;&gt;create a table&lt;/a&gt;&amp;nbsp;named&amp;nbsp;&lt;code style=&quot;background-color: var(--inline-code-bg-color); border-radius: 3px; color: var(--inline-code-color); font-family: var(--font-family-code); font-size: 0.875rem; padding: 0.25em 0.5em;&quot;&gt;contacts&lt;/code&gt;&amp;nbsp;with four columns:&amp;nbsp;&lt;code style=&quot;background-color: var(--inline-code-bg-color); border-radius: 3px; color: var(--inline-code-color); font-family: var(--font-family-code); font-size: 0.875rem; padding: 0.25em 0.5em;&quot;&gt;id&lt;/code&gt;,&amp;nbsp;&lt;code style=&quot;background-color: var(--inline-code-bg-color); border-radius: 3px; color: var(--inline-code-color); font-family: var(--font-family-code); font-size: 0.875rem; padding: 0.25em 0.5em;&quot;&gt;first_name&lt;/code&gt;,&amp;nbsp;&lt;code style=&quot;background-color: var(--inline-code-bg-color); border-radius: 3px; color: var(--inline-code-color); font-family: var(--font-family-code); font-size: 0.875rem; padding: 0.25em 0.5em;&quot;&gt;last_name&lt;/code&gt;, and&amp;nbsp;&lt;code style=&quot;background-color: var(--inline-code-bg-color); border-radius: 3px; color: var(--inline-code-color); font-family: var(--font-family-code); font-size: 0.875rem; padding: 0.25em 0.5em;&quot;&gt;email&lt;/code&gt;.&lt;/p&gt;&lt;pre aria-describedby=&quot;shcb-language-1&quot; class=&quot;wp-block-code&quot; data-shcb-language-name=&quot;SQL (Structured Query Language)&quot; data-shcb-language-slug=&quot;sql&quot; style=&quot;background-color: white; border: 0px; font-family: monospace, monospace; font-size: 16px; padding: 0px; position: relative;&quot;&gt;&lt;div style=&quot;overflow: auto;&quot;&gt;&lt;code class=&quot;hljs language-sql&quot; style=&quot;background: rgb(51, 51, 51); box-sizing: border-box; color: white; display: block; font-family: var(--font-family-code); font-size: 0.9rem; overflow-x: auto; padding: 1rem;&quot;&gt;&lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;CREATE&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;TABLE&lt;/span&gt; contacts (
    &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;id&lt;/span&gt; &lt;span class=&quot;hljs-built_in&quot; style=&quot;color: #ffffaa;&quot;&gt;INT&lt;/span&gt; PRIMARY &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;KEY&lt;/span&gt; AUTO_INCREMENT,
    first_name &lt;span class=&quot;hljs-built_in&quot; style=&quot;color: #ffffaa;&quot;&gt;VARCHAR&lt;/span&gt;(&lt;span class=&quot;hljs-number&quot; style=&quot;color: #d36363;&quot;&gt;50&lt;/span&gt;) &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;NOT&lt;/span&gt; &lt;span class=&quot;hljs-literal&quot; style=&quot;color: #fcc28c;&quot;&gt;NULL&lt;/span&gt;,
    last_name &lt;span class=&quot;hljs-built_in&quot; style=&quot;color: #ffffaa;&quot;&gt;VARCHAR&lt;/span&gt;(&lt;span class=&quot;hljs-number&quot; style=&quot;color: #d36363;&quot;&gt;50&lt;/span&gt;) &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;NOT&lt;/span&gt; &lt;span class=&quot;hljs-literal&quot; style=&quot;color: #fcc28c;&quot;&gt;NULL&lt;/span&gt;,
    email &lt;span class=&quot;hljs-built_in&quot; style=&quot;color: #ffffaa;&quot;&gt;VARCHAR&lt;/span&gt;(&lt;span class=&quot;hljs-number&quot; style=&quot;color: #d36363;&quot;&gt;255&lt;/span&gt;) &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;NOT&lt;/span&gt; &lt;span class=&quot;hljs-literal&quot; style=&quot;color: #fcc28c;&quot;&gt;NULL&lt;/span&gt;
);
&lt;/code&gt;&lt;/div&gt;&lt;small class=&quot;shcb-language&quot; id=&quot;shcb-language-1&quot; style=&quot;border: 0px; clip-path: inset(50%); clip: rect(1px, 1px, 1px, 1px); font-size: 12.8px; height: 1px; margin: -1px; overflow-wrap: normal; overflow: hidden; padding: 0px; position: absolute; width: 1px; word-break: normal;&quot;&gt;&lt;span class=&quot;shcb-language__label&quot;&gt;Code language:&lt;/span&gt; &lt;span class=&quot;shcb-language__name&quot;&gt;SQL (Structured Query Language)&lt;/span&gt; &lt;span class=&quot;shcb-language__paren&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;shcb-language__slug&quot;&gt;sql&lt;/span&gt;&lt;span class=&quot;shcb-language__paren&quot;&gt;)&lt;/span&gt;&lt;/small&gt;&lt;i class=&quot;icon-copy btn-copy-code&quot; style=&quot;background-image: var(--icon-copy-url); background-repeat: no-repeat; cursor: pointer; display: block; height: 20px; margin: 0.5rem; opacity: 0; position: absolute; right: 0px; top: 0px; transition: opacity 0.2s linear 0s; width: 20px;&quot;&gt;&lt;/i&gt;&lt;/pre&gt;&lt;p style=&quot;background-color: white; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, Oxygen-Sans, Ubuntu, Cantarell, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 16px;&quot;&gt;Second,&amp;nbsp;&lt;a href=&quot;https://www.mysqltutorial.org/mysql-insert-statement.aspx&quot; style=&quot;background-color: transparent; text-decoration-line: none;&quot;&gt;inserts&amp;nbsp;&lt;/a&gt;rows into the&amp;nbsp;&lt;code style=&quot;background-color: var(--inline-code-bg-color); border-radius: 3px; color: var(--inline-code-color); font-family: var(--font-family-code); font-size: 0.875rem; padding: 0.25em 0.5em;&quot;&gt;contacts&lt;/code&gt;&amp;nbsp;table:&lt;/p&gt;&lt;pre aria-describedby=&quot;shcb-language-2&quot; class=&quot;wp-block-code&quot; data-shcb-language-name=&quot;SQL (Structured Query Language)&quot; data-shcb-language-slug=&quot;sql&quot; style=&quot;background-color: white; border: 0px; font-family: monospace, monospace; font-size: 16px; padding: 0px; position: relative;&quot;&gt;&lt;div style=&quot;overflow: auto;&quot;&gt;&lt;code class=&quot;hljs language-sql&quot; style=&quot;background: rgb(51, 51, 51); box-sizing: border-box; color: white; display: block; font-family: var(--font-family-code); font-size: 0.9rem; overflow-x: auto; padding: 1rem;&quot;&gt;&lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;INSERT&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;INTO&lt;/span&gt; contacts (first_name,last_name,email) 
&lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;VALUES&lt;/span&gt; (&lt;span class=&quot;hljs-string&quot; style=&quot;color: #a2fca2;&quot;&gt;&#39;Carine &#39;&lt;/span&gt;,&lt;span class=&quot;hljs-string&quot; style=&quot;color: #a2fca2;&quot;&gt;&#39;Schmitt&#39;&lt;/span&gt;,&lt;span class=&quot;hljs-string&quot; style=&quot;color: #a2fca2;&quot;&gt;&#39;carine.schmitt@verizon.net&#39;&lt;/span&gt;),
       (&lt;span class=&quot;hljs-string&quot; style=&quot;color: #a2fca2;&quot;&gt;&#39;Jean&#39;&lt;/span&gt;,&lt;span class=&quot;hljs-string&quot; style=&quot;color: #a2fca2;&quot;&gt;&#39;King&#39;&lt;/span&gt;,&lt;span class=&quot;hljs-string&quot; style=&quot;color: #a2fca2;&quot;&gt;&#39;jean.king@me.com&#39;&lt;/span&gt;),
       (&lt;span class=&quot;hljs-string&quot; style=&quot;color: #a2fca2;&quot;&gt;&#39;Peter&#39;&lt;/span&gt;,&lt;span class=&quot;hljs-string&quot; style=&quot;color: #a2fca2;&quot;&gt;&#39;Ferguson&#39;&lt;/span&gt;,&lt;span class=&quot;hljs-string&quot; style=&quot;color: #a2fca2;&quot;&gt;&#39;peter.ferguson@google.com&#39;&lt;/span&gt;),
       (&lt;span class=&quot;hljs-string&quot; style=&quot;color: #a2fca2;&quot;&gt;&#39;Janine &#39;&lt;/span&gt;,&lt;span class=&quot;hljs-string&quot; style=&quot;color: #a2fca2;&quot;&gt;&#39;Labrune&#39;&lt;/span&gt;,&lt;span class=&quot;hljs-string&quot; style=&quot;color: #a2fca2;&quot;&gt;&#39;janine.labrune@aol.com&#39;&lt;/span&gt;),
       (&lt;span class=&quot;hljs-string&quot; style=&quot;color: #a2fca2;&quot;&gt;&#39;Jonas &#39;&lt;/span&gt;,&lt;span class=&quot;hljs-string&quot; style=&quot;color: #a2fca2;&quot;&gt;&#39;Bergulfsen&#39;&lt;/span&gt;,&lt;span class=&quot;hljs-string&quot; style=&quot;color: #a2fca2;&quot;&gt;&#39;jonas.bergulfsen@mac.com&#39;&lt;/span&gt;),
       (&lt;span class=&quot;hljs-string&quot; style=&quot;color: #a2fca2;&quot;&gt;&#39;Janine &#39;&lt;/span&gt;,&lt;span class=&quot;hljs-string&quot; style=&quot;color: #a2fca2;&quot;&gt;&#39;Labrune&#39;&lt;/span&gt;,&lt;span class=&quot;hljs-string&quot; style=&quot;color: #a2fca2;&quot;&gt;&#39;janine.labrune@aol.com&#39;&lt;/span&gt;),
       (&lt;span class=&quot;hljs-string&quot; style=&quot;color: #a2fca2;&quot;&gt;&#39;Susan&#39;&lt;/span&gt;,&lt;span class=&quot;hljs-string&quot; style=&quot;color: #a2fca2;&quot;&gt;&#39;Nelson&#39;&lt;/span&gt;,&lt;span class=&quot;hljs-string&quot; style=&quot;color: #a2fca2;&quot;&gt;&#39;susan.nelson@comcast.net&#39;&lt;/span&gt;),
       (&lt;span class=&quot;hljs-string&quot; style=&quot;color: #a2fca2;&quot;&gt;&#39;Zbyszek &#39;&lt;/span&gt;,&lt;span class=&quot;hljs-string&quot; style=&quot;color: #a2fca2;&quot;&gt;&#39;Piestrzeniewicz&#39;&lt;/span&gt;,&lt;span class=&quot;hljs-string&quot; style=&quot;color: #a2fca2;&quot;&gt;&#39;zbyszek.piestrzeniewicz@att.net&#39;&lt;/span&gt;),
       (&lt;span class=&quot;hljs-string&quot; style=&quot;color: #a2fca2;&quot;&gt;&#39;Roland&#39;&lt;/span&gt;,&lt;span class=&quot;hljs-string&quot; style=&quot;color: #a2fca2;&quot;&gt;&#39;Keitel&#39;&lt;/span&gt;,&lt;span class=&quot;hljs-string&quot; style=&quot;color: #a2fca2;&quot;&gt;&#39;roland.keitel@yahoo.com&#39;&lt;/span&gt;),
       (&lt;span class=&quot;hljs-string&quot; style=&quot;color: #a2fca2;&quot;&gt;&#39;Julie&#39;&lt;/span&gt;,&lt;span class=&quot;hljs-string&quot; style=&quot;color: #a2fca2;&quot;&gt;&#39;Murphy&#39;&lt;/span&gt;,&lt;span class=&quot;hljs-string&quot; style=&quot;color: #a2fca2;&quot;&gt;&#39;julie.murphy@yahoo.com&#39;&lt;/span&gt;),
       (&lt;span class=&quot;hljs-string&quot; style=&quot;color: #a2fca2;&quot;&gt;&#39;Kwai&#39;&lt;/span&gt;,&lt;span class=&quot;hljs-string&quot; style=&quot;color: #a2fca2;&quot;&gt;&#39;Lee&#39;&lt;/span&gt;,&lt;span class=&quot;hljs-string&quot; style=&quot;color: #a2fca2;&quot;&gt;&#39;kwai.lee@google.com&#39;&lt;/span&gt;),
       (&lt;span class=&quot;hljs-string&quot; style=&quot;color: #a2fca2;&quot;&gt;&#39;Jean&#39;&lt;/span&gt;,&lt;span class=&quot;hljs-string&quot; style=&quot;color: #a2fca2;&quot;&gt;&#39;King&#39;&lt;/span&gt;,&lt;span class=&quot;hljs-string&quot; style=&quot;color: #a2fca2;&quot;&gt;&#39;jean.king@me.com&#39;&lt;/span&gt;),
       (&lt;span class=&quot;hljs-string&quot; style=&quot;color: #a2fca2;&quot;&gt;&#39;Susan&#39;&lt;/span&gt;,&lt;span class=&quot;hljs-string&quot; style=&quot;color: #a2fca2;&quot;&gt;&#39;Nelson&#39;&lt;/span&gt;,&lt;span class=&quot;hljs-string&quot; style=&quot;color: #a2fca2;&quot;&gt;&#39;susan.nelson@comcast.net&#39;&lt;/span&gt;),
       (&lt;span class=&quot;hljs-string&quot; style=&quot;color: #a2fca2;&quot;&gt;&#39;Roland&#39;&lt;/span&gt;,&lt;span class=&quot;hljs-string&quot; style=&quot;color: #a2fca2;&quot;&gt;&#39;Keitel&#39;&lt;/span&gt;,&lt;span class=&quot;hljs-string&quot; style=&quot;color: #a2fca2;&quot;&gt;&#39;roland.keitel@yahoo.com&#39;&lt;/span&gt;);
&lt;/code&gt;&lt;/div&gt;&lt;small class=&quot;shcb-language&quot; id=&quot;shcb-language-2&quot; style=&quot;border: 0px; clip-path: inset(50%); clip: rect(1px, 1px, 1px, 1px); font-size: 12.8px; height: 1px; margin: -1px; overflow-wrap: normal; overflow: hidden; padding: 0px; position: absolute; width: 1px; word-break: normal;&quot;&gt;&lt;span class=&quot;shcb-language__label&quot;&gt;Code language:&lt;/span&gt; &lt;span class=&quot;shcb-language__name&quot;&gt;SQL (Structured Query Language)&lt;/span&gt; &lt;span class=&quot;shcb-language__paren&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;shcb-language__slug&quot;&gt;sql&lt;/span&gt;&lt;span class=&quot;shcb-language__paren&quot;&gt;)&lt;/span&gt;&lt;/small&gt;&lt;i class=&quot;icon-copy btn-copy-code&quot; style=&quot;background-image: var(--icon-copy-url); background-repeat: no-repeat; cursor: pointer; display: block; height: 20px; margin: 0.5rem; opacity: 0; position: absolute; right: 0px; top: 0px; transition: opacity 0.2s linear 0s; width: 20px;&quot;&gt;&lt;/i&gt;&lt;/pre&gt;&lt;p style=&quot;background-color: white; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, Oxygen-Sans, Ubuntu, Cantarell, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 16px;&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;Third, query data from the contacts table:&lt;p&gt;&lt;/p&gt;&lt;pre aria-describedby=&quot;shcb-language-3&quot; class=&quot;wp-block-code&quot; data-shcb-language-name=&quot;SQL (Structured Query Language)&quot; data-shcb-language-slug=&quot;sql&quot; style=&quot;background-color: white; border: 0px; font-family: monospace, monospace; font-size: 16px; padding: 0px; position: relative;&quot;&gt;&lt;div style=&quot;overflow: auto;&quot;&gt;&lt;code class=&quot;hljs language-sql&quot; style=&quot;background: rgb(51, 51, 51); box-sizing: border-box; color: white; display: block; font-family: var(--font-family-code); font-size: 0.9rem; overflow-x: auto; padding: 1rem;&quot;&gt;&lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;SELECT&lt;/span&gt; * &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;FROM&lt;/span&gt; contacts
&lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;ORDER&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;BY&lt;/span&gt; email;&lt;/code&gt;&lt;/div&gt;&lt;small class=&quot;shcb-language&quot; id=&quot;shcb-language-3&quot; style=&quot;border: 0px; clip-path: inset(50%); clip: rect(1px, 1px, 1px, 1px); font-size: 12.8px; height: 1px; margin: -1px; overflow-wrap: normal; overflow: hidden; padding: 0px; position: absolute; width: 1px; word-break: normal;&quot;&gt;&lt;span class=&quot;shcb-language__label&quot;&gt;Code language:&lt;/span&gt; &lt;span class=&quot;shcb-language__name&quot;&gt;SQL (Structured Query Language)&lt;/span&gt; &lt;span class=&quot;shcb-language__paren&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;shcb-language__slug&quot;&gt;sql&lt;/span&gt;&lt;span class=&quot;shcb-language__paren&quot;&gt;)&lt;/span&gt;&lt;/small&gt;&lt;i class=&quot;icon-copy btn-copy-code&quot; style=&quot;background-image: var(--icon-copy-url); background-repeat: no-repeat; cursor: pointer; display: block; height: 20px; margin: 0.5rem; opacity: 0; position: absolute; right: 0px; top: 0px; transition: opacity 0.2s linear 0s; width: 20px;&quot;&gt;&lt;/i&gt;&lt;/pre&gt;&lt;figure class=&quot;wp-block-image&quot; style=&quot;background-color: white; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, Oxygen-Sans, Ubuntu, Cantarell, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 16px; margin: 1em 0px;&quot;&gt;&lt;img alt=&quot;&quot; class=&quot;wp-image-7814 lazyloaded&quot; data-sizes=&quot;(max-width: 417px) 100vw, 417px&quot; data-src=&quot;https://www.mysqltutorial.org/wp-content/uploads/2019/08/MySQL-Find-Duplicate-Rows-Sample-Table.png&quot; data-srcset=&quot;https://www.mysqltutorial.org/wp-content/uploads/2019/08/MySQL-Find-Duplicate-Rows-Sample-Table.png 417w, https://www.mysqltutorial.org/wp-content/uploads/2019/08/MySQL-Find-Duplicate-Rows-Sample-Table-200x144.png 200w&quot; height=&quot;301&quot; sizes=&quot;(max-width: 417px) 100vw, 417px&quot; src=&quot;https://www.mysqltutorial.org/wp-content/uploads/2019/08/MySQL-Find-Duplicate-Rows-Sample-Table.png&quot; srcset=&quot;https://www.mysqltutorial.org/wp-content/uploads/2019/08/MySQL-Find-Duplicate-Rows-Sample-Table.png 417w, https://www.mysqltutorial.org/wp-content/uploads/2019/08/MySQL-Find-Duplicate-Rows-Sample-Table-200x144.png 200w&quot; style=&quot;border-radius: inherit; border-style: none; filter: var(--image-filter); height: auto; max-width: 100%;&quot; width=&quot;417&quot; /&gt;&lt;/figure&gt;&lt;p style=&quot;background-color: white; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, Oxygen-Sans, Ubuntu, Cantarell, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 16px;&quot;&gt;In the&amp;nbsp;&lt;code style=&quot;background-color: var(--inline-code-bg-color); border-radius: 3px; color: var(--inline-code-color); font-family: var(--font-family-code); font-size: 0.875rem; padding: 0.25em 0.5em;&quot;&gt;contacts&lt;/code&gt;&amp;nbsp;table, we have some rows that have duplicate values in the&amp;nbsp;&lt;code style=&quot;background-color: var(--inline-code-bg-color); border-radius: 3px; color: var(--inline-code-color); font-family: var(--font-family-code); font-size: 0.875rem; padding: 0.25em 0.5em;&quot;&gt;first_name&lt;/code&gt;,&amp;nbsp;&lt;code style=&quot;background-color: var(--inline-code-bg-color); border-radius: 3px; color: var(--inline-code-color); font-family: var(--font-family-code); font-size: 0.875rem; padding: 0.25em 0.5em;&quot;&gt;last_name&lt;/code&gt;, and&amp;nbsp;&lt;code style=&quot;background-color: var(--inline-code-bg-color); border-radius: 3px; color: var(--inline-code-color); font-family: var(--font-family-code); font-size: 0.875rem; padding: 0.25em 0.5em;&quot;&gt;email&lt;/code&gt;&amp;nbsp;columns. Let’s learn how to find them.&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;h2 style=&quot;background-color: white; color: var(--heading-color); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, Oxygen-Sans, Ubuntu, Cantarell, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 1.5rem; font-weight: 400; margin-bottom: 1rem; padding: 0px;&quot;&gt;Find duplicate values in one column&lt;/h2&gt;&lt;p style=&quot;background-color: white; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, Oxygen-Sans, Ubuntu, Cantarell, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 16px;&quot;&gt;The find duplicate values in on one column of a table, you use follow these steps:&lt;/p&gt;&lt;ol style=&quot;background-color: white; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, Oxygen-Sans, Ubuntu, Cantarell, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 16px; padding: 0px 0px 0px 1rem;&quot;&gt;&lt;li style=&quot;list-style-type: decimal; margin: 0px 0px 1rem 1rem;&quot;&gt;First, use the&amp;nbsp;&lt;code style=&quot;background-color: var(--inline-code-bg-color); border-radius: 3px; color: var(--inline-code-color); font-family: var(--font-family-code); font-size: 0.875rem; padding: 0.25em 0.5em;&quot;&gt;&lt;a href=&quot;https://www.mysqltutorial.org/mysql-group-by.aspx&quot; style=&quot;background-color: transparent; text-decoration-line: none;&quot;&gt;GROUP BY&lt;/a&gt;&lt;/code&gt;&amp;nbsp;clause to group all rows by the target column, which is the column that you want to check duplicate.&lt;/li&gt;&lt;li style=&quot;list-style-type: decimal; margin: 0px 0px 1rem 1rem;&quot;&gt;Then, use the&amp;nbsp;&lt;code style=&quot;background-color: var(--inline-code-bg-color); border-radius: 3px; color: var(--inline-code-color); font-family: var(--font-family-code); font-size: 0.875rem; padding: 0.25em 0.5em;&quot;&gt;&lt;a href=&quot;https://www.mysqltutorial.org/mysql-count/&quot; style=&quot;background-color: transparent; text-decoration-line: none;&quot;&gt;COUNT()&lt;/a&gt;&lt;/code&gt;&amp;nbsp;function in the&amp;nbsp;&lt;code style=&quot;background-color: var(--inline-code-bg-color); border-radius: 3px; color: var(--inline-code-color); font-family: var(--font-family-code); font-size: 0.875rem; padding: 0.25em 0.5em;&quot;&gt;&lt;a href=&quot;https://www.mysqltutorial.org/mysql-having.aspx&quot; style=&quot;background-color: transparent; text-decoration-line: none;&quot;&gt;HAVING&lt;/a&gt;&lt;/code&gt;&amp;nbsp;clause to check if any group have more than 1 element. These groups are duplicate.&lt;/li&gt;&lt;/ol&gt;&lt;p style=&quot;background-color: white; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, Oxygen-Sans, Ubuntu, Cantarell, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 16px;&quot;&gt;The following query illustrates the idea:&lt;/p&gt;&lt;pre aria-describedby=&quot;shcb-language-4&quot; class=&quot;wp-block-code&quot; data-shcb-language-name=&quot;SQL (Structured Query Language)&quot; data-shcb-language-slug=&quot;sql&quot; style=&quot;background-color: white; border: 0px; font-family: monospace, monospace; font-size: 16px; padding: 0px; position: relative;&quot;&gt;&lt;div style=&quot;overflow: auto;&quot;&gt;&lt;code class=&quot;hljs language-sql&quot; style=&quot;background: rgb(51, 51, 51); box-sizing: border-box; color: white; display: block; font-family: var(--font-family-code); font-size: 0.9rem; overflow-x: auto; padding: 1rem;&quot;&gt;&lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;SELECT&lt;/span&gt; 
    &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;col&lt;/span&gt;, 
    &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;COUNT&lt;/span&gt;(&lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;col&lt;/span&gt;)
&lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;FROM&lt;/span&gt;
    table_name
&lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;GROUP&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;BY&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;col&lt;/span&gt;
&lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;HAVING&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;COUNT&lt;/span&gt;(&lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;col&lt;/span&gt;) &amp;gt; &lt;span class=&quot;hljs-number&quot; style=&quot;color: #d36363;&quot;&gt;1&lt;/span&gt;;
&lt;/code&gt;&lt;/div&gt;&lt;small class=&quot;shcb-language&quot; id=&quot;shcb-language-4&quot; style=&quot;border: 0px; clip-path: inset(50%); clip: rect(1px, 1px, 1px, 1px); font-size: 12.8px; height: 1px; margin: -1px; overflow-wrap: normal; overflow: hidden; padding: 0px; position: absolute; width: 1px; word-break: normal;&quot;&gt;&lt;span class=&quot;shcb-language__label&quot;&gt;Code language:&lt;/span&gt; &lt;span class=&quot;shcb-language__name&quot;&gt;SQL (Structured Query Language)&lt;/span&gt; &lt;span class=&quot;shcb-language__paren&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;shcb-language__slug&quot;&gt;sql&lt;/span&gt;&lt;span class=&quot;shcb-language__paren&quot;&gt;)&lt;/span&gt;&lt;/small&gt;&lt;i class=&quot;icon-copy btn-copy-code&quot; style=&quot;background-image: var(--icon-copy-url); background-repeat: no-repeat; cursor: pointer; display: block; height: 20px; margin: 0.5rem; opacity: 0; position: absolute; right: 0px; top: 0px; transition: opacity 0.2s linear 0s; width: 20px;&quot;&gt;&lt;/i&gt;&lt;/pre&gt;&lt;p style=&quot;background-color: white; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, Oxygen-Sans, Ubuntu, Cantarell, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 16px;&quot;&gt;By using this query template, you can to find rows that have duplicate emails in the&amp;nbsp;&lt;code style=&quot;background-color: var(--inline-code-bg-color); border-radius: 3px; color: var(--inline-code-color); font-family: var(--font-family-code); font-size: 0.875rem; padding: 0.25em 0.5em;&quot;&gt;contacts&lt;/code&gt;&amp;nbsp;table as follows:&lt;/p&gt;&lt;pre aria-describedby=&quot;shcb-language-5&quot; class=&quot;wp-block-code&quot; data-shcb-language-name=&quot;SQL (Structured Query Language)&quot; data-shcb-language-slug=&quot;sql&quot; style=&quot;background-color: white; border: 0px; font-family: monospace, monospace; font-size: 16px; padding: 0px; position: relative;&quot;&gt;&lt;div style=&quot;overflow: auto;&quot;&gt;&lt;code class=&quot;hljs language-sql&quot; style=&quot;background: rgb(51, 51, 51); box-sizing: border-box; color: white; display: block; font-family: var(--font-family-code); font-size: 0.9rem; overflow-x: auto; padding: 1rem;&quot;&gt;&lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;SELECT&lt;/span&gt; 
    email, 
    &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;COUNT&lt;/span&gt;(email)
&lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;FROM&lt;/span&gt;
    contacts
&lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;GROUP&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;BY&lt;/span&gt; email
&lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;HAVING&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;COUNT&lt;/span&gt;(email) &amp;gt; &lt;span class=&quot;hljs-number&quot; style=&quot;color: #d36363;&quot;&gt;1&lt;/span&gt;;
&lt;/code&gt;&lt;/div&gt;&lt;small class=&quot;shcb-language&quot; id=&quot;shcb-language-5&quot; style=&quot;border: 0px; clip-path: inset(50%); clip: rect(1px, 1px, 1px, 1px); font-size: 12.8px; height: 1px; margin: -1px; overflow-wrap: normal; overflow: hidden; padding: 0px; position: absolute; width: 1px; word-break: normal;&quot;&gt;&lt;span class=&quot;shcb-language__label&quot;&gt;Code language:&lt;/span&gt; &lt;span class=&quot;shcb-language__name&quot;&gt;SQL (Structured Query Language)&lt;/span&gt; &lt;span class=&quot;shcb-language__paren&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;shcb-language__slug&quot;&gt;sql&lt;/span&gt;&lt;span class=&quot;shcb-language__paren&quot;&gt;)&lt;/span&gt;&lt;/small&gt;&lt;i class=&quot;icon-copy btn-copy-code&quot; style=&quot;background-image: var(--icon-copy-url); background-repeat: no-repeat; cursor: pointer; display: block; height: 20px; margin: 0.5rem; opacity: 0; position: absolute; right: 0px; top: 0px; transition: opacity 0.2s linear 0s; width: 20px;&quot;&gt;&lt;/i&gt;&lt;/pre&gt;&lt;p style=&quot;background-color: white; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, Oxygen-Sans, Ubuntu, Cantarell, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 16px;&quot;&gt;This picture shows the output of the query that shows the duplicate emails:&lt;/p&gt;&lt;figure class=&quot;wp-block-image&quot; style=&quot;background-color: white; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, Oxygen-Sans, Ubuntu, Cantarell, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 16px; margin: 1em 0px;&quot;&gt;&lt;img alt=&quot;MySQL find duplicate values example&quot; class=&quot;wp-image-6309 lazyloaded&quot; data-sizes=&quot;(max-width: 272px) 100vw, 272px&quot; data-src=&quot;https://www.mysqltutorial.org/wp-content/uploads/2017/07/MySQL-find-duplicate-values-example.png&quot; data-srcset=&quot;https://www.mysqltutorial.org/wp-content/uploads/2017/07/MySQL-find-duplicate-values-example.png 272w, https://www.mysqltutorial.org/wp-content/uploads/2017/07/MySQL-find-duplicate-values-example-270x98.png 270w&quot; height=&quot;98&quot; sizes=&quot;(max-width: 272px) 100vw, 272px&quot; src=&quot;https://www.mysqltutorial.org/wp-content/uploads/2017/07/MySQL-find-duplicate-values-example.png&quot; srcset=&quot;https://www.mysqltutorial.org/wp-content/uploads/2017/07/MySQL-find-duplicate-values-example.png 272w, https://www.mysqltutorial.org/wp-content/uploads/2017/07/MySQL-find-duplicate-values-example-270x98.png 270w&quot; style=&quot;border-radius: inherit; border-style: none; filter: var(--image-filter); height: auto; max-width: 100%;&quot; title=&quot;MySQL find duplicate values example&quot; width=&quot;272&quot; /&gt;&lt;/figure&gt;&lt;h2 style=&quot;background-color: white; color: var(--heading-color); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, Oxygen-Sans, Ubuntu, Cantarell, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 1.5rem; font-weight: 400; margin-bottom: 1rem; padding: 0px;&quot;&gt;Find duplicate values in multiple columns&lt;/h2&gt;&lt;p style=&quot;background-color: white; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, Oxygen-Sans, Ubuntu, Cantarell, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 16px;&quot;&gt;Sometimes, you want to find duplicate rows based on multiple columns instead of one. In this case, you can use the following query:&lt;/p&gt;&lt;pre aria-describedby=&quot;shcb-language-6&quot; class=&quot;wp-block-code&quot; data-shcb-language-name=&quot;SQL (Structured Query Language)&quot; data-shcb-language-slug=&quot;sql&quot; style=&quot;background-color: white; border: 0px; font-family: monospace, monospace; font-size: 16px; padding: 0px; position: relative;&quot;&gt;&lt;div style=&quot;overflow: auto;&quot;&gt;&lt;code class=&quot;hljs language-sql&quot; style=&quot;background: rgb(51, 51, 51); box-sizing: border-box; color: white; display: block; font-family: var(--font-family-code); font-size: 0.9rem; overflow-x: auto; padding: 1rem;&quot;&gt;&lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;SELECT&lt;/span&gt; 
    col1, &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;COUNT&lt;/span&gt;(col1),
    col2, &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;COUNT&lt;/span&gt;(col2),
    ...

&lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;FROM&lt;/span&gt;
    table_name
&lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;GROUP&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;BY&lt;/span&gt; 
    col1, 
    col2, ...
&lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;HAVING&lt;/span&gt; 
       (&lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;COUNT&lt;/span&gt;(col1) &amp;gt; &lt;span class=&quot;hljs-number&quot; style=&quot;color: #d36363;&quot;&gt;1&lt;/span&gt;) &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;AND&lt;/span&gt; 
       (&lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;COUNT&lt;/span&gt;(col2) &amp;gt; &lt;span class=&quot;hljs-number&quot; style=&quot;color: #d36363;&quot;&gt;1&lt;/span&gt;) &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;AND&lt;/span&gt; 
       ...
&lt;/code&gt;&lt;/div&gt;&lt;small class=&quot;shcb-language&quot; id=&quot;shcb-language-6&quot; style=&quot;border: 0px; clip-path: inset(50%); clip: rect(1px, 1px, 1px, 1px); font-size: 12.8px; height: 1px; margin: -1px; overflow-wrap: normal; overflow: hidden; padding: 0px; position: absolute; width: 1px; word-break: normal;&quot;&gt;&lt;span class=&quot;shcb-language__label&quot;&gt;Code language:&lt;/span&gt; &lt;span class=&quot;shcb-language__name&quot;&gt;SQL (Structured Query Language)&lt;/span&gt; &lt;span class=&quot;shcb-language__paren&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;shcb-language__slug&quot;&gt;sql&lt;/span&gt;&lt;span class=&quot;shcb-language__paren&quot;&gt;)&lt;/span&gt;&lt;/small&gt;&lt;i class=&quot;icon-copy btn-copy-code&quot; style=&quot;background-image: var(--icon-copy-url); background-repeat: no-repeat; cursor: pointer; display: block; height: 20px; margin: 0.5rem; opacity: 0; position: absolute; right: 0px; top: 0px; transition: opacity 0.2s linear 0s; width: 20px;&quot;&gt;&lt;/i&gt;&lt;/pre&gt;&lt;p style=&quot;background-color: white; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, Oxygen-Sans, Ubuntu, Cantarell, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 16px;&quot;&gt;Rows are considered duplicate only when the combination of columns are duplicate therefore we used the&amp;nbsp;&lt;a href=&quot;https://www.mysqltutorial.org/mysql-and/&quot; style=&quot;background-color: transparent; text-decoration-line: none;&quot;&gt;&lt;code style=&quot;background-color: var(--inline-code-bg-color); border-radius: 3px; color: var(--inline-code-color); font-family: var(--font-family-code); font-size: 0.875rem; padding: 0.25em 0.5em;&quot;&gt;AND&lt;/code&gt;&lt;/a&gt;&amp;nbsp;operator in the&amp;nbsp;&lt;code style=&quot;background-color: var(--inline-code-bg-color); border-radius: 3px; color: var(--inline-code-color); font-family: var(--font-family-code); font-size: 0.875rem; padding: 0.25em 0.5em;&quot;&gt;&lt;a href=&quot;https://www.mysqltutorial.org/mysql-having.aspx&quot; style=&quot;background-color: transparent; text-decoration-line: none;&quot;&gt;HAVING&lt;/a&gt;&lt;/code&gt;&amp;nbsp;clause.&lt;/p&gt;&lt;p style=&quot;background-color: white; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, Oxygen-Sans, Ubuntu, Cantarell, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 16px;&quot;&gt;For example, to find rows in the&amp;nbsp;&lt;code style=&quot;background-color: var(--inline-code-bg-color); border-radius: 3px; color: var(--inline-code-color); font-family: var(--font-family-code); font-size: 0.875rem; padding: 0.25em 0.5em;&quot;&gt;contacts&lt;/code&gt;&amp;nbsp;table with duplicate values in&amp;nbsp;&lt;code style=&quot;background-color: var(--inline-code-bg-color); border-radius: 3px; color: var(--inline-code-color); font-family: var(--font-family-code); font-size: 0.875rem; padding: 0.25em 0.5em;&quot;&gt;first_name&lt;/code&gt;,&amp;nbsp;&lt;code style=&quot;background-color: var(--inline-code-bg-color); border-radius: 3px; color: var(--inline-code-color); font-family: var(--font-family-code); font-size: 0.875rem; padding: 0.25em 0.5em;&quot;&gt;last_name&lt;/code&gt;, and&amp;nbsp;&lt;code style=&quot;background-color: var(--inline-code-bg-color); border-radius: 3px; color: var(--inline-code-color); font-family: var(--font-family-code); font-size: 0.875rem; padding: 0.25em 0.5em;&quot;&gt;email&lt;/code&gt;&amp;nbsp;column, you use the following query:&lt;/p&gt;&lt;pre aria-describedby=&quot;shcb-language-7&quot; class=&quot;wp-block-code&quot; data-shcb-language-name=&quot;SQL (Structured Query Language)&quot; data-shcb-language-slug=&quot;sql&quot; style=&quot;background-color: white; border: 0px; font-family: monospace, monospace; font-size: 16px; padding: 0px; position: relative;&quot;&gt;&lt;div style=&quot;overflow: auto;&quot;&gt;&lt;code class=&quot;hljs language-sql&quot; style=&quot;background: rgb(51, 51, 51); box-sizing: border-box; color: white; display: block; font-family: var(--font-family-code); font-size: 0.9rem; overflow-x: auto; padding: 1rem;&quot;&gt;&lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;SELECT&lt;/span&gt; 
    first_name, &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;COUNT&lt;/span&gt;(first_name),
    last_name,  &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;COUNT&lt;/span&gt;(last_name),
    email,      &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;COUNT&lt;/span&gt;(email)
&lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;FROM&lt;/span&gt;
    contacts
&lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;GROUP&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;BY&lt;/span&gt; 
    first_name , 
    last_name , 
    email
&lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;HAVING&lt;/span&gt;  &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;COUNT&lt;/span&gt;(first_name) &amp;gt; &lt;span class=&quot;hljs-number&quot; style=&quot;color: #d36363;&quot;&gt;1&lt;/span&gt;
    &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;AND&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;COUNT&lt;/span&gt;(last_name) &amp;gt; &lt;span class=&quot;hljs-number&quot; style=&quot;color: #d36363;&quot;&gt;1&lt;/span&gt;
    &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;AND&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #fcc28c;&quot;&gt;COUNT&lt;/span&gt;(email) &amp;gt; &lt;span class=&quot;hljs-number&quot; style=&quot;color: #d36363;&quot;&gt;1&lt;/span&gt;;
&lt;/code&gt;&lt;/div&gt;&lt;small class=&quot;shcb-language&quot; id=&quot;shcb-language-7&quot; style=&quot;border: 0px; clip-path: inset(50%); clip: rect(1px, 1px, 1px, 1px); font-size: 12.8px; height: 1px; margin: -1px; overflow-wrap: normal; overflow: hidden; padding: 0px; position: absolute; width: 1px; word-break: normal;&quot;&gt;&lt;span class=&quot;shcb-language__label&quot;&gt;Code language:&lt;/span&gt; &lt;span class=&quot;shcb-language__name&quot;&gt;SQL (Structured Query Language)&lt;/span&gt; &lt;span class=&quot;shcb-language__paren&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;shcb-language__slug&quot;&gt;sql&lt;/span&gt;&lt;span class=&quot;shcb-language__paren&quot;&gt;)&lt;/span&gt;&lt;/small&gt;&lt;i class=&quot;icon-copy btn-copy-code&quot; style=&quot;background-image: var(--icon-copy-url); background-repeat: no-repeat; cursor: pointer; display: block; height: 20px; margin: 0.5rem; opacity: 0; position: absolute; right: 0px; top: 0px; transition: opacity 0.2s linear 0s; width: 20px;&quot;&gt;&lt;/i&gt;&lt;/pre&gt;&lt;p style=&quot;background-color: white; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, Oxygen-Sans, Ubuntu, Cantarell, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 16px;&quot;&gt;The following illustrates the output of the query:&lt;/p&gt;&lt;figure class=&quot;wp-block-image&quot; style=&quot;background-color: white; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, Oxygen-Sans, Ubuntu, Cantarell, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 16px; margin: 1em 0px;&quot;&gt;&lt;img alt=&quot;MySQL find duplicate values on multiple columns&quot; class=&quot;wp-image-6310 lazyloaded&quot; data-sizes=&quot;(max-width: 626px) 100vw, 626px&quot; data-src=&quot;https://www.mysqltutorial.org/wp-content/uploads/2017/07/MySQL-find-duplicate-values-on-multiple-columns.png&quot; data-srcset=&quot;https://www.mysqltutorial.org/wp-content/uploads/2017/07/MySQL-find-duplicate-values-on-multiple-columns.png 626w, https://www.mysqltutorial.org/wp-content/uploads/2017/07/MySQL-find-duplicate-values-on-multiple-columns-300x47.png 300w&quot; height=&quot;98&quot; sizes=&quot;(max-width: 626px) 100vw, 626px&quot; src=&quot;https://www.mysqltutorial.org/wp-content/uploads/2017/07/MySQL-find-duplicate-values-on-multiple-columns.png&quot; srcset=&quot;https://www.mysqltutorial.org/wp-content/uploads/2017/07/MySQL-find-duplicate-values-on-multiple-columns.png 626w, https://www.mysqltutorial.org/wp-content/uploads/2017/07/MySQL-find-duplicate-values-on-multiple-columns-300x47.png 300w&quot; style=&quot;border-radius: inherit; border-style: none; filter: var(--image-filter); height: auto; max-width: 100%;&quot; title=&quot;MySQL find duplicate values on multiple columns&quot; width=&quot;626&quot; /&gt;&lt;/figure&gt;&lt;p style=&quot;background-color: white; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, Oxygen-Sans, Ubuntu, Cantarell, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 16px;&quot;&gt;In this tutorial, you have learned how to find duplicate rows based on value of one or more columns in MySQL.&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlinfodata.blogspot.com/feeds/5844025531601006886/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sqlinfodata.blogspot.com/2021/09/how-to-find-duplicate-values-in-mysql.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2706799863772725741/posts/default/5844025531601006886'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2706799863772725741/posts/default/5844025531601006886'/><link rel='alternate' type='text/html' href='http://sqlinfodata.blogspot.com/2021/09/how-to-find-duplicate-values-in-mysql.html' title='How To Find Duplicate Values in MySQL'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2706799863772725741.post-8394253200734471309</id><published>2021-09-02T05:54:00.001-07:00</published><updated>2021-09-02T05:54:02.513-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="MySQL"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL"/><title type='text'>What does a MySQL database contain?</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;span style=&quot;background-color: white; color: #373e3f; font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Source Sans Pro&amp;quot;, Helvetica, Arial; font-size: 16px; letter-spacing: 0.1px;&quot;&gt;A MySQL database contains one or more tables, each of which contains records or rows. Within these rows are various columns or fields that contain the data itself.&lt;/span&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlinfodata.blogspot.com/feeds/8394253200734471309/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sqlinfodata.blogspot.com/2021/09/what-does-mysql-database-contain.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2706799863772725741/posts/default/8394253200734471309'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2706799863772725741/posts/default/8394253200734471309'/><link rel='alternate' type='text/html' href='http://sqlinfodata.blogspot.com/2021/09/what-does-mysql-database-contain.html' title='What does a MySQL database contain?'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2706799863772725741.post-3844377928070260613</id><published>2021-09-02T05:52:00.009-07:00</published><updated>2021-09-02T05:56:26.551-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Database"/><category scheme="http://www.blogger.com/atom/ns#" term="MySQL"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL"/><title type='text'>What does SQL in MySQL stand for?</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;span style=&quot;letter-spacing: 0.1px;&quot;&gt;&lt;span face=&quot;-apple-system, system-ui, BlinkMacSystemFont, Segoe UI, Roboto, Source Sans Pro, Helvetica, Arial&quot; style=&quot;color: #373e3f;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;The SQL in MySQL stands for Structured Query Language. This language is also used in other databases such as Oracle and Microsoft SQL Server. &amp;nbsp;One can use commands such as the following to send requests from a database:&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;letter-spacing: 0.1px;&quot;&gt;&lt;span face=&quot;-apple-system, system-ui, BlinkMacSystemFont, Segoe UI, Roboto, Source Sans Pro, Helvetica, Arial&quot; style=&quot;color: #373e3f;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #c7254e; font-family: monospace, monospace;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; font-size: 1.4rem;&quot;&gt;SELECT title FROM publications WHERE author = &#39; J. K. Rowling’;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;background-color: #f9f2f4; font-size: 22.4px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: monospace, monospace; letter-spacing: 0.1px;&quot;&gt;

&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;background-color: #f5f8ff; font-size: 14px; white-space: pre;&quot;&gt;Note that SQL is not case sensitive. However, it is a good practice to write&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: monospace, monospace; letter-spacing: 0.1px;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;background-color: #f5f8ff; font-size: 14px; white-space: pre;&quot;&gt; the SQL &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: #f5f8ff; color: #444444; font-family: monospace, monospace; font-size: 14px; letter-spacing: 0.1px; white-space: pre;&quot;&gt;keywords in CAPS and other names and variables in a small case.&lt;/span&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlinfodata.blogspot.com/feeds/3844377928070260613/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sqlinfodata.blogspot.com/2021/09/what-does-sql-in-mysql-stand-for.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2706799863772725741/posts/default/3844377928070260613'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2706799863772725741/posts/default/3844377928070260613'/><link rel='alternate' type='text/html' href='http://sqlinfodata.blogspot.com/2021/09/what-does-sql-in-mysql-stand-for.html' title='What does SQL in MySQL stand for?'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2706799863772725741.post-2081740896303849309</id><published>2021-09-02T05:51:00.002-07:00</published><updated>2021-09-02T05:51:10.859-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Database"/><category scheme="http://www.blogger.com/atom/ns#" term="MySQL"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL"/><title type='text'>What do you mean by ‘databases’?</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;span style=&quot;background-color: white; color: #373e3f; font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Source Sans Pro&amp;quot;, Helvetica, Arial; font-size: 1.6rem; letter-spacing: 0.1px;&quot;&gt;A database is a structured collection of data stored in a computer system and organized in a way to be quickly searched. With databases, information can be rapidly retrieved.&lt;/span&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlinfodata.blogspot.com/feeds/2081740896303849309/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sqlinfodata.blogspot.com/2021/09/what-do-you-mean-by-databases.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2706799863772725741/posts/default/2081740896303849309'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2706799863772725741/posts/default/2081740896303849309'/><link rel='alternate' type='text/html' href='http://sqlinfodata.blogspot.com/2021/09/what-do-you-mean-by-databases.html' title='What do you mean by ‘databases’?'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2706799863772725741.post-8322664780958653007</id><published>2021-09-02T05:50:00.001-07:00</published><updated>2021-09-02T05:50:08.912-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="MySQL"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL"/><category scheme="http://www.blogger.com/atom/ns#" term="Sql Interview Questions"/><title type='text'>What are some of the advantages of using MySQL?</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;ul style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: white; border: 0px; box-sizing: inherit; color: #1a3d3c; font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Source Sans Pro&amp;quot;, Helvetica, Arial; font-size: 16px; letter-spacing: 0.1px; line-height: 1.5; list-style-image: initial; list-style-position: initial; margin: 0px; padding: 0px 0px 0px 2em; text-rendering: optimizelegibility; vertical-align: baseline;&quot;&gt;&lt;li style=&quot;-webkit-font-smoothing: subpixel-antialiased; border: 0px; box-sizing: inherit; font-size: 1.6rem; line-height: 1.5; margin: 0px; padding: 0px; text-rendering: optimizelegibility; vertical-align: baseline;&quot;&gt;&lt;u style=&quot;-webkit-font-smoothing: subpixel-antialiased; border: 0px; box-sizing: inherit; font-size: 1.6rem; line-height: 1.5; margin: 0px; padding: 0px; text-rendering: optimizelegibility; vertical-align: baseline;&quot;&gt;Flexibility:&lt;/u&gt;&amp;nbsp;MySQL runs on all operating systems&lt;/li&gt;&lt;li style=&quot;-webkit-font-smoothing: subpixel-antialiased; border: 0px; box-sizing: inherit; font-size: 1.6rem; line-height: 1.5; margin: 0px; padding: 0.4rem 0px 0px; text-rendering: optimizelegibility; vertical-align: baseline;&quot;&gt;&lt;u style=&quot;-webkit-font-smoothing: subpixel-antialiased; border: 0px; box-sizing: inherit; font-size: 1.6rem; line-height: 1.5; margin: 0px; padding: 0px; text-rendering: optimizelegibility; vertical-align: baseline;&quot;&gt;Power:&lt;/u&gt;&amp;nbsp;MySQL focuses on performance&lt;/li&gt;&lt;li style=&quot;-webkit-font-smoothing: subpixel-antialiased; border: 0px; box-sizing: inherit; font-size: 1.6rem; line-height: 1.5; margin: 0px; padding: 0.4rem 0px 0px; text-rendering: optimizelegibility; vertical-align: baseline;&quot;&gt;&lt;u style=&quot;-webkit-font-smoothing: subpixel-antialiased; border: 0px; box-sizing: inherit; font-size: 1.6rem; line-height: 1.5; margin: 0px; padding: 0px; text-rendering: optimizelegibility; vertical-align: baseline;&quot;&gt;Enterprise-Level SQL Features:&lt;/u&gt;&amp;nbsp;MySQL had for some time been lacking in advanced features such as subqueries, views, and stored procedures.&lt;/li&gt;&lt;li style=&quot;-webkit-font-smoothing: subpixel-antialiased; border: 0px; box-sizing: inherit; font-size: 1.6rem; line-height: 1.5; margin: 0px; padding: 0.4rem 0px 0px; text-rendering: optimizelegibility; vertical-align: baseline;&quot;&gt;&lt;u style=&quot;-webkit-font-smoothing: subpixel-antialiased; border: 0px; box-sizing: inherit; font-size: 1.6rem; line-height: 1.5; margin: 0px; padding: 0px; text-rendering: optimizelegibility; vertical-align: baseline;&quot;&gt;Full-Text Indexing and Searching&lt;/u&gt;&lt;/li&gt;&lt;li style=&quot;-webkit-font-smoothing: subpixel-antialiased; border: 0px; box-sizing: inherit; font-size: 1.6rem; line-height: 1.5; margin: 0px; padding: 0.4rem 0px 0px; text-rendering: optimizelegibility; vertical-align: baseline;&quot;&gt;&lt;u style=&quot;-webkit-font-smoothing: subpixel-antialiased; border: 0px; box-sizing: inherit; font-size: 1.6rem; line-height: 1.5; margin: 0px; padding: 0px; text-rendering: optimizelegibility; vertical-align: baseline;&quot;&gt;Query Caching:&lt;/u&gt;&amp;nbsp;This helps enhance the speed of MySQL greatly&lt;/li&gt;&lt;li style=&quot;-webkit-font-smoothing: subpixel-antialiased; border: 0px; box-sizing: inherit; font-size: 1.6rem; line-height: 1.5; margin: 0px; padding: 0.4rem 0px 0px; text-rendering: optimizelegibility; vertical-align: baseline;&quot;&gt;&lt;u style=&quot;-webkit-font-smoothing: subpixel-antialiased; border: 0px; box-sizing: inherit; font-size: 1.6rem; line-height: 1.5; margin: 0px; padding: 0px; text-rendering: optimizelegibility; vertical-align: baseline;&quot;&gt;Replication:&lt;/u&gt;&amp;nbsp;One MySQL server can be duplicated on another, providing numerous advantages&lt;/li&gt;&lt;li style=&quot;-webkit-font-smoothing: subpixel-antialiased; border: 0px; box-sizing: inherit; font-size: 1.6rem; line-height: 1.5; margin: 0px; padding: 0.4rem 0px 0px; text-rendering: optimizelegibility; vertical-align: baseline;&quot;&gt;&lt;u style=&quot;-webkit-font-smoothing: subpixel-antialiased; border: 0px; box-sizing: inherit; font-size: 1.6rem; line-height: 1.5; margin: 0px; padding: 0px; text-rendering: optimizelegibility; vertical-align: baseline;&quot;&gt;Configuration and Security&lt;/u&gt;&lt;/li&gt;&lt;/ul&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlinfodata.blogspot.com/feeds/8322664780958653007/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sqlinfodata.blogspot.com/2021/09/what-are-some-of-advantages-of-using.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2706799863772725741/posts/default/8322664780958653007'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2706799863772725741/posts/default/8322664780958653007'/><link rel='alternate' type='text/html' href='http://sqlinfodata.blogspot.com/2021/09/what-are-some-of-advantages-of-using.html' title='What are some of the advantages of using MySQL?'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2706799863772725741.post-5990497555271010309</id><published>2021-08-31T08:36:00.002-07:00</published><updated>2021-08-31T08:36:11.666-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="MySQL"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL"/><title type='text'>What is MySQL?</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;span style=&quot;background-color: white; color: #373e3f; font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Source Sans Pro&amp;quot;, Helvetica, Arial; font-size: 16px; letter-spacing: 0.1px;&quot;&gt;MySQL is a database management system for web servers. It can grow with the website as it is highly scalable. Most of the websites today are powered by MySQL.&lt;/span&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlinfodata.blogspot.com/feeds/5990497555271010309/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sqlinfodata.blogspot.com/2021/08/what-is-mysql.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2706799863772725741/posts/default/5990497555271010309'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2706799863772725741/posts/default/5990497555271010309'/><link rel='alternate' type='text/html' href='http://sqlinfodata.blogspot.com/2021/08/what-is-mysql.html' title='What is MySQL?'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2706799863772725741.post-5539865909317271241</id><published>2021-08-31T08:24:00.001-07:00</published><updated>2021-08-31T08:24:31.200-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><category scheme="http://www.blogger.com/atom/ns#" term="PHP Functions"/><title type='text'>What is Member Variable and Member function?</title><content type='html'>&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;span face=&quot;&amp;quot;Nunito Sans&amp;quot;, sans-serif&quot; style=&quot;box-sizing: border-box; color: #444444; font-size: 16px; font-weight: 700;&quot;&gt;Member Variable&lt;/span&gt;&lt;span face=&quot;&amp;quot;Nunito Sans&amp;quot;, sans-serif&quot; style=&quot;color: #444444; font-size: 16px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span face=&quot;&amp;quot;Nunito Sans&amp;quot;, sans-serif&quot; style=&quot;color: #444444; font-size: 16px;&quot;&gt;− These are the variables defined inside a class. This data will be invisible to the outside of the class and can be accessed via member functions. These variables are called attribute of the object once an object is created.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; color: #444444; font-family: &amp;quot;Nunito Sans&amp;quot;, sans-serif; font-size: 16px; line-height: 24px; margin: 0px 0px 10px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Member function&lt;/span&gt;&amp;nbsp;− These are the function defined inside a class and are used to access object data.&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlinfodata.blogspot.com/feeds/5539865909317271241/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sqlinfodata.blogspot.com/2021/08/what-is-member-variable-and-member.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2706799863772725741/posts/default/5539865909317271241'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2706799863772725741/posts/default/5539865909317271241'/><link rel='alternate' type='text/html' href='http://sqlinfodata.blogspot.com/2021/08/what-is-member-variable-and-member.html' title='What is Member Variable and Member function?'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>