Jump to:

7940 Posts in 1543 Topics by 946 members

DataObjectManager Module

SilverStripe Forums » DataObjectManager Module » mysql query of other database in a normal page

Discuss the DataObjectManager module, and the related ImageGallery module.

Moderators: martimiz, UncleCheese, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 367 Views
  • flei1982
    Avatar
    Community Member
    1 Post

    mysql query of other database in a normal page Link to this post

    hi.

    i want display some results of an external database (mysql) in a silverstripe standard page

    is there any idea how i can insert this php code ... (it is just an example)

    <?php

    $link = mysql_connect("localhost", "mysql_user", "mysql_password");
    mysql_select_db("database", $link);

    $result = mysql_query("SELECT * FROM table1", $link);
    $num_rows = mysql_num_rows($result);

    echo "$num_rows Rows\n";

    ?>

    thx brgs rene

    367 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.