By anxinhuang on
i am a newbie for drupal! i use cck added additional field for certain content type but i don't want use views module create page,so how can i write sql query bymyself? and where the sql query code put?thanks!
i am a newbie for drupal! i use cck added additional field for certain content type but i don't want use views module create page,so how can i write sql query bymyself? and where the sql query code put?thanks!
Comments
Hi, Several options to do so.
Hi,
Several options to do so. One, and I think recommended, is to create your own custom module to do so.
Another option would be is to create a node, set the body input filter to php and execute your query there.
But why not use views? What are you trying to accomplish?
Cheers
________________
Live fast die young
thank you
I have just started studying drupal so I want to know a little more about drupal.
In my course of study,Suddenly there was doubt,If I do not have views then how can i do?
Thank you very much for reply so fast!
how can i create a node
create my own custom module i can imagine!but how can i create a node! i can't imagine ,maybe more detail information for me if available.thanks
Nodes are easy from the front end
You must be logged in.
You need to activate the PHP filter module first.
You will see an option to create content on your menu of the site you are building.
Click on the node type you want to create.
On a default install you will have "Page" and "Story".
Try a "Page".
Enter your custom code in the body section. Give the page a title.
Make the input format PHP
Select "Preview" to test your code.
If it works, you can save the page.
writing a query
Does some one have an example of this that they can post?
Hours of fun...
..http://api.drupal.org/api/group/database/6
thanks
thanks
The query is the easy part.
The query is the easy part. They you've got to render it (direct theming calls to ImageCache if you're using it, etc.) and tie into the Drupal page/menu system. The book "Pro Drupal Development" is a great place to learn this stuff.
pro drupal
the pro drupal is only for drupal 5, and the next one is for drupal 7. if they had a six I'd get it. thanks.
Not true. I have the d6
Not true. I have the d6 version (second edition) sitting right next to me.
pro drudal
really, i read the reviews on amazon, and they said it was only 5. I'll just have to make sure I get the 2nd edition. Thanks, that's very helpful, it looked like the type of stuff I wanted from the chapters. just ordered it. thanks again.
Second Edition Covers Drupal 6!
http://www.drupalbook.com/
Also interesting: http://drupal.org/books
________________
Live fast die young