HELP: Syntax Needed

From: Date: Sun, 28 Oct 2001 19:53:42 +0000
Subject: HELP: Syntax Needed
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-72638@lists.php.net to get a copy of this message
Jokes aside, I still don't get it. $host = "localhost"; $MyAccount = "AccountName"; $MyTable = "Table1"; $MyPassword = "beep"; This works: mysql_pconnect($host,"AccountName","beep"); $news = mysql_query("SHOW TABLE STATUS FROM AccountName LIKE 'Table1'"); Why doesn;'t this? $myconnection = mysql_pconnect($host,$MyTable,$MyPassword); ... $news = mysql_query("SHOW TABLE STATUS FROM $MyAccount LIKE '$MyTable'"); I have tried variations with or without " and '. Is there a way to make this work? Or do I have to do as above every time? > >"$host" :) Your telling me to put $host in "$host"? OK: $myconnection = mysql_pconnect("$host","$MyAccount","$MyPassword"); It doesn't work?! Neither does: $myconnection = mysql_pconnect($host,$MyAccount,$MyPassword); $myconnection = mysql_pconnect('$host','$MyAccount','$MyPassword'); If I try this, $stringing just $host, it works!? mysql_pconnect($host,"AccountName","beep");

« previous php.general (#72638) next »