Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> drop table?? :/
DreeD
post 29.12.2003, 17:47:18
Post #1





Grupa: Przyjaciele php.pl
Postów: 120
Pomógł: 0
Dołączył: 29.11.2003
Skąd: Tarnów

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


czy jest jakis sposob na usuniecie wszystkich tabeli w bazie nie usuwajac tej bazy??
prosze o szybka odpowiedz
Go to the top of the page
+Quote Post
spenalzo
post 30.12.2003, 01:53:46
Post #2





Grupa: Zarejestrowani
Postów: 2 064
Pomógł: 1
Dołączył: 22.01.2003
Skąd: Poznań

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


Przy pomocy php pobrać wszystkie tabele z danej bazy. Wrzucasz tabele do tablioy i po kolei usuwasz.


--------------------

Go to the top of the page
+Quote Post
Cudi
post 30.12.2003, 02:12:55
Post #3


Administrator planeta/IRC


Grupa: Przyjaciele php.pl
Postów: 385
Pomógł: 0
Dołączył: 19.04.2003
Skąd: Zabrze

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


[php:1:3010e8e2cb]<?php
<?php
mysql_connect();
mysql_select_db( 'baza' );

$result = mysql_list_tables();

while ( $row = mysql_fetch_row( $result ) )
{
mysql_query( "DROP TABLE $row" );
}
?>
?>[/php:1:3010e8e2cb]


--------------------
"Programmers are in a race with the Universe to create bigger and better idiot-proof programs, while the Universe is trying to create bigger and better idiots. So far the Universe is winning."
Cudi's devBlog
Go to the top of the page
+Quote Post

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

 



RSS Wersja Lo-Fi Aktualny czas: 19.07.2025 - 19:33