Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Top Posters

Who's Online (0)

Powered by Vanilla. Made with Bootstrap.
need some php/sql help
  • so im playing around with php and sql and i was wondering if anyone could help me, i want to run an sql command and it to return me the table name's, i tryed googleing but i dont exactly know what im searching for. Im using this but it doesnt work:


    if($login){
    mysql_connect(\"localhost\", \"root\", \"\");
    mysql_select_db(\"users\");
    echo \"Fetching Data...\";
    $collect = mysql_query(\"SELECT * FROM INFORMATION_SCHEMA.COLUMNS\");
    echo $collect;

    }


    any help?
    Skype: mrpt3o
    Twitter: MrPteo


    image
  • Sh3llc0d3
    Posts: 1,910
    Would this help:

    http://php.net/manual/en/function.mysql-list-tables.php

    Seems to be what your wanting to do.

    The example specifically.
  • Praxis
    Posts: 20
    When you say "it doesn't work", what do you mean? Do you get any errors?

    I know it's a shit suggestion, but make sure your PHP is updated as well. This won't work on older versions.
  • Xin
    Posts: 3,251
    Xin
  • lol this thread is quite old, my php skills have improved a hell of alot since when this was made.
    Skype: mrpt3o
    Twitter: MrPteo


    image