RE: [PHP-DB] Table name is variable

From: Date: Fri, 14 Mar 2003 03:55:16 +0000
Subject: RE: [PHP-DB] Table name is variable
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-26374@lists.php.net to get a copy of this message
> I am a begginer in PHP programming and I would appreciate any help. > > My problem is the following: I need to make the name of my table a > variable. > My thought was simple: > > $imprimir = mysql_query("SELECT id, data FROM $tabela",$db); > > but it doesnt work... how should i do it? Just like that. Make sure $tabela has a value. ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/

« previous php.db (#26374) next »