[SOLVED] Â Trying to get a link to child table |
8/4/2017 10:15:00 AM |
PHPRunner General questions | |
S
swanside author
Hi Guys SELECT
concat('http://localhost/qrtest/MotorMaintenance_list.php?masterkey1=$data["ID"]&mastertable=Motor''>http://localhost/qrtest/MotorMaintenance_list.php?masterkey1=$data["ID"]&mastertable=Motor';) AS LiveurlText
|
|
jadachDevClub member 8/4/2017 | |
You need to add the html tags (<a href...) to make it clickable, then make sure it is set as view as html |
S
|
swanside author 8/4/2017 |
You need to add the html tags (<a href...) to make it clickable, then make sure it is set as view as html
|
jadachDevClub member 8/4/2017 | |
Try adding this right in your SQL Query: 'http://localhost/qrtest/MotorMaintenance_list.php?masterkey1='+CONVERT(varchar(10), ID) AS LiveurlText
|
S
|
swanside author 8/4/2017 |
Thnaks, but im on MySQL. I tried it anyway and it throws back an error with the convert in it. Try adding this right in your SQL Query: 'http://localhost/qrtest/MotorMaintenance_list.php?masterkey1='+CONVERT(varchar(10), ID) AS LiveurlText
|
admin 8/4/2017 | |
You should not be using PHP code in your SQL like $data["ID"]. You can use string values and field names there: SELECT |
S
|
swanside author 8/4/2017 |
Cheers Sergey You should not be using PHP code in your SQL like $data["ID"]. You can use string values and field names there: https://dev.mysql.com/doc/refman/5.7/en/string-functions.html#function_concat https://www.tutorialspoint.com/mysql/mysql-concat-function.htm You should not include 'localhost' in the URL either, your solution will not be portable. SELECT |