Skip to content

Conversation

@zydronium
Copy link

No description provided.

Copy link
Owner

@cottow cottow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The way to implement multiple databases is not by branching at every place where a query takes place. We'll need to add a database interface in between the function handlers and the database: the current approach will make functions unreadable, especially when someone for instance adds Oracle support.

</p>
<p>
<?php echo $_SERVER['SERVER_NAME']; ?> and the author are not responsible for any content that is pasted here, nor the confidentiality of your data. Reliability of this service is not a right.
<?php echo $config['server_name']; ?> and the author are not responsible for any content that is pasted here, nor the confidentiality of your data. Reliability of this service is not a right.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where is $config['server_name'] set?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Config server_name is set in de config.php file, and is used in an another template


$stmt = $dbh->prepare("DELETE FROM `pastes` WHERE `expires` < NOW()");
$stmt->execute();
if($config['daba_type'] == "mysql") {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The way to implement multiple databases is not by branching at every place where a query takes place. We'll need to add a database interface in between the function handlers and the database: the current approach will make functions unreadable, especially when someone for instance adds Oracle support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants