Posted by:
DeathfireD
(---.hsd1.nh.comcast.net)
this seems like its been posted in the past but it the issues other's have had are not like mine, at least I don't think. I've used wamp on a few computers so i installed it on my new computer. Everything runs fine but when I try and do anything involving mysql I keep getting
"Access denied for user 'ODBC'@'localhost' (using password: NO)" and then erros pointing to lines in my code that try and manipulate my sql table.
My first thought was maby I did the database connection wrong in php but that was not the case since it runs fine on the other computers i have. So im a bit confused as to whats going on here.
Any suggestions.
PS. Im using latest wamp and my mysql username and password are the default ones for simplicity to make sure the stuff works.
edited well apparently I can create tables just fine but i cant add or manipulate data. I used this to test the connection and make a table and it worked.
<?php
// Make a MySQL Connection
mysql_connect("localhost", "root", ""
or die(mysql_error());
mysql_select_db("test222"
or die(mysql_error());
// Create a MySQL table in the selected database
mysql_query("CREATE TABLE example(
id INT NOT NULL AUTO_INCREMENT,
PRIMARY KEY(id),
name VARCHAR(30),
age INT)"
or die(mysql_error());
echo "Table Created!";
?>
Edit 2 my bad the reason why nothing seemed to work is becuse in php by default <? does not work only <?php so my scripts where messing up I think. Im going to change the settings and see if that fixes my problems.
Solved haha ya that was the reason why. How silly of me
.
Post Edited (03-08-07 09:32)
^)^ DeathfireD ^)^