cheers,
lee.
Code: Select all
<?php
Connectlistmail();
$sql = "SELECT user1 FROM lm_users WHERE user2 IN ('BB%', 'BL%', 'CA%', 'CH%', 'CW%', 'FY%', 'L1%', 'L2%', 'L3%', 'L4%', 'L5%', 'L6%', 'L7%', 'L8%', 'L9%', 'LA%', 'LL%', 'M1%', 'M2%', 'M3%', 'M4%', 'M5%', 'M6%', 'M7%', 'M8%', 'M9%', 'OL%', 'PR%', 'WA%', 'WN%') ";
$result = mysql_query($sql) or die(mysql_error().'<p>'.$sql.'</p>');
$total = mysql_num_rows($result);
echo $total;
?>
// OR
<?php
Connectlistmail();
$sql = "SELECT user1 FROM lm_users WHERE user2 IN ('BB', 'BL', 'CA', 'CH', 'CW', 'FY', 'L1', 'L2', 'L3', 'L4', 'L5', 'L6', 'L7', 'L8', 'L9', 'LA', 'LL', 'M1', 'M2', 'M3', 'M4', 'M5', 'M6', 'M7', 'M8', 'M9', 'OL', 'PR', 'WA', 'WN') ";
$result = mysql_query($sql) or die(mysql_error().'<p>'.$sql.'</p>');
$total = mysql_num_rows($result);
echo $total;
?>