$sql1="SELECT id FROM table ORDER BY id DESC LIMIT 1";
echo '1234/' . $sql1 . "<br />";
Well the output is 1234/SELECT id FROM table ORDER BY id DESC LIMIT 1
but i want the output to be
1234/respective value
If possible give some explanation also
I am new to PHP ..
Thanks in advance
You have not actually done a query, only defined the SQL query you intend to run as a string variable. You need to establish a database connection, perform the query, and retrieve the result before your
respective valuewill be what you want.Start reading the PHP MySQL manual here.