[SOLVED] connection not returning true

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
Obadiah
Forum Regular
Posts: 580
Joined: Mon Jul 31, 2006 9:13 am
Location: Ashland, KY
Contact:

[SOLVED] connection not returning true

Post by Obadiah »

ahaa...i knew i wasent crazy....somtthing is not right here....in this code the value that is suposed to return should be true but it doesnt...it seems as it returns false...why?

Code: Select all

<?php
// open the connection
$conn = mysql_connect("dfhdfhgdfg", "dfsdfgsdf", "dfhgdfhdfhdfhg");
// database in use
mysql_select_db("testDB",$conn);
// create the SQL statement
$sql = "CREATE TABLE testTABLE(id int not null primary key auto_increment,
testField varchar(75))";
//execute the SQL statement
$result = mysql_query($sql, $conn);
// echo the result identifier
echo $result;
?>
User avatar
Obadiah
Forum Regular
Posts: 580
Joined: Mon Jul 31, 2006 9:13 am
Location: Ashland, KY
Contact:

Post by Obadiah »

fixed it!!
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

We would appreciate that when a thread becomes solved of the problems contained therein the original poster edits their original post to add "[SOLVED]" to the beginning of the thread title.
Post Reply