Drupal 7 Module Development Tutorial #6 - Querying the Database with DB_SELECT

preview_player
Показать описание


In this six drupal video tutorial, I show you how we can get information from the database using db_select. To do so, we need to build a query using the Drupal database API. We do so by starting with a simple db_select call, followed by joining our tables. Then we add our fields, order our results and finish it all off by extending the query to use a pager.
Рекомендации по теме
Комментарии
Автор

Nice way to teach the API. You've presented more than an specific example of querying the data - you've presented the means to build out custom goals via the Drupal API - which is what some newcomers struggle jumping into understanding/utilizing effectively... thanks!

bobrohrer
Автор

That was the best video explaining how to tie db_select with a form.

susanpmckenna
Автор

I am learning drupal module development and this is indeed helpful. Thank you.

querywizard
Автор

Excellent refresher on this, have not touched it in a while. Thanks for your hard work.

jeffguroo
Автор

Super clear, super nice. You make the best Drupal tutoriel out there and I'm listening a lot of those during the last year. Better then CodeKarate, better than LevelofTut!

marc-andrelandreville
Автор

Peter, love the videos great work. Couple of questions. One, you don't have any kind of contact information on any of your videos or website. I assume that is intentional, but how can I contact you? Second, my current project is a drupal site. I need to have a table, on a public facing page, pull content from the database that my site is connected to. I manually created the db table through phpmyadmin, but I am not sure how to pull the content into a table on a basic page. Any guidance is appreciated. Anyone else should chime in too if they have any tips. I don't need to input data from drupal to the database, I just need to display what is already in the db on to a page. Make sense?

noahmcfadden
Автор

I watched your series and it's been very helpful. At the end of this video you mentioned the next video on how to theme the output. Is that video up?

Thanks for the helpful info

MrBr
Автор

great tutorials, just a note instead of doing print in the function form I would rather install devel and use dsm. What happened for me was the text from the print wasn't viewable unless I looked at the source code. So while it was working, I did not know for quite some time. DSM formats the text so it is easier to see.

RPPDesigns
Автор

Hope to convince my company to buy some vids soon.

jeffreyjones
Автор

awesome tutorials! Really helping my learning!

antoinetooley
Автор

Very helpful. Always wonder what key and values are available for the $form object that you return. Is there a place in drupal api documentation that describes this? or know of any good sources to look for this information?

andrewbickford
Автор

that`s really helping me in my work, THANK YOU

omarelrafhi
Автор

good video, I would like to know how to close the connection to the database, since I had a problem when making queries, the server fell because these queries remained open and consumed resources, I need to know how to close the connections, Greetings and continue like this.

JitVega
Автор

The best content!!! Thank you so much.

vk
Автор

Thank you for this video, very helpful :-)

stephane
Автор

With the static query from the db api, can you have more then one table name {node}

graemehancock
Автор

hello sir
   I am vikas and i am studying computer science engineering and i am intrested in drupal to learn and teach my friends as i am student i could not able to buy your tutorials 
soo can you please give me the tutorials sir for free

murarisaranvikas