Rahul,<br><br>I've done something similar quite a few times using Drupal. The guts of my code are:<div><div><br></div><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
function scoreboard_menu() {</blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
$items = array();</blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
<br></blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
<span class="Apple-tab-span" style="white-space:pre">        </span>$items['scoreboard'] = array(</blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
<span class="Apple-tab-span" style="white-space:pre">                </span>'title'<span class="Apple-tab-span" style="white-space:pre">                        </span>=> t('My Scoreboard'),</blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
<span class="Apple-tab-span" style="white-space:pre">                </span>'description'<span class="Apple-tab-span" style="white-space:pre">        </span>=> t('Scoreboard'),</blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
<span class="Apple-tab-span" style="white-space:pre">                </span>'page callback'<span class="Apple-tab-span" style="white-space:pre">        </span>=> 'scoreboard_main_page',</blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
<span class="Apple-tab-span" style="white-space:pre">                </span>'access arguments'<span class="Apple-tab-span" style="white-space:pre">        </span>=> array('access content'),</blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
<span class="Apple-tab-span" style="white-space:pre">                </span>'type'<span class="Apple-tab-span" style="white-space:pre">        </span>=> MENU_CALLBACK,</blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
<span class="Apple-tab-span" style="white-space:pre">        </span>);</blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
<br></blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
<span class="Apple-tab-span" style="white-space:pre">        </span>return $items;</blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
} </blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
</blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
function scoreboard_main_page() {<br> $output = '';<br><span class="Apple-tab-span" style="white-space:pre">        </span>$table = array();<br><span class="Apple-tab-span" style="white-space:pre">        </span>$header = array(<br>
<span class="Apple-tab-span" style="white-space:pre">        </span>);<br><span class="Apple-tab-span" style="white-space:pre">        </span>$date = date('Y-m-d');<br><br><span class="Apple-tab-span" style="white-space:pre">        </span>db_set_active('customdb');<br>
<span class="Apple-tab-span" style="white-space:pre">        </span>$results = db_query('SELECT * FROM WHERE filter LIKE "%s%%" GROUP BY groupfield ORDER BY orderfield DESC', $date);<br><span class="Apple-tab-span" style="white-space:pre">        </span>db_set_active();</blockquote>
<blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
</blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
<br><span class="Apple-tab-span" style="white-space:pre">        </span>while ($line = db_fetch_object($results)) {<br><span class="Apple-tab-span" style="white-space:pre">                </span>$table[] = $line;<br><span class="Apple-tab-span" style="white-space:pre">        </span>}<br>
<span class="Apple-tab-span" style="white-space:pre">        <br></span><span class="Apple-tab-span" style="white-space:pre">        </span>$output .= theme('table', $header, $table, array('class' => 'scoreboard-table'));<br>
<span class="Apple-tab-span" style="white-space:pre">        </span>return $output;<br>}</blockquote><div><br></div><div>Just make sure you have your database settings in your settings.php. Seems to work for me for simple tasks</div>
<br>On Wed, Jul 22, 2009 at 1:11 PM, Rahul Nabar<<a href="mailto:rpnabar@gmail.com">rpnabar@gmail.com</a>> wrote:<br>> On Wed, Jul 22, 2009 at 2:21 PM, sivaji j.g<<a href="mailto:sivaji2009@gmail.com">sivaji2009@gmail.com</a>> wrote:<br>
>> On Thu, Jul 23, 2009 at 12:45 AM, Rahul Nabar <<a href="mailto:rpnabar@gmail.com">rpnabar@gmail.com</a>> wrote:<br>>>><br>>>> We have a mysql database storing a bunch of scientific data and I have<br>
>>> a cron script querying the database and making html tables of key<br>>>> data. Is there a way how this content (the resulting html pages) can<br>>>> be integrated and managed via drupal? Especially the link structure<br>
>>> etc.?<br>>><br>>> It is very difficult to answer with this minimal information.<br>><br>> Sorry if I was terse. I'll try to do better:<br>><br>> I have data in a mysql database. In order to present this I (or rather<br>
> a cron script) usually run on the command line something like:<br>><br>> echo 'SELECT * FROM footable' | mysql -h <a href="http://foo.bar.edu">foo.bar.edu</a> -u foouser -p<br>> --html bar_db > temp.html<br>
><br>> Then a webpage.php file adds some more headers, css styling etc. and<br>> presents this page. Something like:<br>><br>> <a href="http://files.getdropbox.com/u/118481/mqsql_html.jpg">http://files.getdropbox.com/u/118481/mqsql_html.jpg</a><br>
><br>><br>> Unfortunately there are several such "autogenerated" pages and it is<br>> hard to keep track of up-to-date menus, links etc. I was wondering if<br>> this was facilitated by Drupal. Maybe even if Drupal was the right<br>
> tool for this job at all.<br>><br>> --<br>> Rahul<br>> --<br>> [ Drupal support list | <a href="http://lists.drupal.org/">http://lists.drupal.org/</a> ]<br>><br><br></div>