Jump to content

chrxr

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

chrxr's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Took me a while to get my head around, but got it now. Thanks both!
  2. Just trying to learn PHP and MySQL at the mo, and getting stuck on a really simple thing. I'm trying to populate MySQL table using a numeric array. Got a simple For loop to insert the data, but only the third of three rows is added to the table (Charly the 3yo Cheetah). The code is below: $family= array("Lion", "Cougar", "Cheetah"); $name= array("Leo", "Growler", "Charly"); $age= array(3, 4, 3); for ($j = 0; $j < 3; ++$j) { $query = "INSERT INTO cats VALUES(NULL, '$family[$j]', '$name[$j]', $age[$j])"; }; I'm sure it's blindingly obvious what's wrong, but I can't see it. Thanks!
  3. Astonishingly all I had to do was -uroot -p then press enter on the password entry. Astonishing how the mind (or at least my mind) can overcomplicate things. Thanks for you help though.
  4. I installed MySQL 5.5.10 with EasyPHP and am trying to open MySQL from the command line. On launching mysql.exe with -u root, I get the message below: ERROR 1045 (28000): access denied for user 'root'@'localhost' (using password: yes) I have never used MySQL before, but I'm sure i never set a password for the root user. In phpMyAdmin there are 3 "Users" in the privileges tab for MySQL: User Host Password Root 127.0.0.1 No Root Local Host No rooty % Yes I set up "rooty" after I get the error above in my bumbling attempts to get into MySQL. Anyone get any ideas as to why I can't get into the MySQL command line? Many thanks in advance!!
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.