Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Czyszczenie tabeli, Za pomocą PHP
xamrex
post
Post #1





Grupa: Zarejestrowani
Postów: 267
Pomógł: 1
Dołączył: 10.08.2007

Ostrzeżenie: (0%)
-----


Witam,
Chcę za pomocą pliku wyczyścić tabelę imieniny.
Napisałem sobie taki kod:
Kod
<?php
mysql_connect("localhost","root","krasnal") or die ("Could not connect: " . mysql_error());
mysql_select_db("nuke") or die ("Could not select db: " . mysql_error());

mysql_query("TRUNCATE 'imieniny'");
?>


Ale tabela się nie czyści,
W czym może być problem??

Jest połączenie z MySQL, gdyż nie mam żadnego komunikatu Could not connect, lub Could not select db

Ten post edytował xamrex 26.02.2010, 15:44:54
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
thek
post
Post #2





Grupa: Moderatorzy
Postów: 4 362
Pomógł: 714
Dołączył: 12.02.2009
Skąd: Jak się położę tak leżę :D




  1. TRUNCATE TABLE nazwa_tabeli
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 3.10.2025 - 16:47