RE: [PHP-DB] SQL problem

From: Date: Sat, 01 Sep 2001 10:17:07 +0000
Subject: RE: [PHP-DB] SQL problem
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-12075@lists.php.net to get a copy of this message
That is the strange thing, there are no error messages. I simply don't get short_desc with list($image,$desc)=mysql_fetch_row($res1); $desc is empty. I will try your query. > -----Original Message----- > From: Dobromir Velev [mailto:diadomraz@rambler.bg] > Sent: petak 31. avgust 2001. 10:04 > To: Robert Vukovic; php-db@lists.php.net > Subject: Re: [PHP-DB] SQL problem > > > Hi, > Are there any error messages? > Just a guess - may be this will work > > Select $tbl_virtual.thumb1,$tbl_descriptions.short_desc FROM > $tbl_virtual left join $tbl_descriptions on > $tbl_virtual.id_property=$tbl_descriptions.id_property WHERE > $tbl_virtual.id_property=$link > > Dobromir Velev > > -----Original Message----- > From: Robert Vukovic <vrobert@EUnet.yu> > To: php-db@lists.php.net <php-db@lists.php.net> > Date: Friday, August 31, 2001 7:34 AM > Subject: RE: [PHP-DB] SQL problem > > > >> Table was created with this > >> > >> CREATE TABLE descriptions ( > >> id_property bigint(20) NOT NULL default > >> '0', > >> short_desc varchar(255) default NULL, > >> long_desc text, > >> KEY > >> id_property(id_property), > >> PRIMARY KEY (id_property), > >> UNIQUE KEY > >> id_property_2(id_property) > >> ) TYPE=MyISAM COMMENT=''; > >> > >> and this is query: > >> > >> $res1=mysql_query("SELECT > >> $tbl_virtual.thumb1,$tbl_descriptions.short_desc FROM > >> $tbl_virtual,$tbl_descriptions WHERE > $tbl_virtual.id_property=$link > >> and > >> $tbl_descriptions.id_property=$link") > >> > >> virtual is another table with picture names. > >> > >> This query work at my home but not on real site. What is a > problem. ? > >> > > > > I forgot to say that PHP is 4.04 and I am using MySQL > >

« previous php.db (#12075) next »