How to Link to DNN Text in SQL
If you are using DotNetNuke as your content management system then, as an application dedicated for Windows Server computers, it automatically integrates with the SQL Server. If you want to link to the text in the database you can issue standard SQL commands. These can either be entered into the command line to link to the text in your Command Prompt, or you can insert these into a PHP file to link to the database.
Instructions
-
-
1
Open Notepad on your computer.
-
2
Type the following code into the document:
<?php
$con = mysql_connect("localhost","user","pass");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("databasename", $con;
$result = mysql_query("SELECT * FROM table")'
?>
-
-
3
Replace "user" and "pass" with the user name and password to access your SQL server. Replace "databasename" with the name of the database in which you created DNN. Replace "table" with a table name of data you want to show.
-
4
Click "File," then "Save As." Click the file type drop-down and select "All Files." Name your file "connect.php" (without quotes). When you run this file in a browser, it will link to all DNN text in the 'table' specified.
-
1