18.09.2013, 20:02
Using SQL and checking constantly (constantly querying!) is very inefficient and a bad idea overall.
I suggest using sockets.
http://php.net/manual/en/book.sockets.php
EDIT: Also, the preview has header warnings. It makes your code really look bad...
Another thing, I know the size of the code is small, but if you can organize things that are used in a lot of places into classes, things would be a lot more organised.
I suggest using sockets.
http://php.net/manual/en/book.sockets.php
EDIT: Also, the preview has header warnings. It makes your code really look bad...
Another thing, I know the size of the code is small, but if you can organize things that are used in a lot of places into classes, things would be a lot more organised.
PHP код:
/*
bool SQLClass ( string conIP, string conUser, string conPass, string conDatabase )
This function initialises the SQL connection.
*/
class SQLClass {
function SQLClass($conIP, $conUser, $conPass, $conDatabase) {
...
return true;
}
}

