The table below is is an example of a SQLi query to a database on this server entitled classicmodelsThe PHP query below generates the HTML table which is selected from six fields in the customerstable and then passed off to the DataTables.js jquery plugin for diplay on the client side. The PHP script that accomplishes this is beneath the table.

Customer Name First Name Last Name City Country Credit Limit
Atelier graphiqueCarine SchmittNantesFrance21000
Signal Gift StoresJeanKingLas VegasUSA71800
Australian Collectors, Co.PeterFergusonMelbourneAustralia117300
La Rochelle GiftsJanine LabruneNantesFrance118200
Baane Mini ImportsJonas BergulfsenStavernNorway81700
Mini Gifts Distributors Ltd.SusanNelsonSan RafaelUSA210500
Havel & Zbyszek CoZbyszek PiestrzeniewiczWarszawaPoland0
Blauer See Auto, Co.RolandKeitelFrankfurtGermany59700
Mini Wheels Co.JulieMurphySan FranciscoUSA64600
Land of Toys Inc.KwaiLeeNYCUSA114900
Euro+ Shopping ChannelDiego FreyreMadridSpain227600
Volvo Model Replicas, CoChristina BerglundLuleåSweden53100
Danish Wholesale ImportsJytte PetersenKobenhavnDenmark83400
Saveley & Henriot, Co.Mary SaveleyLyonFrance123900
Dragon Souveniers, Ltd.EricNatividadSingaporeSingapore103800
Muscle Machine IncJeffYoungNYCUSA138500
Diecast Classics Inc.KelvinLeongAllentownUSA100600
Technics Stores Inc.JuriHashimotoBurlingameUSA84600
Handji Gifts& CoWendyVictorinoSingaporeSingapore97900
Herkku GiftsVeyselOeztanBergenNorway 96800
American Souvenirs IncKeithFrancoNew HavenUSA0
Porto Imports Co.Isabel de CastroLisboaPortugal0
Daedalus Designs ImportsMartine RancéLilleFrance82900
La Corne D'abondance, Co.MarieBertrandParisFrance84300
Cambridge Collectables Co.JerryTsengCambridgeUSA43400
Gift Depot Inc.JulieKingBridgewaterUSA84300
Osaka Souveniers Co.MoryKentaryKita-kuJapan81200
Vitachrome Inc.MichaelFrickNYCUSA76400
Toys of Finland, Co.MattiKarttunenHelsinkiFinland96500
AV Stores, Co.RachelAshworthManchesterUK136800
Clover Collections, Co.DeanCassidyDublinIreland69400
Auto-Moto Classics Inc.LeslieTaylorBrickhavenUSA23000
UK Collectables, Ltd.ElizabethDevonLiverpoolUK92700
Canadian Gift Exchange NetworkYoshi TamuriVancouverCanada90300
Online Mini CollectablesMiguelBarajasBrickhavenUSA68700
Toys4GrownUps.comJulieYoungPasadenaUSA90700
Asian Shopping Network, CoBrydeyWalkerSingaporeSingapore0
Mini CaravyFrédérique CiteauxStrasbourgFrance53800
King Kong Collectables, Co.MikeGaoCentral Hong KongHong Kong58600
Enaco DistributorsEduardo SaavedraBarcelonaSpain60300
Boards & Toys Co.MaryYoungGlendaleUSA11000
Natürlich AutosHorst KlossCunewaldeGermany0
Heintze CollectablesPalleIbsenÅrhusDenmark120800
Québec Home Shopping NetworkJean FresnièreMontréalCanada48700
ANG ResellersAlejandra CaminoMadridSpain0
Collectable Mini Designs Co.ValarieThompsonSan DiegoUSA105000
giftsbymail.co.ukHelen BennettCowesUK93900
Alpha CognacAnnette RouletToulouseFrance61100
Messner Shopping NetworkRenate MessnerFrankfurtGermany0
Amica Models & Co.Paolo AccortiTorinoItaly113000
Lyon SouveniersDanielDa SilvaParisFrance68100
Auto Associés & Cie.Daniel ToniniVersaillesFrance77900
Toms Spezialitäten, LtdHenriette PfalzheimKölnGermany120400
Royal Canadian Collectables, Ltd.Elizabeth LincolnTsawassenCanada89600
Franken Gifts, CoPeter FrankenMünchenGermany0
Anna's Decorations, LtdAnnaO'HaraNorth SydneyAustralia107800
Rovelli GiftsGiovanni RovelliBergamoItaly119600
Souveniers And Things Co.AdrianHuxleyChatswoodAustralia93300
Marta's Replicas Co.MartaHernandezCambridgeUSA123700
BG&E CollectablesEdHarrisonFribourgSwitzerland0
Vida Sport, LtdMihaelHolzGenèveSwitzerland141300
Norway Gifts By Mail, Co.JanKlaeboeOsloNorway 95100
Schuyler ImportsBradleySchuylerAmsterdamNetherlands0
Der Hund ImportsMelAndersenBerlinGermany0
Oulu Toy Supplies, Inc.PirkkoKoskitaloOuluFinland90500
Petit AutoCatherine DeweyBruxellesBelgium79900
Mini ClassicsSteveFrickWhite PlainsUSA102700
Mini Creations Ltd.WingHuangNew BedfordUSA94500
Corporate Gift Ideas Co.JulieBrownSan FranciscoUSA105000
Down Under Souveniers, IncMikeGrahamAuckland New Zealand88000
Stylish Desk Decors, Co.Ann BrownLondonUK77000
Tekni Collectables Inc.WilliamBrownNewarkUSA43000
Australian Gift Network, CoBenCalaghanSouth BrisbaneAustralia51600
Suominen SouveniersKalleSuominenEspooFinland98800
Cramer Spezialitäten, LtdPhilip CramerBrandenburgGermany0
Classic Gift Ideas, IncFranciscaCervantesPhiladelphiaUSA81100
CAF ImportsJesusFernandezMadridSpain59600
Men 'R' US Retailers, Ltd.BrianChandlerLos AngelesUSA57700
Asian Treasures, Inc.Patricia McKennaCorkIreland0
Marseille Mini AutosLaurence LebihanMarseilleFrance65000
Reims CollectablesPaul HenriotReimsFrance81100
SAR Distributors, CoArmandKugerHatfieldSouth Africa0
GiftsForHim.comWalesMacKinlayAucklandNew Zealand77700
Kommission AutoKarinJosephsMünsterGermany0
Gifts4AllAges.comJuriYoshidoBostonUSA41900
Online Diecast Creations Co.DorothyYoungNashuaUSA114200
Lisboa Souveniers, IncLino RodriguezLisboaPortugal0
Precious CollectablesBraunUrsBernSwitzerland0
Collectables For Less Inc.AllenNelsonBrickhavenUSA70700
Royale BelgePascale CartrainCharleroiBelgium23500
Salzburg CollectablesGeorg PippsSalzburgAustria71700
Cruz & Sons Co.ArnoldCruzMakati CityPhilippines81500
L'ordine SouveniersMaurizio MoroniReggio EmiliaItaly121400
Tokyo Collectables, LtdAkikoShimamuraMinato-kuJapan94400
Auto Canal+ PetitDominiquePerrierParisFrance95000
Stuttgart Collectable ExchangeRita MüllerStuttgartGermany0
Extreme Desk Decorations, LtdSarahMcRoyWellingtonNew Zealand86800
Bavarian Collectables Imports, Co.MichaelDonnermeyerMunichGermany77000
Classic Legends Inc.MariaHernandezNYCUSA67500
Feuer Online Stores, IncAlexander FeuerLeipzigGermany0
Gift Ideas Corp.DanLewisGlendaleUSA49700
Scandinavian Gift IdeasMarthaLarssonBräckeSweden116400
The Sharp Gifts WarehouseSueFrickSan JoseUSA77600
Mini Auto WerkeRoland MendelGrazAustria45300
Super Scale Inc.LeslieMurphyNew HavenUSA95400
Microscale Inc.YuChoiNYCUSA39800
Corrida Auto Replicas, LtdMartín SommerMadridSpain104600
Warburg ExchangeSven OttliebAachenGermany0
FunGiftIdeas.comVioletaBenitezNew BedfordUSA85800
Anton Designs, Ltd.CarmenAntonMadridSpain0
Australian Collectables, LtdSeanClenahanGlen WaverlyAustralia60300
Frau da CollezioneFrancoRicottiMilanItaly34800
West Coast Collectables Co.SteveThompsonBurbankUSA55400
Mit Vergnügen & Co.Hanna MoosMannheimGermany0
Kremlin Collectables, Co.Alexander SemenovSaint PetersburgRussia0
Raanan Stores, IncRaananAltagar,G MHerzliaIsrael0
Iberia Gift Imports, Corp.José Pedro RoelSevillaSpain65700
Motor Mint Distributors Inc.RosaSalazarPhiladelphiaUSA72600
Signal Collectibles Ltd.SueTaylorBrisbaneUSA60300
Double Decker Gift Stores, LtdThomas SmithLondonUK43300
Diecast CollectablesValarieFrancoBostonUSA85100
Kelly's Gift ShopTonySnowdenAuckland New Zealand110000

PHP Code

<?php
$con=mysqli_connect("localhost","USERNAME","PASSWORD","classicmodels");
// Check connection
if (mysqli_connect_errno()) {
  echo "Failed to connect to MySQL: " . mysqli_connect_error();
}

$result = mysqli_query($con,"SELECT * FROM customers");

while($row = mysqli_fetch_array($result)) {
  echo "<tr>";
  echo "<td>" . $row['customerName'] . "</td>";
  echo "<td>" . $row['contactFirstName'] . "</td>";
  echo "<td>" . $row['contactLastName'] . "</td>";
  echo "<td>" . $row['city'] . "</td>";
  echo "<td>" . $row['country'] . "</td>";
  echo "<td>" . $row['creditLimit'] . "</td>";
  echo "</tr>";
}


mysqli_close($con);
?>