Re: select problem

From: Date: Wed, 15 Aug 2001 16:19:40 +0000
Subject: Re: select problem
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-62864@lists.php.net to get a copy of this message
Hi, if your script makes errors on mysql_query() try to printthe errormessages sent back by MySql: mysql_query(...) or die(mysql_error()); see: http://www.php.net/manual/en/function.mysql-error.php ----- Original Message ----- From: "Roman" <rduriancik@indprop.gov.sk> To: "Php-General" <php-general@lists.php.net> Sent: 2001. augusztus 15. 11:28 Subject: [PHP] select problem > I have mysql in redhat linux and apache 1.3.20 with module php 4.0.6 > but I have error in my select, connect to the database is ok. In apache and > mysql uder windows > working this script OK but no in linux. > What's wrong ? > > @$spojenie = mysql_connect("localhost","user","password"); > if (!$spojenie) : > echo "Chyba pri konektne na databazu !!!"; > exit; > endif; > mysql_select_db("Patenty",$spojenie); > > > > $podmienka = "Cislo_dokumentu BETWEEN 238000 AND 238023"; > $tried = "Cislo_dokumentu"; > > if ($podmienka !="") @$vysledok = mysql_query("SELECT * FROM patent WHERE > $podmienka ORDER BY $tried",$spojenie); > else @$vysledok = mysql_query("SELECT * FROM patent ORDER BY > $tried",$spojenie); > > if (!$vysledok): > echo "Error.<BR>\n"; > exit; > endif; > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#62864) next »