By: Anonymous
Date: 2004-12-19
Time: 23:35
|
What's wrong wtih this, I'm stumped.
I'm trying to pull data comparing two tables. If Name = title then pull cid. In my template, I'd then place [b3.cid]. Name and title are in two different tables, but must equal each other to pull the cid.
$RecCnt = $TBS->MergeBlock('b3',$cnx_id,"SELECT cid FROM InstaCounter_Counter WHERE Name = titles.title",$PageSize,$PageNum,$RecCnt) ;
|
|
By: Skrol29
Date: 2004-12-20
Time: 03:59
|
Re: What's wrong wtih this, I'm stumped.
Hello,
I think that you query is not correct. It should use a JOIN part.
If you use MySQL, try you query with phpMyAdmin first.
|
By: Anonymous
Date: 2004-12-22
Time: 00:57
|
Re: What's wrong wtih this, I'm stumped.
Skrol29, thanks for the input. I figured it out after reviewing a few MySQL tutorials. Here's what I needed just in case someone else runs into something similar.
$RecCnt = $TBS->MergeBlock('b1',$cnx_id,"SELECT * FROM InstaCounter_Counter,titles WHERE InstaCounter_Counter.Name=titles.softwaretitle AND approve='Y' ORDER BY 'Hits' DESC",$PageSize,$PageNum,$RecCnt) ;
|
|
|
Posting in progress.
Please wait...
|