Visualizzazione dei risultati da 1 a 5 su 5

Discussione: Show tables

  1. #1

    Show tables

    Devo visualizzare tutti i nomi delle tabelle di un database.
    Come posso usare showTables?

  2. #2
    Utente di HTML.it L'avatar di nicola75ss
    Registrato dal
    Nov 2004
    Messaggi
    12,923
    Se conosci già il comando che devi usare che problema hai?

    show tables from nome_db

    e con mysql_fetch_assoc() le recuperi.

  3. #3
    Mi puoi fare una bozza di PHP in cui si vede esattamente come si usano queste due istruzioni?

  4. #4
    Utente di HTML.it L'avatar di nicola75ss
    Registrato dal
    Nov 2004
    Messaggi
    12,923
    Codice PHP:
    $query mysql_query('show tables from nome_database');
    while (
    $row mysql_fetch_row($query)) {
      echo 
    $row[0].'
    '
    ;


  5. #5
    Mi da:
    Warning: mysql_fetch_row() expects parameter 1 to be resource, boolean given

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.