I've been trying to execute this mysql query in my php file however I think there may be a problem with it as I get an error whenever it reaches the code.
Here is the query:
"INSERT INTO " . $my_tableName . "(mycolumn, myothercolumn)
values ('myvariable', " . $pass . ");" .
"INSERT INTO " . $my_othertableName . "(morecolumns) values ('morevalues');"
And here is the error:
SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ':)' at line 1";i:1;s:978:"#0
Maybe you need to quote your $pass value:
"INSERT INTO " . $my_tableName . "(mycolumn, myothercolumn)
values ('myvariable', '" . $pass . "');" .
In PHP you can't execute multiple insert statements separated with a ;. You need to execute these as separate queries. This is to prevent injection. Try running as 2 queries and it should work fine for you.