I want to move a table ('bar') from my active database 'foo' to an archive database 'foo_archive'.
I'm doing this:
$co = new mysqli($serveame, $useame, $password, foo);
then:
$co->query("alter table `foo`.`$bar` RENAME `foo_archive`.`$bar`")
Strangely, it works, but I get this error message:
mysqli_query() expects at least 2 parameters, 1 given
I think that this is beacause I am coected to database 'foo' and not to 'foo_archive'.
I would like to know how to do this properly so as to not receive an error message. I'm also curious as to why it works when, theoretically, I'm not coected to 'foo_archive'.
