MySQL5037srv//PHP522//WIN2KSP4//IISV5//***MySQL ERRORS
am 08.05.2007 06:25:44 von Chetan Graham------=_20070508072544_89467
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 8bit
Hi to All,
I am having problems with the MySQL DB. It started with this command from
a call in a PHP script...
"INSERT INTO docprouser (id,valid,password)VALUES
('user5','Y',md5('ksobhinyai'));" or die(mysql_error());"
The script actually connects with the DB fine and no errors at all. You
can see the screen output in the attatched text file. However, there is
no new entry in DB.
Upon looking at the error log for the specified time I get:
**Query Execute Thread cannot connect to MySQL **
However, if I cut/paste the above into the query window of GUI it executes
just fine, and shows the record written.
I've dnloaded the latest OBDC connector and set up correctly.
I've googled the MySQL errors to no avail.
TCP/IP is active on pc.
The tables were even created with this script.
I'm beyond frustrated, as two days now have been stuck with this DB
problem. I just spent the last five or six hours deleting the DB off the
server and reloading it several times which cleared up several previous
problems. Now, it comes down to this one.
Any help would be appreciated.
Blessings,
Chetan
------=_20070508072544_89467
Content-Type: text/plain; name="INSERT_DATA.txt"
Content-Transfer-Encoding: 8bit
Content-Disposition: attachment; filename="INSERT_DATA.txt"
//$dtime = gmdate("D , M j, Y, g:ia", time()+(19800));
$dtime = gmdate("g:ia", time()+(19800));
$db = "aims site";
$con = mysql_connect('localhost','root','pull3799') or die(mysql_error());
echo "
-ONE-Connected to Server! $dtime
";if (!mysql_select_db($db,$con)){
echo "Unable to select aims site DB
" . mysql_error();
exit;
} echo "
-TWO-Connected to aims site DB! $dtime
";//********************************************************** ***************************
//-- JUST TRYING TO STUFF DATA INTO DB, TO SEE IF IT WORKS
//********************************************************** ***************************
//-- AS PROCESS IN WRITING LARGER PROGRAM
//********************************************************** ***************************
mysql_query("CREATE TABLE IF NOT EXISTS docprouser (
p_id int(11) NOT NULL auto_increment,
id varchar(20),
valid enum('y','n'),
password BLOB null,
timeEnter timestamp,
PRIMARY KEY (p_id)
)
ENGINE=MyISAM COMMENT='logon user & password';") or die('Create Died' . mysql_error());
echo "
-THREE-Step before data insertion into docprouser table! $dtime
";"INSERT INTO docprouser (id,valid,password)VALUES('user5','Y',md5('ksobhinyai'));" or die(mysql_error()); "INSERT INTO docprouser (id,valid,password)VALUES('admin','Y',md5('srimatre'));" or die(mysql_error());
"INSERT INTO docprouser (id,valid,password)VALUES
('user1','Y',md5('lalitambikayai'));" or die(mysql_error());
"INSERT INTO docprouser (id,valid,password)VALUES('user2','Y',md5('hrdyayai'));" or die(mysql_error());
"INSERT INTO docprouser (id,valid,password)VALUES('user3','Y',md5('ramyayai'));" or die(mysql_error());
"INSERT INTO docprouser (id,valid,password)VALUES('user4','Y',md5('avaradayai'));" or die(mysql_error());
"INSERT INTO docprouser (id,valid,password)VALUES('user5','Y',md5('ksobhinyai'));" or die(mysql_error());
echo "
-FOUR-Inserted data into docprouser table! $dtime
";if ($query="SELECT id, password FROM docprouser WHERE 'valid' = 'y'") {
$result = mysql_query($query);
while ($logdata = mysql_fetch_row($result)) {
print("$logdata[0] $logdata[1]
\n");
break;
}
}
else {
echo "
-FIVE-There is no data in docprouser table! We have a problem???! $dtime
";break;
}
echo '
Congratulations, database or table(s) have been created!
You may now read the latest mail
';?>
************************************************************ ******************************************
BELOW IS THE SCREEN OUTPUT FROM ABOVE PHP PROGRAM
************************************************************ ******************************************
-ONE-Connected to Server!10:52am
-TWO-Connected to aims site DB!10:52am
-THREE-Step before data insertion into docprouser table!10:52am
-FOUR-Inserted data into docprouser table!10:52am
Congratulations, database or table(s) have been created!
You may now read the latest mail PHP.NET
------=_20070508072544_89467
Content-Type: text/plain; charset=us-ascii
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
------=_20070508072544_89467--