Important mysql_fetch_field Question

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
kaisellgren
DevNet Resident
Posts: 1675
Joined: Sat Jan 07, 2006 5:52 am
Location: Lahti, Finland.

Important mysql_fetch_field Question

Post by kaisellgren »

I am using mysql_fetch_field and I receive word "Object" if I echo it. I need to know the information in the field not anything else. How can I get the information?
My script for making tables and so on:

Code: Select all

$link = mysql_connect("$host","$username","$password") or die("Could not connect to MySQL."); 
mysql_select_db("$database") or die("Could not connect to database.");
mysql_query("DROP TABLE config");
mysql_query("CREATE TABLE config (adminname TEXT,adminpass TEXT)");
mysql_query("INSERT INTO config (adminname,adminpass) VALUES ('$adminusername','$adminpassword','$adminemail')");
And how can I receive the information from field "adminname" and "adminpass" and "adminemail" ? They all are in the "config" table.
User avatar
JayBird
Admin
Posts: 4524
Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:

Post by JayBird »

reading the manual might help ya...if not post the code where you are trying to show the query result
Post Reply