7913 Posts in 1355 Topics by 930 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, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba, simon_w
|
Page:
1
|
Go to End | |
| Author | Topic: | 225 Views |
-
mysql query of other database in a normal page

6 October 2011 at 2:16am
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
| 225 Views | ||
|
Page:
1
|
Go to Top |

