<div class="gmail_quote">On Mon, Nov 16, 2009 at 7:55 AM, spartaguy spartaguy <span dir="ltr"><<a href="mailto:spartaguy300@gmail.com">spartaguy300@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br> I have two databases - one is for drupal data. The other db is for customer data. Inside the customer data db is a table - customer_data.<br><br>I want to do a select * on customer_data in the customer database and show the result on screen.<br>
<br>Can someone tell me how to do this?<div><div></div><div class="h5"><br></div></div></blockquote></div><br>Your bare bones menu item is something like this:<br><br><code><span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);"> $items</span><span style="color: rgb(0, 119, 0);">[</span><span style="color: rgb(221, 0, 0);">'mypath/%object'</span><span style="color: rgb(0, 119, 0);">] = array(<br>
</span><span style="color: rgb(221, 0, 0);">'title' </span><span style="color: rgb(0, 119, 0);">=> </span><span style="color: rgb(221, 0, 0);">'Page title'</span><span style="color: rgb(0, 119, 0);">,<br>
</span><span style="color: rgb(0, 119, 0);"> </span><span style="color: rgb(221, 0, 0);">'description' </span><span style="color: rgb(0, 119, 0);">=> </span><span style="color: rgb(221, 0, 0);">'Your description goes here.'</span><span style="color: rgb(0, 119, 0);">,<br>
</span><span style="color: rgb(0, 119, 0);"> </span><span style="color: rgb(221, 0, 0);">'access arguments' </span><span style="color: rgb(0, 119, 0);">=> array(</span><span style="color: rgb(0, 0, 187);">'permission string')</span><span style="color: rgb(0, 119, 0);">,<br>
</span><span style="color: rgb(0, 119, 0);"> </span><span style="color: rgb(221, 0, 0);">'page callback' </span><span style="color: rgb(0, 119, 0);">=> </span><span style="color: rgb(221, 0, 0);">'customer_display'</span><span style="color: rgb(0, 119, 0);">,<br>
</span><span style="color: rgb(0, 119, 0);"> );</span></span></code><br><br>Then write a function named customer_display() that runs queries the way Frederik showed you and returns a string containing rendered HTML.<br>