Skip to content

noodlehaus/mysqli_etc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 

Repository files navigation

mysqli_etc

Cruddy functions under the mysqli pseudo-namespace. Requires PHP 7.1+

$connection = mysqli_connect($host, $username, $password, $database);

# perform an insert
mysqli_insert(
  $connection,
  'INSERT INTO users VALUES (?, ?, ?)',
  $username,
  $email,
  $password
);

# perform an update/delete
mysqli_update(
  $connection,
  'DELETE FROM users WHERE username=?',
  $username
);

# perform a fetch
mysqli_select(
  $connection,
  'SELECT * FROM users WHERE username=? LIMIT 1',
  $username
);

# create an interpolated sql statement
$statement = mysqli_interpolate(
  $connection,
  'SELECT * FROM users WHERE username=?',
  $username
);
mysqli_stmt_execute($statement);

License

MIT http://noodlehaus.mit-license.org

About

how mysqli_prepare should work

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages