Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $q4 = "SELECT domain_name,slots_config.bid FROM slots_pid,slots_config,slots_sites
- WHERE slots_config.bid=slots_pid.bid && slots_sites.aid=slots_pid.aid";
- $result4 = mysql_query($q4);
- while($row = mysql_fetch_array($result4))
- {
- $resultarray[] = $row;
- }
- if (in_array("test",$resultarray))
- {
- echo "Match found";
- }
- else
- {
- echo "Match not found";
- }
- $resultarray[0]['domain_name'] = 'first row domain name';
- $resultarray[0]['bid'] = 'first row bid';
- $resultarray[1]['domain_name'] = 'second row domain name';
- ...
- $q4 = "SELECT domain_name,slots_config.bid FROM slots_pid,slots_config,slots_sites
- WHERE slots_config.bid=slots_pid.bid && slots_sites.aid=slots_pid.aid";
- $result4 = mysql_query($q4);
- while($row = mysql_fetch_array($result4))
- {
- if (in_array("test",$row))
- {
- echo "Match found";
- }
- else
- {
- echo "Match not found";
- }
- }
- $found = false;
- while($row = mysql_fetch_array($result4))
- {
- if (in_array($needle, $row){
- print "here it is";
- $found = true;
- break;
- }
- if (!$found) {
- print "not found";
- }
Add Comment
Please, Sign In to add comment