N
N
newaitix2019-05-08 11:33:11
PHP
newaitix, 2019-05-08 11:33:11

How to select multiple values ​​from database?

SELECT value  
  FROM SC_local 
  WHERE 
    (id='credit_mail_title' OR id='email_hello')

Only the first entry is selected, i.e. credit_mail_title.
I need to select value and fields with id - credit_mail_title and value and fields with id - email_hello

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
idShura, 2019-05-08
@idShura

$dbres = mysql_query("
SELECT *
FROM SC_local
WHERE
(id='credit_mail_title' OR id='email_hello')
");
$credit_fetch_lan=mysql_fetch_row($dbres);
print_r($credit_fetch_lan);
Not selenium in php, but I think you need to use mysql_fetch_array or mysql_fetch_assoc instead of mysql_fetch_row p/s/ the mysql extension is outdated, you need to switch to mysqli

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question