Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,192,118 members, 7,946,755 topics. Date: Thursday, 12 September 2024 at 06:18 AM |
Nairaland Forum / Science/Technology / Webmasters / Problems With Mysql (720 Views)
Please Help Me Out With Mysql Distinct / Having Problems With Graphcard? / Building Dynamic Websites With MySQL And PHP (2) (3) (4)
Problems With Mysql by dammy009: 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 |
(1) (Reply)
Webmasters This Is What All Of You Have Been Waiting For / Similarities Between Yawa-ti-de And My2cents? / Http://blogprosport.com/
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 10 |