Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> mysql_list_tables ?
Fo
post
Post #1





Grupa: Zarejestrowani
Postów: 401
Pomógł: 0
Dołączył: 18.04.2003
Skąd: Trójmiasto

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


[php:1:33ad3e57a2]mysql_connect('localhost', 'uzytkownik', 'haslo') or
die('Nie można się połączyć');
mysql_select_db('baza');

$result = mysql_list_tables();

while (($row = mysql_fetch_row($result))
printf ("Tabela: %sn", $row[0]);

mysql_free_result($result);[/php:1:33ad3e57a2]

To jest zywcem z manuala wyciagniete ale nie dziala, wie ktos dlaczego ?
Mnie wypisuje : Parse error: parse error, unexpected T_STRING in C:apachehtdocstestylist_tables.php on line 9
ale osochosi ? bo ja nie bardzo kumam dlaczego tak akuratnio nie moze byc ?
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
DeyV
post
Post #2





Grupa: Zarząd
Postów: 2 277
Pomógł: 6
Dołączył: 27.12.2002
Skąd: Wołów/Wrocław




Cytat
str_replace
str_replace -- Replace all occurrences of the search string with the replacement string
Description
mixed str_replace ( mixed search, mixed replace, mixed subject [, int &count])


This function returns a string or an array with all occurences of search in subject replaced with the given replace value. If you don't need fancy replacing rules, you should always use this function instead of ereg_replace() or preg_replace().
Go to the top of the page
+Quote Post

Posty w temacie
- Fo   mysql_list_tables ?   17.06.2003, 15:33:43
- - Jabol   Re: [manual] mysql_list_tables ?   17.06.2003, 15:34:55
- - Fo   no ok ... a teraz z kolei jest takie cus (juz po u...   17.06.2003, 15:39:08
- - Fo   hmm w manualu byl brak .... przy mysql_list_tables...   17.06.2003, 16:07:48
- - Jabol   %s pochodzi od string   17.06.2003, 18:57:16
- - Fo   hmm ok fajnie juz wiem co znaczy %s. ale czy wie k...   17.06.2003, 19:28:42
- - Jabol   to musisz sobir napisać taki skrypt. Poczytaj w ma...   17.06.2003, 19:31:19
- - DeyV   wystaczy chwilę pomyśleć. A jak Ci się nie uda w M...   17.06.2003, 19:37:13
- - Fo   mhm pewnie by dzialalo tak jak pisal Jabol ale mni...   17.06.2003, 19:39:43
- - Jabol   wycinasz pierwsze cztery znaki i sprawdzasz czy są...   17.06.2003, 19:42:00
- - Fo   thx wlasnie oto mi chodzilo ... podaje kompletny k...   17.06.2003, 19:54:23
- - DeyV   tylko mam taką propozycję - jeżeli decydujesz sie ...   17.06.2003, 20:04:31
- - Fo   no ok ale jeszcze jedna sprawa ktora wyszla mi wla...   17.06.2003, 20:19:48
- - DeyV   <?php $nazwa = strtr ( $nazwa, 'hp', 'hapek'); ...   17.06.2003, 20:48:59
- - Fo   niestety niby powinno byc ok...ale po wykonaniu si...   17.06.2003, 21:36:03
- - uboottd   Zakladam ze chodzi o mysql-a: KodSHOW TABLES LIKE ...   17.06.2003, 21:48:44
- - DeyV   choroba - sprawdź, co ty robisz... Chyba juz czas,...   17.06.2003, 21:49:32
- - Fo   tak masz racje juz pora na <spanie> powinno...   17.06.2003, 22:01:03
- - DeyV   Cytatstr_replace str_replace -- Replace all occur...   17.06.2003, 22:11:03


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: 8.10.2025 - 07:01