I did a View->Source on the generated code and got this for the Friday Feb 28 entry:
Friday February 28th 8 AM to Noon
John
Look at the last ... line. Fix that, and your problems may go away.
- Original Message -
From: "Edward P
Eh.. probably should be:
$result = mysql_query("SELECT id FROM ma_users WHERE
user='$PHP_AUTH_USER'");
$row=mysql_fetch_row($result)
print $row['id'];
René
René Moonen wrote:
> Well if you *know* your query only returns one row or you are just
> interessed in the first row, just forget about
Well if you *know* your query only returns one row or you are just
interessed in the first row, just forget about the while construction
$result = mysql_query("SELECT id FROM ma_users WHERE user='$PHP_AUTH_USER'");
$id=mysql_fetch_row($result)
print $id;
Good luck
René
John Wulff wrote:
>Di
> From: René Moonen [mailto:[EMAIL PROTECTED]]
> Sent: Friday, July 19, 2002 11:01 AM
> $result = mysql_query("SELECT COUNT(DISTINCT IP) AS ips FROM ma_counter");
You _might_ need to add "GROUP BY ip" (without quotes) to the end of that
query.
> Disclaimer: code not tested. You might want to
hmm... seems a MySQL topic.
I suppose that your table is filled with correct data at some other
point. So what you need is a count query that returns
*one* result and not all records in that table. You do not want a
*while* loop in your PHP script, because that would show a list of
unique ips. S
> $mode = "entrance";
> if ($mode == "entrance") {
>
I suppose you added the first line ($mode = "entrance"; ) for testing
purposes during debugging, but in order for the script to work you
should now remove it, because now $mode will always have th
En réponse à Mantas Kriauciunas <[EMAIL PROTECTED]>:
Hi
You use = instead of ==
So, the first condition is always true
Regards
Julien
> Hello John,
>
> Friday, July 19, 2002, 12:25:12 AM, you wrote:
>
> JW> Any ideas on why this won't work? It will only
> include("inc/entrance.php")
> JW> It n
You probably do not have a background of C / C++ programming ;-)
assignments:single equal sign
comparison:dual equal sign
The *assignments* in your if statements are always TRUE, so it will
always execute the statements after the first *if*
So use
if ($mode == "entrance") {
and
You need == instead of = there
On Fri, 19 Jul 2002, John Wulff wrote:
> Any ideas on why this won't work? It will only include("inc/entrance.php")
> It never, no matter what the value of $mode, displays collection.php.
>
>$mode = "entrance";
>if ($mode = "entrance") {
> include(
Hello John,
Friday, July 19, 2002, 12:25:12 AM, you wrote:
JW> Any ideas on why this won't work? It will only include("inc/entrance.php")
JW> It never, no matter what the value of $mode, displays collection.php.
thinking logicaly:
JW>$mode = "entrance"; $mode is "entrance"
JW>
10 matches
Mail list logo