Answers for "mysql query certain row"

SQL
0

mysql query single row

$result = mysql_query("SELECT option_value FROM wp_10_options WHERE option_name='homepage' LIMIT 1");
$row = mysql_fetch_assoc($result);
echo $row['option_value'];
Posted by: Guest on May-03-2021
0

get only one row in mysql

$q = "select whatIwant FROM table where id = 'myId' LIMIT 1";
$r = mysql_query($q);
while($i = mysql_fetch_array($r)) {
   $j = $i['whatIwant'];
}
echo $j;
Posted by: Guest on May-29-2020

Code answers related to "SQL"

Browse Popular Code Answers by Language