Problems With Mysql - Webmasters - Nairaland
Nairaland Forum › Science/Technology › Webmasters › Problems With Mysql (759 Views)
| Problems With Mysql by dammy009(op): 2:46pm On Jan 28, 2009 |
hello, i want to echo out the tables in a database, my code is: mysql_connect("localhost", "tables", "" or die(mysql_error());echo "connected to database"; mysql_select_db("today" or die(mysql_error());echo "Connected to database<br>"; $tables=mysql_list_tables("today" ;if ($tables =="" {echo "this database does not have a table"; exit; }else { echo $tables; } the result i am getting is connected to database Connected to database Resource id #3 the last line is the problem, please can anyone help me sort out what the problem is? i am using phpmyadmin to connect php to mysql. pleasee |
| Re: Problems With Mysql by kehers(m): 3:38pm On Jan 28, 2009 |
$tables=mysql_list_tables("today"The function mysql_list_tables returns a resource identifier to the result. And that is why you are getting what you are getting. You still need a couple of code lines to draw up the resource result. Here: ,I didnt test that (stole just some minutes to come around NL) but I hope it works. |
| Re: Problems With Mysql by Nobody: 6:41pm On Jan 28, 2009 |
*** I think i need some sleep before these guys scatter my head with codes, DHTML yawns and fell asleep dreaming of php & mysql |
| Re: Problems With Mysql by Nobody: 9:15am On Jan 29, 2009 |
been long i seen u here kehers, whats happening? |
| Re: Problems With Mysql by kehers(m): 5:18pm On Jan 30, 2009 |
@webdezzi Been busy wt a lot of sku work and hardly come online ds days. Hopefully, I will b fully back real soon |
| Re: Problems With Mysql by Nobody: 9:08pm On Jan 31, 2009 |
no problem, we see wen we see |
Please Help Me Out With Mysql Distinct • Having Problems With Graphcard? • Building Dynamic Websites With MySQL And PHP • 2 • 3 • 4
One On One Teacher Needed For A Deal • How Do I Download It • A Web Developer And Designer Looking Forward To Partner With You
or die(mysql_error());