FW: [PHP-DB] theme header query
| From: | Rick Emery | Date: | Tue, 22 Jan 2002 20:17:57 +0000 |
| Subject: | FW: [PHP-DB] theme header query | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-16062@lists.php.net to get a copy of this message | ||
I agree, the code is easier to read if each instruction is placed on a
separate line (See below)
Anyway, I notice that your first statement appears to be a fragment of a
string assignment- please post the entire line. Your last line appears to
have the same problems. Please re-post your message with more code
included.
Second, do not use $numartist as both an array value and a result code. Use
two different variable names. There might be your problem.
-----Original Message-----
From: DL Neil [mailto:PHPml@DandE.HomeChoice.co.uk]
Sent: Monday, January 21, 2002 1:44 PM
To: Barry Rumsey; php-db@lists.php.net
Subject: Re: [PHP-DB] theme header query
By what do you mean code should be readable ?
=look at the code you've quoted below. Is it easy to read - can you even
easily distinguish where one
instruction ends and another begins?
=does it work now?
=what does the .cx TLD have to do with Kiwi Xtra?
=dn
-------Original Message-------
From: DL Neil
Date: Tuesday, 22 January 2002 8:09:02 a.
To: Barry Rumsey;
Subject: Re: [PHP-DB] theme header query
Tables should be opened and closed
- and (please) code should be readable!
=dn
----- Original Message -----
From: Barry Rumsey
To: php-db@lists.php.net
Sent: 21 January 2002 17:54
Subject: [PHP-DB] theme header query
I'm trying to add the following code to atheme:
."<td class=topmenu width='73' height='19'
bgcolor='#ffffff'>\n"."$sqlhostname = "localhost";
$login = "xxxx";
$password = "xxxx";
$base = "xplyrics";
$db_connect =mysql_connect($sqlhostname,$login,$password);
$base_selection = mysql_select_db($base,$db_connect);
$query ="SELECT COUNT(*) FROM xp_topics WHERE artist='artist' ORDER BY
topicid DESC LIMIT 1";
$numartist = mysql_query($query) or die("Select Failed!");
$numartist = mysql_fetch_array($numartist);
<b>Total Artists:</b>
$numartist[0]<br>;
</td>\n"
But when I try and load that page it comes back blank. Am I missing
something or it just wont work.
____________________________________________________
IncrediMail - Email has finally evolved - Click Here
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
For additional commands, e-mail: php-db-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net