动态url mysql php如何

动态url mysql php如何,php,mysql,url,dynamic,Php,Mysql,Url,Dynamic,我正在wordpress网站上构建一个表,显示从一个表中排序的数据 我不能正确地将标题更改为URL,这是来自同一数据库的可变slug 基本url保持不变,只是slug发生了变化 然后是鼻涕虫 这是到目前为止我的代码 function dbTEST($atts, $content = null) { // Get all the data from the "job board" table $result = mysql_query("SELECT * FROM wpjb_job WHERE

我正在wordpress网站上构建一个表,显示从一个表中排序的数据

我不能正确地将标题更改为URL,这是来自同一数据库的可变slug

基本url保持不变,只是slug发生了变化 然后是鼻涕虫

这是到目前为止我的代码

function dbTEST($atts, $content = null) {

// Get all the data from the "job board" table

$result = mysql_query("SELECT * FROM wpjb_job WHERE job_country='72' ORDER BY job_title") 
or die(mysql_error());  

echo "<table border='1'>";
echo "<tr> <th>Job</th> <th>Company</th> </tr>";


// keeps getting the next row until there are no more to get

while($row = mysql_fetch_array( $result )) {

    // Print out the contents of each row into a table

    echo "<tr><td>"; 
#---------- I need this job_title to url link to the job_slug
    echo $row['job_title'];
    echo $row['job_slug'];
    echo "</td><td>"; 
    echo $row['company_name'];
    echo "</td></tr>"; 
} 

echo "</table>";
}
试试这个:

echo "<a href=wwww.thesite.com/job/view/".$row['job_slug'].">".$row['job_title']."</a>"

谢谢,这就是我最后要做的,除了我有echo'