sudhakar phad sudhakar phad - 2 months ago 7x
PHP Question

If value exist (not primary key) in table, return table id (primary key)?

Element by there id (primary key) or any other alternative for doing that, I used

for checking existence of value it works fine how to change the specified row values of columns without id(primary key) of row. Please provide some code if possible.


mysql_fetch_assoc returns array of results including all the columns that you got through the query. What you need to do is,

while ($row = mysql_fetch_assoc($result)) 
echo $row["primary_key"];
echo $row["other_value"];

    //Update the table with $row["primary_key"]