Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Hi All,
I am a new comer in php. earlier I was involved in ASP.
Currently I am facing a problem.
I have created 2 tables as:
1.
[syntax="sql"]
CREATE TABLE dtopics (
topicId int(11) NOT NULL auto_increment,
topicName text,
dateAdded date default NULL,
PRIMARY KEY (topicId)
) TYPE=MyISAM;
Code: Select all
CREATE TABLE tcomments (
commentId int(10) unsigned NOT NULL auto_increment,
comment text,
topicId int(10) NOT NULL default '0',
postedBy varchar(100) default NULL,
postdate timestamp(14) NOT NULL,
isActive enum('True','False') default 'False',
PRIMARY KEY (commentId),
KEY postdate (postdate)
) TYPE=MyISAM;
Code: Select all
$qt="Select T.*, D.topicName from tcomments T inner join dtopics D on T.topicId=D.topicId where T.topicId=$tid AND isActive='False' Order By postDate DESC";
while($result_set=mysql_fetch_array($result1))
{
//show data
}Though I tried to run same query in MYSQL and it returned expected results.
but in php page it is not returning any thing.
Could somebody please tell me where I am making a mistake?
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]