Hello All,
This might be very easy question for some of you, I want to display database values into the php block / node How I can do this?
Can I user normal php coding same in drupal block OR I need to do any extra steps for it.
Warm Regards, Nikhil Kala http://www.nikhilkala.com
normal php code in <?php ?> tags is fine
Nikhil Kala wrote:
Hello All,
This might be very easy question for some of you, I want to display database values into the php block / node How I can do this?
Can I user normal php coding same in drupal block OR I need to do any extra steps for it.
Warm Regards, Nikhil Kala http://www.nikhilkala.com
-- [ Drupal support list | http://lists.drupal.org/ ]
On Sat, Apr 18, 2009 at 5:27 PM, garyl lists@luminosity.co.uk wrote:
normal php code in <?php ?> tags is fine
But if I want to display the list of the user registered with the site, I need to fetch the values from the users table. In that case how do I connect to the database first?
Do I need to include setting.php file ?
Nikhil Kala wrote:
Hello All,
This might be very easy question for some of you, I want to display database values into the php block / node How I can do this?
Can I user normal php coding same in drupal block OR I need to do any extra steps for it.
Warm Regards, Nikhil Kala http://www.nikhilkala.com
Take a look at: http://api.drupal.org/api/function/db_query/6
On Sat, Apr 18, 2009 at 07:40, Nikhil Kala writeme@nikhilkala.com wrote:
On Sat, Apr 18, 2009 at 5:27 PM, garyl lists@luminosity.co.uk wrote:
normal php code in <?php ?> tags is fine
But if I want to display the list of the user registered with the site, I need to fetch the values from the users table. In that case how do I connect to the database first?
Do I need to include setting.php file ?
Nikhil Kala wrote:
Hello All,
This might be very easy question for some of you, I want to display database values into the php block / node How I can do this?
Can I user normal php coding same in drupal block OR I need to do any extra steps for it.
Warm Regards, Nikhil Kala http://www.nikhilkala.com
-- [ Drupal support list | http://lists.drupal.org/ ]
Abraham Williams schrieb:
Take a look at: http://api.drupal.org/api/function/db_query/6
On Sat, Apr 18, 2009 at 07:40, Nikhil Kala writeme@nikhilkala.com wrote:
On Sat, Apr 18, 2009 at 5:27 PM, garyl lists@luminosity.co.uk wrote:
normal php code in <?php ?> tags is fine
But if I want to display the list of the user registered with the site, I need to fetch the values from the users table. In that case how do I connect to the database first?
Or have a look at the handbooks [1].
Stefan
use db_query() or db_fetch_object() instead of the mysql equivalents
http://api.drupal.org/api/function/db_query
Nikhil Kala wrote:
On Sat, Apr 18, 2009 at 5:27 PM, garyl <lists@luminosity.co.uk mailto:lists@luminosity.co.uk> wrote:
normal php code in <?php ?> tags is fineBut if I want to display the list of the user registered with the site, I need to fetch the values from the users table. In that case how do I connect to the database first?
Do I need to include setting.php file ?
Nikhil Kala wrote: Hello All, This might be very easy question for some of you, I want to display database values into the php block / node How I can do this? Can I user normal php coding same in drupal block OR I need to do any extra steps for it. Warm Regards, Nikhil Kala http://www.nikhilkala.com
-- [ Drupal support list | http://lists.drupal.org/ ]