When you do a PHP query database---
In the PHP query database, I passed the parameter to get the ID of a table, how can I use this ID to display the table of a certain field value;
Can also understand this: there is a user table, the field inside the Id,user,time,title, I now know the user ID, I want to take out the user table inside the Time,title these two fields, the MySQL database query, how should write the statement?????
Our project manager did not realize for a long while, seek the master to solve
Php
Share to:
------Solution--------------------
SELECT time,title from User WHERE id= ' incoming ID value '
------Solution--------------------
$rs = mysql_query ("Select Time,title from User WHERE id= ' $id '");
$row = Mysql_fetch_assoc ($RS);
echo $row [' time '], ', $row [' Title '];
------Solution--------------------
The MYSQL_FETCH_ASSOC () function obtains a row from the result set as an associative array.
Returns an associative array based on the rows obtained from the result set, or False if there are no more rows.