this
- Original Message -
From: Philip J. Newman [EMAIL PROTECTED]
To: Julio Nobrega Trabalhando [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Wednesday, March 20, 2002 8:46 AM
Subject: Re: [PHP] Re: [NEWMAN] make an if or else if statement from
mysql.
if (db_num_rows() 0) {
mysql_query
: [PHP] Re: [NEWMAN] make an if or else if statement from
mysql.
$sql = SELECT accessIP FROM `access` ORDER BY `accessID` DESC;
$sql_result = mysql_query($sql, $connection) or die (Could not get Query);
if (db_num_rows() 0) {
// Update view where ip = visitor_ip
} else {
// Normal insert
Select before to see if exists:
if (db_num_rows() 0) {
// Update view where ip = visitor_ip
} else {
// Normal insert
}
--
Julio Nobrega.
Um dia eu chego lá:
http://sourceforge.net/projects/toca
Ajudei? Salvei? Que tal um presentinho?
: [PHP] Re: [NEWMAN] make an if or else if statement from mysql.
Select before to see if exists:
if (db_num_rows() 0) {
// Update view where ip = visitor_ip
} else {
// Normal insert
}
--
Julio Nobrega.
Um dia eu chego lá:
http://sourceforge.net/projects/toca
Ajudei? Salvei
if (db_num_rows() 0) {= WHERE DOSE THIS VERABLE COME FROM?
This is just a count of the returned rows you have to make.
First, do something like this:
SELECT ip FROM table WHERE ip = visitor_ip;
If it returns 0 rows, it means you don't have the ip and need to store,
otherwise just
5 matches
Mail list logo