Jonty advised it, as I said in my Development thread:
1. I am very tired
2. I am going to be taking ideas you guys have told me
3. Whatever else I said...
Printable View
You can do $db = new mysqli("hostname","username","password","password","port"); in global.php if you cant be bothered making an MySQL class...
I just reviewed the code I did last night, I said to myself - these exact words - "WHAT THE FUCK WAS I THINKING?".
Going to fix up all of the shit I did last night.
Looks good nobrain, i laughed at this:
Code:* public function __construct($hostname, $username, $password, $database) ... JONTEH BOYYYYYY
$db = new mysqli("hostname","username","password","password","port");
Double password?
I think he means
PHP: mysqli::__construct - ManualPHP Code:$db = new mysqli("hostname","username","password","database");
It's people like you who make developers leave, the negative types, Most developers have gone private due to the nagging noobs, I made all my stuff private a long time ago (although if you know the name of my latest project google can find a copy of the Jar)
@Ontopic
I've had a very quick read of the code looks promising, will be checking progress every now and then.
It's an easy error, should still work if your password and database name are the same, I hope it's not :P
Here's the new Build 2 core - also posted on Development thread:
PHP Code:<?php
/* __ ___ __
* / /_ __/ (_)__ / /_
* __ / / / / / / / _ \/ __/
* / /_/ / /_/ / / / __/ /_
* \____/\__,_/_/_/\___/\__/
* Copyright (c)2012 Ashley Davidson
*
* http://jokohost.com
*/
class JulietCore {
public function HashMyAss($password, $salt, $hash) {
return $hash($password . $salt);
}
public function SecureMe($var) {
return mysql_real_escape_string(stripslashes(htmlspecialchars($var)));
}
public function CheckInstall() {
$installpath = "/install";
if (file_exists($installpath)) {
$this->ThrowError("Install path exists! If you have used the install, please delete the file!");
}
}
public function ThrowError($error) {
die("System Error -> " . $error);
}
public function SystemInfo() {
$version = "Build 2";
return "Powered by Project Juliet " . $version;
}
}
?>
I made a typing mistake, I meant this:
$db = new mysqli("hostname","username","password","database","port");
can we all start putting them in PHP boxez pls.
anyway, i'd suggest you to use mysql, but if your confident with mysqli go ahead.
ooo, ignore my development thread post about going back to MySQL! Sticking with MySQLi!!!!
I like to try things I've never done before so there is no harm in trying MySQLi. Pretty sure that there is not much of a difference, apart from MySQLi is more efficient.