This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $mysql_server = "your_host"; | |
| $mysql_database = "your_database_name"; | |
| $mysql_username = "your_database_user"; | |
| $mysql_password = "your_database_password"; | |
| //executes a query and returns the first value or null when nothing's found | |
| //sample: $scalarValue = SQLExecuteScalar("select field from table where id=1"); | |
| //sample: $scalarValue = SQLExecuteScalar("select * from info"); //returns first row, first column field | |
| function SQLExecuteScalar($query, $default = null) | |
| { |