Stergerea unei baze de date
Stefanescu Mihai 3 years ago PHP
Acest articol face parte din cursul Toate lectiile PHP.
Te poti inscrie la acest curs aici!
Daca nu mai aveti nevoie de o baza de date puteti sa o stergeti. Ca si in cazul anterior, putem folosi functia query pentru a sterge o baza de date.
<?php $dbhost = 'localhost'; $dbuser = 'user'; $dbpass = 'parola'; $conn = new mysqli($dbhost, $dbuser, $dbpass); if(! $conn ){ die('Nu ma pot conecta: ' . $conn->error()); } $sql = 'DROP DATABASE test_mike'; $retval = $conn->query( $sql ); if(! $retval ){ die('Nu pot sterge baza de date: ' . $conn->error()); } echo "Baza de date stearsa.\n"; $conn->close(); ?>
Atentie: Stergerea unei baze de date este periculoasa. Asigurati-va ca stergeti ce trebuie si/sau ca aveti un backup.
Stergerea unui tabel
Ca si in cazul de mai sus, putem folosi functia query() pentru a sterge un tabel.
<?php $dbhost = 'localhost'; $dbuser = 'root'; $dbpass = ''; $dbdb = 'test_mike'; $conn = new mysqli($dbhost, $dbuser, $dbpass, $dbdb); if(! $conn ){ die('Nu ma pot conecta: ' . $conn->error()); } $sql = 'DROP TABLE users'; $retval = $conn->query( $sql ); if(! $retval ){ die('Nu pot sterge tabelul: ' . $conn->error()); } echo "Tabel sters.\n"; $conn->close(); ?>
Get in touch
Pentru nelamuriri, dubii, comentarii si chestii de pe suflet ne putem auzi pe Discord, Reddit sau poti deschide o discutie noua pe forum
Are you spending money on Robux
#
8 months ago
Hi my loved one! I want to say that this article is amazing, nice written and come with almost all vital infos.
I would like to look more posts like this .
Wonderful article! We will be linking to this particularly great article on our site.
Keep up the great writing.
you are actually a excellent webmaster. The website loading speed is amazing.
It seems that you're doing any distinctive trick.
Moreover, The contents are masterwork. you have done
a magnificent job in this matter!
purchase fenofibrate pill <a href="https://fenoficor.com/">generic tricor 200mg</a> buy fenofibrate generic
Excellent beat ! I wish to apprentice while you amend your website, how can i subscribe for a weblog site?
The account aided me a acceptable deal. I have been a little bit acquainted of this your broadcast provided vivid transparent concept
Link exchange is nothing else but it is only placing the
other person's weblog link on your page at suitable place and other
person will also do same for you.
zaditor 1 mg pills <a href="https://geozipin.com/">order geodon online</a> imipramine cost
purchase minoxytop generic <a href="https://abcelemax.shop/">flomax generic</a> where to buy over the counter ed pills
buy generic acarbose <a href="https://tofobose.shop/">buy acarbose 25mg sale</a> buy griseofulvin 250mg online cheap
buy aspirin generic <a href="https://imitonin.com/">zovirax oral</a> order generic imiquad
It's awesome in favor of me to have a website, which is beneficial in favor of my knowledge.
thanks admin
It's really very difficult in this full of activity life to listen news
on Television, so I simply use web for that reason, and obtain the hottest information.
It's really very difficult in this full of activity life to listen news
on Television, so I simply use web for that reason, and obtain the hottest information.
Thank you for some other informative website.
Where else may I get that type of info written in such an ideal approach?
I have a mission that I'm just now working on, and I have been on the glance out for such info.
order duphaston 10 mg generic <a href="https://empaolol.com/">order empagliflozin</a> buy empagliflozin 25mg sale
brand florinef 100 mcg <a href="https://imocarbam.com/">buy generic imodium over the counter</a> buy imodium
etodolac 600 mg generic <a href="https://colotazol.shop/">buy cilostazol 100 mg without prescription</a> cilostazol 100 mg tablet
prasugrel 10 mg cost <a href="https://imocarbam.shop/">prasugrel pills</a> buy tolterodine 2mg for sale
order ferrous 100mg <a href="https://detorbic.shop/">oral ascorbic acid 500mg</a> betapace cost
purchase mestinon generic <a href="https://mestien.com/">cheap pyridostigmine</a> maxalt 5mg pills
order vasotec <a href="https://casosin.com/">order casodex online cheap</a> duphalac ca
where to buy latanoprost without a prescription <a href="https://aexeloda.shop/">buy rivastigmine 6mg online cheap</a> exelon 6mg oral
buy betahistine for sale <a href="https://haloatan.shop/">order latanoprost online cheap</a> order benemid generic
micardis 20mg price <a href="https://atizordis.shop/">order micardis 20mg online cheap</a> molnupiravir 200 mg sale
order cenforce 50mg online cheap <a href="https://chlodinir.com/">aralen cheap</a> aralen 250mg for sale
roulette casino <a href="https://furocheap.com/">order lasix 40mg generic</a> buy lasix generic
free online blackjack <a href="https://strvnonline.com/">order stromectol 3mg pill</a> stromectol buy uk
order amantadine 100mg generic <a href="https://atenulfon.shop/">oral avlosulfon</a> buy dapsone cheap
clomid price <a href="https://azatophene.com/">cheap clomiphene</a> imuran 50mg without prescription
methylprednisolone 16mg oral <a href="https://arisceon.com/">aristocort pills</a> aristocort 4mg ca
buy generic perindopril 4mg <a href="https://claegra.com/">purchase desloratadine</a> allegra 120mg us
buy generic dilantin <a href="https://sumentin.shop/">buy phenytoin without a prescription</a> ditropan cost
lioresal pills <a href="https://bactyline.shop/">endep 10mg generic</a> toradol 10mg drug
claritin buy online <a href="https://daporide.com/">order priligy</a> priligy ca
order generic baclofen 25mg <a href="https://bactyline.com/">buy baclofen no prescription</a> toradol 10mg usa
alendronate uk <a href="https://macroicine.shop/">order generic furadantin 100 mg</a> order macrodantin 100 mg online
glimepiride 1mg cost <a href="https://daporide.shop/">order amaryl 1mg sale</a> order arcoxia 60mg generic
order nortriptyline 25 mg online <a href="https://meloceto.shop/">paracetamol sale</a> buy paracetamol 500mg online cheap
buy medex online cheap <a href="https://wafetine.com/">medex over the counter</a> purchase maxolon online
order orlistat 120mg <a href="https://diltastel.com/">buy diltiazem 180mg without prescription</a> diltiazem buy online
buy pepcid 20mg online cheap <a href="https://cozolimus.shop/">oral prograf 1mg</a> order tacrolimus online cheap
buy azelastine 10ml sprayer <a href="https://acypapro.shop/">cost irbesartan</a> buy irbesartan without prescription
imitrex price <a href="https://aimaptan.com/">order generic imitrex 25mg</a> avodart pill
buy zyloprim 300mg online cheap <a href="https://allovatep.com/">allopurinol 300mg uk</a> buy rosuvastatin 20mg without prescription
buy buspin pills for sale <a href="https://ezetdarone.com/">order ezetimibe without prescription</a> cordarone 100mg canada
motilium 10mg over the counter <a href="https://domedilol.com/">domperidone oral</a> tetracycline 250mg generic
order spironolactone <a href="https://vaclorex.com/">buy valacyclovir</a> brand finpecia
help with term paper <a href="https://essaystada.com/">editing essays</a> how to write an about me essay
order fluconazole 100mg without prescription <a href="https://ampacitim.com/">buy ampicillin generic</a> order cipro 500mg generic
aurogra canada <a href="https://auroafil.com/">aurogra cheap</a> purchase estradiol generic
buy generic lamotrigine <a href="https://averzol.com/">vermox price</a> order mebendazole 100mg sale
buy cleocin 150mg online <a href="https://aperytxpro.com/">erythromycin ca</a> pills for erection
tretinoin gel price <a href="https://abvatol.com/">oral avana</a> buy avana online
nolvadex pills <a href="https://tamoitutex.com/">cheap tamoxifen 20mg</a> symbicort cost
buy cefuroxime 500mg generic <a href="https://acaropro.com/">where can i buy lumigan</a> robaxin 500mg without prescription
paperwriter <a href="https://abessonline.com/">writing better essays</a> buy cefixime 100mg generic
order amoxicillin without prescription <a href="https://biacrobol.com/">clarithromycin 500mg for sale</a> buy clarithromycin tablets
cheap calcitriol 0.25 mg <a href="https://triprefibran.com/">generic fenofibrate</a> purchase fenofibrate sale
catapres 0.1 mg generic <a href="https://cloprebol.com/">order clonidine without prescription</a> order tiotropium bromide 9 mcg for sale
buy acne pills online <a href="https://placnemedx.com/">best acne treatment teen boys</a> trileptal 600mg canada
order minocin 100mg sale <a href="https://amrenirol.com/">order generic requip 1mg</a> ropinirole 1mg pill
buy sleeping tablets online uk <a href="https://urupdiol.com/">online pharmacies sleeping pills</a> strongest weight loss prescription
tobacco cessation medications chart <a href="https://healthybonesots.com/">dmard meds list</a> strongest pain killer list
medroxyprogesterone 10mg sale <a href="https://microchloroth.com/">buy hydrochlorothiazide 25mg online</a> hydrochlorothiazide 25 mg tablet
how are antiviral drugs used <a href="https://andiabeps.com/">diabetic drugs starting with b</a> lowest gli sugar for diabetics
cyproheptadine us <a href="https://peritadin.com/">generic periactin 4mg</a> nizoral oral
antifungal cream for pediatric face <a href="https://rebloodpressure.com/">best hypertension medication combinations</a> antihypertensive tablet name
antibiotics to treat peptic ulcer <a href="https://aheartop.com/">tricks to lower blood pressure instantly</a> otc pain relief for uti
buy promethazine cheap <a href="https://proedpls.com/">buy ed medications</a> buy oral ivermectin
birth control online without insurance <a href="https://premaxejacu.com/">pe and ed treatment</a> premature ejaculation pills review
severe stomach paincaused by medication <a href="https://benauseap.com/">nausea medicines over the counter</a> medications that cause foul smelling gas