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

Select helper that works like delete #3

Closed
anoxic opened this issue Jul 23, 2014 · 3 comments
Closed

Select helper that works like delete #3

anoxic opened this issue Jul 23, 2014 · 3 comments

Comments

@anoxic
Copy link
Contributor

anoxic commented Jul 23, 2014

For comparison, it is possible in dabble to use the (somewhat limited) delete method, with key-value pairs for the where clause:

 $db->delete('posts', array('published' => true));
 // instead of having to use
 $db->query('DELETE FROM `posts` WHERE `published` = :published', array('published' => true));

It would also be great to have a SELECT helper that works the same way

 $db->select('posts', array('published' => true))->fetch();
 // vs
 $db->query('SELECT FROM `posts` WHERE `published` = :published', array('published' => true))->fetch();

BTW, Dabble is awesome! 👍

@nramenta
Copy link
Owner

Yes, it would definitely be great. I'll see what I can do.

Thank you for the kind words.

@nramenta
Copy link
Owner

nramenta commented Aug 6, 2014

Implemented in 0.5.5

@nramenta nramenta closed this as completed Aug 6, 2014
@anoxic
Copy link
Contributor Author

anoxic commented Aug 6, 2014

That's awesome! Thanks

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

2 participants