473,385 Members | 1,753 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

matching problem

Hello all, i have this matching story. What i want to do, is to check the
variable $betaling if this is 0 or 1. But the id from the tabel form have to
be compared with $persid from the table reactie. thats not the problem, the
problem is i am not able to make 2 queries in one while statement, does
anyone knows how to solve this?

Irlan
$query = "SELECT a.oproep,b.oproep, a.react, b.react, a.logid, b.logid,
a.persid,b.persid, a.logemail, b.logemail,a.persemail,b.persemail

FROM reactie a, reactie b
WHERE a.logid = b.persid AND b.logid = a.persid AND a.logid='$logid' ";

$result = mysql_query($query);

$query_data = mysql_fetch_row($result);//

if($result = mysql_query($query)){
$rows = mysql_num_rows($result);

if($rows<1){
echo "<p>You have no Matches";

} else {
echo "<p>You have $rows Match(es)<p><p>";

}}

while($query_data = mysql_fetch_array($result)){

$oproep = $query_data["oproep"];
$persid = $query_data["logid"];
$reactie = $query_data["react"];
$logemail = $query_data["logemail"];
$sql= "SELECT betaling from form where id='$persid'";
$res = mysql_query($sql);
$query_data = mysql_fetch_row($res);
while($query_data = mysql_fetch_array($result)){
$betaling= $query_data["betaling"]

}
if ($betaling="0"){
echo "your contact did not pay for this service yet, he will be notified,
you dont have to pay for this service";
} else {

echo " <tr>\n";
echo " <td align=center bgcolor=FFECC4 ><font
color=black><a
href=\"javascript:Pop550Picture('../pic/klanten/gegevens.php?id=$persid')\"><p>$oproep</a></td>\n";//

echo " <td align=center bgcolor=FFECC4 ><font
color=black><p>".$reactie."</td>\n";
echo " <td align=center bgcolor=FFECC4 ><font
color=black><p>".$reactie."</td>\n";
echo " <td align=center bgcolor=FFECC4 ><font
color=black><p><a href=\"mailto:".$logemail."\">".$logemail."</a></td>\n";
echo " </tr>\n";//

}}
Jul 17 '05 #1
0 1029

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

17
by: Andrew McLean | last post by:
I have a problem that is suspect isn't unusual and I'm looking to see if there is any code available to help. I've Googled without success. Basically, I have two databases containing lists of...
0
by: Eric A. Hall | last post by:
I'm trying to scratch up a whois-like client in perl, and am having a strange problem with matching input characters. Specifically, matching against things like "@" works fine over the network, but...
7
by: Niko | last post by:
Hi , I am writing script using multiple pattern matching. I need to replace the $_ =~ few times. Example: sub xx { open (TEMPF,"> $T_FILE");
10
by: bpontius | last post by:
The GES Algorithm A Surprisingly Simple Algorithm for Parallel Pattern Matching "Partially because the best algorithms presented in the literature are difficult to understand and to implement,...
8
by: regis | last post by:
Greetings, about scanf matching nonempty sequences using the "%" matches a nonempty sequence of anything except '-' "%" matches a nonempty sequence of anything except ']" matches a nonempty...
16
by: Martin Jørgensen | last post by:
Hi, Short question: Any particular reason for why I'm getting a warning here: (cast from function call of type int to non-matching type double) xdouble = (double)rand()/(double)RAND_MAX;
1
by: solarin | last post by:
Hi, I've developed a program under VS 6.0. I can compile it and run it, but when I try to debbug , all my breakpoints are dissabled and I can see the following messages: Loaded...
0
by: Tidane | last post by:
Visual Basic.NET Framework 2.0 I've created a program to parse out text as the program recieved it and use Regex matching to decide what should be done. My problem is that the text is matching when...
1
by: sora | last post by:
Hi, I've developed a MFC program under VS 6.0. My debugger *was* working fine and I've used it often for my project. Then, one day, the errors below appear and they prevent me from using the...
0
by: grego9 | last post by:
I have a bit of visual basic code in an excel spreadsheet that I need some help with. I am attempting to search a file called TO Cancellations2.xls for counterparty names and for each counterparty...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.