我正在尝试将值呈现到带有删除链接的表中。现在我的问题是我需要将 mysql 行 id 传递给一个函数,该函数将从表中删除值并刷新。除了 delex 子查询之外,一切都很好,我未能在函数内获取 id,它只是将空值传递给函数我如何在函数内获取行 id
deletex($RowID)
我的查询在这里。有任何想法吗?,
$query="SELECT username as '{$mylanguage['username']}',
vchCode as '{$mylanguage['voucher_code']}',
vchStatus as '{$mylanguage['status']}',
vchDateCreated as '{$mylanguage['date']}',
vchDateUsed as '{$mylanguage['date_used']}',
CONCAT('<a href=\"#\" onclick=\"return deletx(\'',SELECT vchID,'\')\">".$mylanguage['delete']."</a>') as ' '
FROM $tablename
LEFT JOIN #__users ON $uniqueKey = id
".$_SESSION['query_condition']."
ORDER BY vchID DESC
LIMIT ". ($pagination['start'] - 1) .",{$pagination['size']}";