RE: Table name is variable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 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/



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux