Closed Thread Icon

Topic awaiting preservation: php mysql query help (Page 1 of 1) Pages that link to <a href="http://ozoneasylum.com/backlink?for=22553" title="Pages that link to Topic awaiting preservation: php mysql query help (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: php mysql query help <span class="small">(Page 1 of 1)</span>\

 
kronk
Nervous Wreck (II) Inmate

From: Sydney, Australia
Insane since: Jun 2004

posted posted 07-14-2004 15:43

hi there, i am using php with mysql.

in mysql you can use the sql "show tables;" to get a list of the tables in a database.

does anyone know if you can run a similar query from a php page on the web??? if so how???

THANKS

Tyberius Prime
Paranoid (IV) Mad Scientist with Finglongers

From: Germany
Insane since: Sep 2001

posted posted 07-14-2004 15:53

I'd imagine you could just pass that query to php->mysql_query().

If that doesn't work, I suggest you download the phpmyadmin source and see how they're doing it.

So long,

->Tyberius Prime

kronk
Nervous Wreck (II) Inmate

From: Sydney, Australia
Insane since: Jun 2004

posted posted 07-14-2004 16:58

it did work, i just ran the mysql_db_query with "show tables"

the only thing i dont know how to do now is to list the results e.g using a while loop.

anyone know the correct syntax???

poi
Paranoid (IV) Inmate

From: France
Insane since: Jun 2002

posted posted 07-14-2004 17:23

you didn't took the pain to RTFM on the page "MySQL Functions", don't you ?
The answer to you question was also given in the User Contributed Notes on the page given by Tyberius Prime.



(Edited by poi on 07-14-2004 17:25)

kronk
Nervous Wreck (II) Inmate

From: Sydney, Australia
Insane since: Jun 2004

posted posted 07-15-2004 17:09

cool, thanks for that link. everything is working the way i had planned now. my ideas came to sudden halt when i realised that any extra tables that i might add to the database in the future would require a re-write in the code.

thanks for the help.

« BackwardsOnwards »

Show Forum Drop Down Menu