-
Re: Project Juliet - Source Code [PHP, MySQL]
Why not forced MySQLi? What about when you use bind_param you have to do an if statement to change all the MySQLi to something else, not worth. Might aswell just only support MySQLi - it is better anyway.
-
Re: Project Juliet - Source Code [PHP, MySQL]
Quote:
Originally Posted by
Hejula
Why not forced MySQLi? What about when you use bind_param you have to do an if statement to change all the MySQLi to something else, not worth. Might aswell just only support MySQLi - it is better anyway.
I was thinking the same? LOL
Thanks for the information matey, forced MySQLi it is. :P
-
Re: Project Juliet - Source Code [PHP, MySQL]
Quote:
Originally Posted by
ησвяαιη
Post on my development thread since none of you are checking.
------------------------
Build 2 is going to be good.
MySQLi/MySQL connection system began :P
PHP Code:
public function __construct($dbhostname, $dbusername, $dbpassword, $dbname, $contype) {
if ($contype == "mysqli") {
$this->connection = mysqli_connect($dbhostname, $dbusername, $dbpassword);
$this->database = mysqli_select_db($dbname);
}
else {
$this->connection = mysql_connect($dbhostname, $dbusername, $dbpassword);
$this->database = mysql_select_db($dbname);
}
}
1.- Bad way of making 'multiple support'.
2.- MySQLi should 'be used as OOP'
Just saying.
-
Re: Project Juliet - Source Code [PHP, MySQL]
Quote:
Originally Posted by
Kryptos
1.- Bad way of making 'multiple support'.
2.- MySQLi should 'be used as OOP'
Just saying.
I'm just experimenting at the moment, and I don't know OOP. Check the development thread for a change of the code.
-
Re: Project Juliet - Source Code [PHP, MySQL]
Quote:
Originally Posted by
ησвяαιη
I'm just experimenting at the moment, and I don't know OOP. Check the development thread for a change of the code.
You don't know OOP? 0_o
Then why is that snippet in a construct?
-
Re: Project Juliet - Source Code [PHP, MySQL]
Quote:
Originally Posted by
Kryptos
You don't know OOP? 0_o
Then why is that snippet in a construct?
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...
-
Re: Project Juliet - Source Code [PHP, MySQL]
You can do $db = new mysqli("hostname","username","password","password","port"); in global.php if you cant be bothered making an MySQL class...
-
Re: Project Juliet - Source Code [PHP, MySQL]
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.
-
Re: Project Juliet - Source Code [PHP, MySQL]
Looks good nobrain, i laughed at this:
Code:
* public function __construct($hostname, $username, $password, $database) ... JONTEH BOYYYYYY
-
Re: Project Juliet - Source Code [PHP, MySQL]
Quote:
Originally Posted by
MerijnZ
Looks good nobrain, i laughed at this:
Code:
* public function __construct($hostname, $username, $password, $database) ... JONTEH BOYYYYYY
Yeah, I think I have swearing problems :love:
-
Re: Project Juliet - Source Code [PHP, MySQL]
$db = new mysqli("hostname","username","password","password","port");
Double password?
-
Re: Project Juliet - Source Code [PHP, MySQL]
Quote:
Originally Posted by
AmirZ
$db = new mysqli("hostname","username","password","password","port");
Double password?
Shoot me, I was tired don't expect anything decent at late time in the night lol.
-
Quote:
Originally Posted by
AmirZ
$db = new mysqli("hostname","username","password","password","port");
Double password?
That's how secure this is....
Posted via Mobile Device
-
Re: Project Juliet - Source Code [PHP, MySQL]
Quote:
Originally Posted by
AmirZ
$db = new mysqli("hostname","username","password","password","port");
Double password?
I think he means
PHP Code:
$db = new mysqli("hostname","username","password","database");
PHP: mysqli::__construct - Manual
-
Re: Project Juliet - Source Code [PHP, MySQL]
Quote:
Originally Posted by
djboetz
I'm so tired of this. Everyone on RaGEZONE only release not finished and shit Emulators. Can you please be the first that release a stable Emulator with everyhthing fixed?
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.
Quote:
Originally Posted by
AmirZ
$db = new mysqli("hostname","username","password","password","port");
Double password?
It's an easy error, should still work if your password and database name are the same, I hope it's not :P
-
Re: Project Juliet - Source Code [PHP, MySQL]
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;
}
}
?>
-
Re: Project Juliet - Source Code [PHP, MySQL]
I made a typing mistake, I meant this:
$db = new mysqli("hostname","username","password","database","port");
-
Re: Project Juliet - Source Code [PHP, MySQL]
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.
-
Re: Project Juliet - Source Code [PHP, MySQL]
ooo, ignore my development thread post about going back to MySQL! Sticking with MySQLi!!!!
Quote:
Originally Posted by
PowahAlert
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.
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.