Hi I need to pull a dataset in an ajax file. What drupal includes to I need to use the drupal db connection. thanks any help is appreciated --jerry -- Gerald Klein DBA**** www.geraldklein.com <http://geraldklein.com/>**** jk@zognet.com**** 708-599-0352**** Linux registered user #548580
Just paste these 2 lines in you external file require_once './includes/bootstrap.inc'; drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL); these are also included in index.php. These are for D6 On Sun, Mar 25, 2012 at 8:28 AM, Gerald Klein <jk@zognet.com> wrote:
Hi I need to pull a dataset in an ajax file. What drupal includes to I need to use the drupal db connection.
thanks any help is appreciated
--jerry
--
Gerald Klein DBA****
www.geraldklein.com <http://geraldklein.com/>****
jk@zognet.com****
708-599-0352****
Linux registered user #548580
-- [ Drupal support list | http://lists.drupal.org/ ]
-- Regards, Vaibhav Jain
I tried this and also included the define statement for the variable that require_once is using and it errors out including bootstrap.inc. It needs something else. thanks for your post, anyone else? define('DRUPAL_ROOT', getcwd()); require_once DRUPAL_ROOT . '/includes/bootstrap.inc'; drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL); On Sat, Mar 24, 2012 at 10:12 PM, Vaibhav Jain <in.vaibhavjain@gmail.com>wrote:
Just paste these 2 lines in you external file
require_once './includes/bootstrap.inc'; drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
these are also included in index.php. These are for D6
On Sun, Mar 25, 2012 at 8:28 AM, Gerald Klein <jk@zognet.com> wrote:
Hi I need to pull a dataset in an ajax file. What drupal includes to I need to use the drupal db connection.
thanks any help is appreciated
--jerry
--
Gerald Klein DBA****
www.geraldklein.com <http://geraldklein.com/>****
jk@zognet.com****
708-599-0352****
Linux registered user #548580
-- [ Drupal support list | http://lists.drupal.org/ ]
-- Regards, Vaibhav Jain
-- [ Drupal support list | http://lists.drupal.org/ ]
-- Gerald Klein DBA**** www.geraldklein.com <http://geraldklein.com/>**** jk@zognet.com**** 708-599-0352**** Linux registered user #548580
Gerald - Add period before /includes/bootstrap.inc if you are executing the script from the Web root. Or please give the exact error that you are getting. Regards, Awtar Singh Executive Director Quantum Coders LLC www.quantum-coders.com Sent from my iPhone On Mar 25, 2012, at 8:47 AM, Gerald Klein <jk@zognet.com> wrote:
I tried this and also included the define statement for the variable that require_once is using and it errors out including bootstrap.inc. It needs something else.
thanks for your post, anyone else?
define('DRUPAL_ROOT', getcwd());
require_once DRUPAL_ROOT . '/includes/bootstrap.inc'; drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
On Sat, Mar 24, 2012 at 10:12 PM, Vaibhav Jain <in.vaibhavjain@gmail.com> wrote: Just paste these 2 lines in you external file
require_once './includes/bootstrap.inc'; drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
these are also included in index.php. These are for D6
On Sun, Mar 25, 2012 at 8:28 AM, Gerald Klein <jk@zognet.com> wrote: Hi I need to pull a dataset in an ajax file. What drupal includes to I need to use the drupal db connection.
thanks any help is appreciated
--jerry
-- Gerald Klein DBA www.geraldklein.com jk@zognet.com 708-599-0352
Linux registered user #548580
-- [ Drupal support list | http://lists.drupal.org/ ]
-- Regards, Vaibhav Jain
-- [ Drupal support list | http://lists.drupal.org/ ]
-- Gerald Klein DBA www.geraldklein.com jk@zognet.com 708-599-0352
Linux registered user #548580
-- [ Drupal support list | http://lists.drupal.org/ ]
Hi, this didnt get me the mice drupal objects but I can make a php result set, it does give me the correct database/username/password. This also is specifc to Apache, IIS does nto have the DOCUMENT_ROOT variable. $docroot = getenv("DOCUMENT_ROOT"); require_once $docroot . '/includes/bootstrap.inc'; drupal_bootstrap(DRUPAL_BOOTSTRAP_DATABASE, false); require_once $docroot . '/sites/default/settings.php'; global $databases; $username = $databases["default"]["default"]["username"]; $password = $databases["default"]["default"]["password"]; $database = $databases["default"]["default"]["database"]; $host = $databases["default"]["default"]["host"]; mysql_connect("$host", "$username", "$password"); mysql_select_db("$database"); $sql = <<<EOD SELECT t1.field_req_a_quote_email_value, t2.field_req_a_quote_email_subject_value FROM field_data_field_req_a_quote_email t1 INNER JOIN field_data_field_req_a_quote_email_subject t2 ON t1.entity_id = t2.entity_id AND t1.revision_id = t2.revision_id LIMIT 1 EOD; $array = Array(); $result = mysql_query($sql); while ($row = mysql_fetch_object($result)) { $array['email']=$row->field_req_a_quote_email_value; $array['subject']=$row->field_req_a_quote_email_subject_value; } mysql_free_result($result); On Sun, Mar 25, 2012 at 1:50 AM, Awtar Singh <asingh@quantum-coders.com>wrote:
Gerald -
Add period before /includes/bootstrap.inc if you are executing the script from the Web root.
Or please give the exact error that you are getting.
Regards,
Awtar Singh Executive Director Quantum Coders LLC
www.quantum-coders.com
Sent from my iPhone
On Mar 25, 2012, at 8:47 AM, Gerald Klein <jk@zognet.com> wrote:
I tried this and also included the define statement for the variable that require_once is using and it errors out including bootstrap.inc. It needs something else.
thanks for your post, anyone else?
define('DRUPAL_ROOT', getcwd());
require_once DRUPAL_ROOT . '/includes/bootstrap.inc'; drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
On Sat, Mar 24, 2012 at 10:12 PM, Vaibhav Jain <in.vaibhavjain@gmail.com>wrote:
Just paste these 2 lines in you external file
require_once './includes/bootstrap.inc'; drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
these are also included in index.php. These are for D6
On Sun, Mar 25, 2012 at 8:28 AM, Gerald Klein <jk@zognet.com> wrote:
Hi I need to pull a dataset in an ajax file. What drupal includes to I need to use the drupal db connection.
thanks any help is appreciated
--jerry
--
Gerald Klein DBA****
www.geraldklein.com <http://geraldklein.com/>****
jk@zognet.com****
708-599-0352****
Linux registered user #548580
-- [ Drupal support list | http://lists.drupal.org/ ]
-- Regards, Vaibhav Jain
-- [ Drupal support list | http://lists.drupal.org/ ]
--
Gerald Klein DBA****
www.geraldklein.com <http://geraldklein.com/>****
jk@zognet.com****
708-599-0352****
Linux registered user #548580
-- [ Drupal support list | http://lists.drupal.org/ ]
-- [ Drupal support list | http://lists.drupal.org/ ]
-- Gerald Klein DBA**** www.geraldklein.com <http://geraldklein.com/>**** jk@zognet.com**** 708-599-0352**** Linux registered user #548580
On IIS try : realpath(basename(getenv("SCRIPT_NAME"))); This will return the full script path. Hope this helps. Sent from my iPhone On Mar 25, 2012, at 6:13 PM, Gerald Klein <jk@zognet.com> wrote:
Hi, this didnt get me the mice drupal objects but I can make a php result set, it does give me the correct database/username/password. This also is specifc to Apache, IIS does nto have the DOCUMENT_ROOT variable.
$docroot = getenv("DOCUMENT_ROOT"); require_once $docroot . '/includes/bootstrap.inc';
drupal_bootstrap(DRUPAL_BOOTSTRAP_DATABASE, false); require_once $docroot . '/sites/default/settings.php'; global $databases;
$username = $databases["default"]["default"]["username"]; $password = $databases["default"]["default"]["password"]; $database = $databases["default"]["default"]["database"]; $host = $databases["default"]["default"]["host"];
mysql_connect("$host", "$username", "$password"); mysql_select_db("$database");
$sql = <<<EOD SELECT t1.field_req_a_quote_email_value, t2.field_req_a_quote_email_subject_value FROM field_data_field_req_a_quote_email t1 INNER JOIN field_data_field_req_a_quote_email_subject t2 ON t1.entity_id = t2.entity_id AND t1.revision_id = t2.revision_id LIMIT 1 EOD;
$array = Array();
$result = mysql_query($sql);
while ($row = mysql_fetch_object($result)) { $array['email']=$row->field_req_a_quote_email_value; $array['subject']=$row->field_req_a_quote_email_subject_value; }
mysql_free_result($result);
On Sun, Mar 25, 2012 at 1:50 AM, Awtar Singh <asingh@quantum-coders.com> wrote: Gerald -
Add period before /includes/bootstrap.inc if you are executing the script from the Web root.
Or please give the exact error that you are getting.
Regards,
Awtar Singh Executive Director Quantum Coders LLC
www.quantum-coders.com
Sent from my iPhone
On Mar 25, 2012, at 8:47 AM, Gerald Klein <jk@zognet.com> wrote:
I tried this and also included the define statement for the variable that require_once is using and it errors out including bootstrap.inc. It needs something else.
thanks for your post, anyone else?
define('DRUPAL_ROOT', getcwd());
require_once DRUPAL_ROOT . '/includes/bootstrap.inc'; drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
On Sat, Mar 24, 2012 at 10:12 PM, Vaibhav Jain <in.vaibhavjain@gmail.com> wrote: Just paste these 2 lines in you external file
require_once './includes/bootstrap.inc'; drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
these are also included in index.php. These are for D6
On Sun, Mar 25, 2012 at 8:28 AM, Gerald Klein <jk@zognet.com> wrote: Hi I need to pull a dataset in an ajax file. What drupal includes to I need to use the drupal db connection.
thanks any help is appreciated
--jerry
-- Gerald Klein DBA www.geraldklein.com jk@zognet.com 708-599-0352
Linux registered user #548580
-- [ Drupal support list | http://lists.drupal.org/ ]
-- Regards, Vaibhav Jain
-- [ Drupal support list | http://lists.drupal.org/ ]
-- Gerald Klein DBA www.geraldklein.com jk@zognet.com 708-599-0352
Linux registered user #548580
-- [ Drupal support list | http://lists.drupal.org/ ]
-- [ Drupal support list | http://lists.drupal.org/ ]
-- Gerald Klein DBA www.geraldklein.com jk@zognet.com 708-599-0352
Linux registered user #548580
-- [ Drupal support list | http://lists.drupal.org/ ]
Or you can use a config file and set the docroot in there using below command and include it once. Sent from my iPhone On Mar 25, 2012, at 6:46 PM, Awtar Singh <asingh@quantum-coders.com> wrote:
On IIS try :
realpath(basename(getenv("SCRIPT_NAME")));
This will return the full script path. Hope this helps.
Sent from my iPhone
On Mar 25, 2012, at 6:13 PM, Gerald Klein <jk@zognet.com> wrote:
Hi, this didnt get me the mice drupal objects but I can make a php result set, it does give me the correct database/username/password. This also is specifc to Apache, IIS does nto have the DOCUMENT_ROOT variable.
$docroot = getenv("DOCUMENT_ROOT"); require_once $docroot . '/includes/bootstrap.inc';
drupal_bootstrap(DRUPAL_BOOTSTRAP_DATABASE, false); require_once $docroot . '/sites/default/settings.php'; global $databases;
$username = $databases["default"]["default"]["username"]; $password = $databases["default"]["default"]["password"]; $database = $databases["default"]["default"]["database"]; $host = $databases["default"]["default"]["host"];
mysql_connect("$host", "$username", "$password"); mysql_select_db("$database");
$sql = <<<EOD SELECT t1.field_req_a_quote_email_value, t2.field_req_a_quote_email_subject_value FROM field_data_field_req_a_quote_email t1 INNER JOIN field_data_field_req_a_quote_email_subject t2 ON t1.entity_id = t2.entity_id AND t1.revision_id = t2.revision_id LIMIT 1 EOD;
$array = Array();
$result = mysql_query($sql);
while ($row = mysql_fetch_object($result)) { $array['email']=$row->field_req_a_quote_email_value; $array['subject']=$row->field_req_a_quote_email_subject_value; }
mysql_free_result($result);
On Sun, Mar 25, 2012 at 1:50 AM, Awtar Singh <asingh@quantum-coders.com> wrote: Gerald -
Add period before /includes/bootstrap.inc if you are executing the script from the Web root.
Or please give the exact error that you are getting.
Regards,
Awtar Singh Executive Director Quantum Coders LLC
www.quantum-coders.com
Sent from my iPhone
On Mar 25, 2012, at 8:47 AM, Gerald Klein <jk@zognet.com> wrote:
I tried this and also included the define statement for the variable that require_once is using and it errors out including bootstrap.inc. It needs something else.
thanks for your post, anyone else?
define('DRUPAL_ROOT', getcwd());
require_once DRUPAL_ROOT . '/includes/bootstrap.inc'; drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
On Sat, Mar 24, 2012 at 10:12 PM, Vaibhav Jain <in.vaibhavjain@gmail.com> wrote: Just paste these 2 lines in you external file
require_once './includes/bootstrap.inc'; drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
these are also included in index.php. These are for D6
On Sun, Mar 25, 2012 at 8:28 AM, Gerald Klein <jk@zognet.com> wrote: Hi I need to pull a dataset in an ajax file. What drupal includes to I need to use the drupal db connection.
thanks any help is appreciated
--jerry
-- Gerald Klein DBA www.geraldklein.com jk@zognet.com 708-599-0352
Linux registered user #548580
-- [ Drupal support list | http://lists.drupal.org/ ]
-- Regards, Vaibhav Jain
-- [ Drupal support list | http://lists.drupal.org/ ]
-- Gerald Klein DBA www.geraldklein.com jk@zognet.com 708-599-0352
Linux registered user #548580
-- [ Drupal support list | http://lists.drupal.org/ ]
-- [ Drupal support list | http://lists.drupal.org/ ]
-- Gerald Klein DBA www.geraldklein.com jk@zognet.com 708-599-0352
Linux registered user #548580
-- [ Drupal support list | http://lists.drupal.org/ ]
I'm on Apache so I'm good, but I also had to send mail and it got to be a real pain, so what I figured out instead of all this pain. Is create a basic page give page a custom url 'page-name' create a page suggestion like page--page-name.tpl.php strip out the html completely then include your php ajax code. This gives you access to all that drupal has to offer with out going through what I just went through.Yipee!! thanks again for your posts --jerry On Sun, Mar 25, 2012 at 8:49 AM, Awtar Singh <asingh@quantum-coders.com>wrote:
Or you can use a config file and set the docroot in there using below command and include it once.
Sent from my iPhone
On Mar 25, 2012, at 6:46 PM, Awtar Singh <asingh@quantum-coders.com> wrote:
On IIS try :
realpath(basename(getenv("SCRIPT_NAME")));
This will return the full script path. Hope this helps.
Sent from my iPhone
On Mar 25, 2012, at 6:13 PM, Gerald Klein <jk@zognet.com> wrote:
Hi, this didnt get me the mice drupal objects but I can make a php result set, it does give me the correct database/username/password. This also is specifc to Apache, IIS does nto have the DOCUMENT_ROOT variable.
$docroot = getenv("DOCUMENT_ROOT"); require_once $docroot . '/includes/bootstrap.inc'; drupal_bootstrap(DRUPAL_BOOTSTRAP_DATABASE, false); require_once $docroot . '/sites/default/settings.php'; global $databases; $username = $databases["default"]["default"]["username"]; $password = $databases["default"]["default"]["password"]; $database = $databases["default"]["default"]["database"]; $host = $databases["default"]["default"]["host"]; mysql_connect("$host", "$username", "$password"); mysql_select_db("$database");
$sql = <<<EOD SELECT t1.field_req_a_quote_email_value, t2.field_req_a_quote_email_subject_value FROM field_data_field_req_a_quote_email t1 INNER JOIN field_data_field_req_a_quote_email_subject t2 ON t1.entity_id = t2.entity_id AND t1.revision_id = t2.revision_id LIMIT 1 EOD;
$array = Array();
$result = mysql_query($sql);
while ($row = mysql_fetch_object($result)) { $array['email']=$row->field_req_a_quote_email_value; $array['subject']=$row->field_req_a_quote_email_subject_value; }
mysql_free_result($result);
On Sun, Mar 25, 2012 at 1:50 AM, Awtar Singh <asingh@quantum-coders.com>wrote:
Gerald -
Add period before /includes/bootstrap.inc if you are executing the script from the Web root.
Or please give the exact error that you are getting.
Regards,
Awtar Singh Executive Director Quantum Coders LLC
www.quantum-coders.com
Sent from my iPhone
On Mar 25, 2012, at 8:47 AM, Gerald Klein <jk@zognet.com> wrote:
I tried this and also included the define statement for the variable that require_once is using and it errors out including bootstrap.inc. It needs something else.
thanks for your post, anyone else?
define('DRUPAL_ROOT', getcwd());
require_once DRUPAL_ROOT . '/includes/bootstrap.inc'; drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
On Sat, Mar 24, 2012 at 10:12 PM, Vaibhav Jain <in.vaibhavjain@gmail.com>wrote:
Just paste these 2 lines in you external file
require_once './includes/bootstrap.inc'; drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
these are also included in index.php. These are for D6
On Sun, Mar 25, 2012 at 8:28 AM, Gerald Klein <jk@zognet.com> wrote:
Hi I need to pull a dataset in an ajax file. What drupal includes to I need to use the drupal db connection.
thanks any help is appreciated
--jerry
--
Gerald Klein DBA****
www.geraldklein.com <http://geraldklein.com/>****
jk@zognet.com****
708-599-0352****
Linux registered user #548580
-- [ Drupal support list | http://lists.drupal.org/ ]
-- Regards, Vaibhav Jain
-- [ Drupal support list | http://lists.drupal.org/ ]
--
Gerald Klein DBA****
www.geraldklein.com <http://geraldklein.com/>****
jk@zognet.com****
708-599-0352****
Linux registered user #548580
-- [ Drupal support list | http://lists.drupal.org/ ]
-- [ Drupal support list | http://lists.drupal.org/ ]
--
Gerald Klein DBA****
www.geraldklein.com <http://geraldklein.com/>****
jk@zognet.com****
708-599-0352****
Linux registered user #548580
-- [ Drupal support list | http://lists.drupal.org/ ]
-- [ Drupal support list | http://lists.drupal.org/ ]
-- Gerald Klein DBA**** www.geraldklein.com <http://geraldklein.com/>**** jk@zognet.com**** 708-599-0352**** Linux registered user #548580
Excellent! Awtar singh Quantum Coders LLC www.quantum-coders.com Sent from my iPhone On Mar 25, 2012, at 9:25 PM, Gerald Klein <jk@zognet.com> wrote:
I'm on Apache so I'm good, but I also had to send mail and it got to be a real pain, so what I figured out instead of all this pain. Is create a basic page give page a custom url 'page-name' create a page suggestion like page--page-name.tpl.php strip out the html completely then include your php ajax code. This gives you access to all that drupal has to offer with out going through what I just went through.Yipee!!
thanks again for your posts
--jerry
On Sun, Mar 25, 2012 at 8:49 AM, Awtar Singh <asingh@quantum-coders.com> wrote: Or you can use a config file and set the docroot in there using below command and include it once.
Sent from my iPhone
On Mar 25, 2012, at 6:46 PM, Awtar Singh <asingh@quantum-coders.com> wrote:
On IIS try :
realpath(basename(getenv("SCRIPT_NAME")));
This will return the full script path. Hope this helps.
Sent from my iPhone
On Mar 25, 2012, at 6:13 PM, Gerald Klein <jk@zognet.com> wrote:
Hi, this didnt get me the mice drupal objects but I can make a php result set, it does give me the correct database/username/password. This also is specifc to Apache, IIS does nto have the DOCUMENT_ROOT variable.
$docroot = getenv("DOCUMENT_ROOT"); require_once $docroot . '/includes/bootstrap.inc';
drupal_bootstrap(DRUPAL_BOOTSTRAP_DATABASE, false); require_once $docroot . '/sites/default/settings.php'; global $databases;
$username = $databases["default"]["default"]["username"]; $password = $databases["default"]["default"]["password"]; $database = $databases["default"]["default"]["database"]; $host = $databases["default"]["default"]["host"];
mysql_connect("$host", "$username", "$password"); mysql_select_db("$database");
$sql = <<<EOD SELECT t1.field_req_a_quote_email_value, t2.field_req_a_quote_email_subject_value FROM field_data_field_req_a_quote_email t1 INNER JOIN field_data_field_req_a_quote_email_subject t2 ON t1.entity_id = t2.entity_id AND t1.revision_id = t2.revision_id LIMIT 1 EOD;
$array = Array();
$result = mysql_query($sql);
while ($row = mysql_fetch_object($result)) { $array['email']=$row->field_req_a_quote_email_value; $array['subject']=$row->field_req_a_quote_email_subject_value; }
mysql_free_result($result);
On Sun, Mar 25, 2012 at 1:50 AM, Awtar Singh <asingh@quantum-coders.com> wrote: Gerald -
Add period before /includes/bootstrap.inc if you are executing the script from the Web root.
Or please give the exact error that you are getting.
Regards,
Awtar Singh Executive Director Quantum Coders LLC
www.quantum-coders.com
Sent from my iPhone
On Mar 25, 2012, at 8:47 AM, Gerald Klein <jk@zognet.com> wrote:
I tried this and also included the define statement for the variable that require_once is using and it errors out including bootstrap.inc. It needs something else.
thanks for your post, anyone else?
define('DRUPAL_ROOT', getcwd());
require_once DRUPAL_ROOT . '/includes/bootstrap.inc'; drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
On Sat, Mar 24, 2012 at 10:12 PM, Vaibhav Jain <in.vaibhavjain@gmail.com> wrote: Just paste these 2 lines in you external file
require_once './includes/bootstrap.inc'; drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
these are also included in index.php. These are for D6
On Sun, Mar 25, 2012 at 8:28 AM, Gerald Klein <jk@zognet.com> wrote: Hi I need to pull a dataset in an ajax file. What drupal includes to I need to use the drupal db connection.
thanks any help is appreciated
--jerry
-- Gerald Klein DBA www.geraldklein.com jk@zognet.com 708-599-0352
Linux registered user #548580
-- [ Drupal support list | http://lists.drupal.org/ ]
-- Regards, Vaibhav Jain
-- [ Drupal support list | http://lists.drupal.org/ ]
-- Gerald Klein DBA www.geraldklein.com jk@zognet.com 708-599-0352
Linux registered user #548580
-- [ Drupal support list | http://lists.drupal.org/ ]
-- [ Drupal support list | http://lists.drupal.org/ ]
-- Gerald Klein DBA www.geraldklein.com jk@zognet.com 708-599-0352
Linux registered user #548580
-- [ Drupal support list | http://lists.drupal.org/ ]
-- [ Drupal support list | http://lists.drupal.org/ ]
-- Gerald Klein DBA www.geraldklein.com jk@zognet.com 708-599-0352
Linux registered user #548580
-- [ Drupal support list | http://lists.drupal.org/ ]
Any reason why you don't just create a custom module with a menu hook that executes a print of the data that you need? This is the way I code most of my web service code. Something like; function custom_module_menu() { $items['custom_module'] = array( 'access arguments' => 'access content' // replace this with appropriate drupal security. 'page callback' => 'custom_module_ajax_callback', 'type' => MENU_CALLBACK, ); return $items; } function custom_module_ajax_callback() { //execute normal drupal statements here print 'replace this with whatever you want the ajax callback to return'; } You'd also need a .info file, but that would get you started. ________________________________ From: support-bounces@drupal.org [mailto:support-bounces@drupal.org] On Behalf Of Gerald Klein Sent: Saturday, March 24, 2012 8:18 PM To: support@drupal.org Subject: Re: [support] Database connection I tried this and also included the define statement for the variable that require_once is using and it errors out including bootstrap.inc. It needs something else. thanks for your post, anyone else? define('DRUPAL_ROOT', getcwd()); require_once DRUPAL_ROOT . '/includes/bootstrap.inc'; drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL); On Sat, Mar 24, 2012 at 10:12 PM, Vaibhav Jain <in.vaibhavjain@gmail.com> wrote: Just paste these 2 lines in you external file require_once './includes/bootstrap.inc'; drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL); these are also included in index.php. These are for D6 On Sun, Mar 25, 2012 at 8:28 AM, Gerald Klein <jk@zognet.com> wrote: Hi I need to pull a dataset in an ajax file. What drupal includes to I need to use the drupal db connection. thanks any help is appreciated --jerry -- Gerald Klein DBA www.geraldklein.com <http://geraldklein.com/> jk@zognet.com <mailto:jk@zognet.com> 708-599-0352 Linux registered user #548580 -- [ Drupal support list | http://lists.drupal.org/ ] -- Regards, Vaibhav Jain -- [ Drupal support list | http://lists.drupal.org/ ] -- Gerald Klein DBA www.geraldklein.com <http://geraldklein.com/> jk@zognet.com <mailto:jk@zognet.com> 708-599-0352 Linux registered user #548580
participants (4)
-
Awtar Singh -
Gerald Klein -
Metzler, David -
Vaibhav Jain