Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

better data-security with given variable-types #37

Open
Gummibeer opened this issue Apr 15, 2014 · 2 comments
Open

better data-security with given variable-types #37

Gummibeer opened this issue Apr 15, 2014 · 2 comments

Comments

@Gummibeer
Copy link
Contributor

it would be nice if the SecureData-function could be extended by variable-taypes like in the Wordpress database-class (https://codex.wordpress.org/Class_Reference/wpdb#INSERT_rows).
This can increase the database-security much more and ensure that no values enter the db that shouldn't.
i think that types like string, integer, float, boolean (true/false || 1/0) and datetime date timestamp would be nice.

@Gummibeer
Copy link
Contributor Author

with the changes it should be, for example:

$newUser = array('username' => 'Thrackhamator');
$types = array('str');
$oMySQL->insert('admin', $newUser, '', $types);

You can think about changing the position of the types-arguments. For example public function insert($table, $vars, $datatypes, $exclude = ''){

a1phanumeric added a commit that referenced this issue Apr 16, 2014
@Gummibeer
Copy link
Contributor Author

@a1phanumeric It's important to update your readme now! All public funtions are lowercase #35 and the most got a new agrument, wich is required cause without it will write an empty string into the database.

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

No branches or pull requests

1 participant