PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
<?
//Startar sessionen
session_start();
//Ansluter till databasen
@mysql_connect("*******","******","******") or print("Kunde ej uprätta kontakt med databasen. var god försök igen senare.");
@mysql_select_db("kitabu_data") or print("Kunde ej Kitabu_data");
?>
by the way... never use a column named div... mysql don't know how to deal a column with the name div or DIV...
i don't know if anyone had trie or need a column with the name div... but i have... and i take a good time to understand that the problem was with Mysql...
duk wrote:by the way... never use a column named div... mysql don't know how to deal a column with the name div or DIV...
i don't know if anyone had trie or need a column with the name div... but i have... and i take a good time to understand that the problem was with Mysql...
simple fix is to wrap column names (if your lazy only columns with reserved words) in backticks
anyway i dindn't know that mysql had reserved words for columns... but just for curiosity you know if oracle and pgSQL have reserved names for columns to ?
read their documentation, i'm sure they all have a section dedicated on reserved words.. (I even have them in my bookmarks but am too lazy to copy paste them here)
timvw wrote:read their documentation, i'm sure they all have a section dedicated on reserved words.. (I even have them in my bookmarks but am too lazy to copy paste them here)