Comparing Values


Posted on 16th Feb 2014 07:03 pm by admin

Hi
I'm reading data from a database and this seems to work OK.

Each system has an associated series of references..

Code:

Code: $dn = "cn=System";
$filter="(objectclass=*)";
$values = array('cn','telephone','id','intref','dataref','sysref');
$sr=ldap_list($ds, $dn, $filter, $values);
$info = ldap_get_entries($ds, $sr);
for ($n=0; $n<$info['count']; $n++) {
$cn = $info[$n]['cn'][0];
$tele[$cn] = $info[$n]['telephone'][0];
$id[$cn] = $info[$n]['id'][0];
$intref[$cn] = $info[$n]['intref'][0];
$dataref[$cn] = $info[$n]['dataref'][0];
$sysref[$cn] = $info[$n]['sysref'][0];
}

foreach ($tele as $key => $value) {

echo $key . " - Phone: " . $value . " - ID: " . $id[$key] . " - intref: " . $intref[$key] . " - dataref: " . $dataref[$key]. " - sysref: " . $sysref[$key]. "
";

}
What I'm trying to do is
Code:

Code: if id = intref, or id = dataref or id = sysref
then display intref or dataref or sysref in bold.

Obviously I need to check to see if ID from any of the systems match any of the refs.

I think that makes sense !!

No comments posted yet

Your Answer:

Login to answer
67 Like 52 Dislike
Previous forums Next forums
Other forums

why this query can delete duplicates ?
why this query can delete duplicates ? Anybody can give me the detailed explanation ?

Tha

Php WordPress help
I am writing the following code for making a plugin

<?php
header("Content-Type

what business processes?
Hi,

A general question. What business processes (like OTC - Order to Cach, P2P, R2R etc)

Javascript form submit and radio buttons?
When this form is submitted, it is automatically resubmitted using JS.

All my fields are carr

Help on query replacing the date
Hi Pals,

i want to replace the current date in a column to some value say C or D or any n

php web service error
hey guys,
I'm working on a project requires the use of web services. I've been trying a few tutor

Referential Integrity problem when inserting into 2 tables at same time
Hello Everyone,

Im relativity new to PHP and MySQL and i have come up against a problem. i h

Solution to the FindControl problem
I have seen may posts about having problems with the FindControl method. Most seem to come about bec

PHP page loading in Firefox but not in IE
hello,

i am currently doing a project in PHP and i have a problem. If I view the project in M

New Search Engine
Hey everyone,

I have a ZIP Code Radius search engine already functional. it displays all of t

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash