On Mon, 30 Oct 2006 12:28:29 +0100, Robin Vickery wrote:
On 30/10/06, Ivo F.A.C. Fokkema [EMAIL PROTECTED] wrote:
On Sun, 29 Oct 2006 23:40:47 -0600, Richard Lynch wrote:
On Fri, October 27, 2006 4:53 pm, Børge Holen wrote:
On Friday 27 October 2006 19:34, Richard Lynch wrote:
And the
# [EMAIL PROTECTED] / 2006-10-27 20:14:58 +0200:
And the header(Location: ...) requires a full URL.
Why?
HTTP protocol specification[1] says:
14.30 Location
The Location response-header field is used to redirect the recipient
to a location other than the Request-URI for completion of
On 30/10/06, Robert Cummings [EMAIL PROTECTED] wrote:
On Mon, 2006-10-30 at 12:28 +0100, Robin Vickery wrote:
On 30/10/06, Ivo F.A.C. Fokkema [EMAIL PROTECTED] wrote:
On Sun, 29 Oct 2006 23:40:47 -0600, Richard Lynch wrote:
On Fri, October 27, 2006 4:53 pm, Børge Holen wrote:
On
On Tue, October 31, 2006 4:58 am, Robin Vickery wrote:
On 30/10/06, Robert Cummings [EMAIL PROTECTED] wrote:
On Mon, 2006-10-30 at 12:28 +0100, Robin Vickery wrote:
On 30/10/06, Ivo F.A.C. Fokkema [EMAIL PROTECTED] wrote:
On Sun, 29 Oct 2006 23:40:47 -0600, Richard Lynch wrote:
On
On Tue, 2006-10-31 at 11:58 +0100, Robin Vickery wrote:
On 30/10/06, Robert Cummings [EMAIL PROTECTED] wrote:
On Mon, 2006-10-30 at 12:28 +0100, Robin Vickery wrote:
On 30/10/06, Ivo F.A.C. Fokkema [EMAIL PROTECTED] wrote:
On Sun, 29 Oct 2006 23:40:47 -0600, Richard Lynch wrote:
On Sun, 29 Oct 2006 23:40:47 -0600, Richard Lynch wrote:
On Fri, October 27, 2006 4:53 pm, Børge Holen wrote:
On Friday 27 October 2006 19:34, Richard Lynch wrote:
And the header(Location: ...) requires a full URL.
No it doesn't. but he's missing an ' at first glance
Yes, it does:
On 30/10/06, Ivo F.A.C. Fokkema [EMAIL PROTECTED] wrote:
On Sun, 29 Oct 2006 23:40:47 -0600, Richard Lynch wrote:
On Fri, October 27, 2006 4:53 pm, Børge Holen wrote:
On Friday 27 October 2006 19:34, Richard Lynch wrote:
And the header(Location: ...) requires a full URL.
No it doesn't. but
On Mon, 2006-10-30 at 12:28 +0100, Robin Vickery wrote:
On 30/10/06, Ivo F.A.C. Fokkema [EMAIL PROTECTED] wrote:
On Sun, 29 Oct 2006 23:40:47 -0600, Richard Lynch wrote:
On Fri, October 27, 2006 4:53 pm, Børge Holen wrote:
On Friday 27 October 2006 19:34, Richard Lynch wrote:
And the
On Fri, October 27, 2006 12:14 pm, [EMAIL PROTECTED] wrote:
And the header(Location: ...) requires a full URL.
Why?
Because the docs say so?
Because some user agents will not do what you want them to if you don't?
--
Some people have a gift link here.
Know what I want?
I want you to buy a CD
On Fri, October 27, 2006 4:53 pm, Børge Holen wrote:
On Friday 27 October 2006 19:34, Richard Lynch wrote:
And the header(Location: ...) requires a full URL.
No it doesn't. but he's missing an ' at first glance
Yes, it does:
http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.30
- Original Message -
From: Paul Novitski [EMAIL PROTECTED]
While we're talking about optimization, I'd want to check to make sure
COUNT(*) didn't ask MySQL to generate a throw-away recordset consisting of
all fields. I wonder if it would be more machine-efficient to use
Your idea to use 'COUNT(Username)' is just about the ONLY part of that
script that you are doing correctly...
:-)
Start reading here:
http://phpsec.org/
And the header(Location: ...) requires a full URL.
And you should have better error-checking, probably.
[Though maybe you have a custom error
Your idea to use 'COUNT(Username)' is just about the ONLY part of that
script that you are doing correctly...
:-)
:D
And the header(Location: ...) requires a full URL.
Why?
And you should have better error-checking, probably.
[Though maybe you have a custom error handler not apparent]
On Friday 27 October 2006 19:34, Richard Lynch wrote:
Your idea to use 'COUNT(Username)' is just about the ONLY part of that
script that you are doing correctly...
:-)
Start reading here:
http://phpsec.org/
And the header(Location: ...) requires a full URL.
No it doesn't. but he's
$query = mysql_query(
SELECT COUNT(*) as NoOfRecords
FROM customers
WHERE last_name = 'Smith');
$result = mysql_result($query, 0);
WOW! That was fast!
:D
Thanks Dave!
-afan
$query = mysql_query(
SELECT COUNT(*) as NoOfRecords
FROM customers
WHERE last_name = 'Smith');
$result = mysql_result($query, 0);
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe,
Hm. There is a little problem - this doesn't work.
Warning: mysql_result(): supplied argument is not a valid MySQL result
resource in /var/www/html/xxx/tests/count.php on line 28
?
$query = mysql_query(
SELECT COUNT(*) as NoOfRecords
FROM customers
At 10/26/2006 10:38 AM, [EMAIL PROTECTED] wrote:
what would be better solution to count records in table (e.g., how many
customers have last name 'Smith'):
$query = mysql_query(
SELECT COUNT(*) as NoOfRecords
FROM customers
WHERE last_name =
Sorry, my bad! It works jsut fine. I did misstake.
:)
$query = mysql_query(
SELECT COUNT(*) as NoOfRecords
FROM customers
WHERE last_name = 'Smith');
$result = mysql_result($query, 0);
--
PHP General Mailing List (http://www.php.net/)
On Thu, October 26, 2006 12:57 pm, Paul Novitski wrote:
$query = mysql_query(
SELECT COUNT(*) as NoOfRecords
FROM customers
WHERE last_name = 'Smith');
$result = mysql_fetch_array($query);
$NoOfRecords = $result['NoOfRecords'];
This would be
Would it be ok to use the same code to check if customer is loged in?
$query = mysql_query(
SELECT COUNT(Username) as NoOfRecords
FROM customers
WHERE Username = '$Username' AND Password = '$Password');
if (mysql_result($query, 0) == 0)
{
echo
Why would you want to do that? Think about what you're trying to do. In the
first case you want a COUNT of records in the database, in the second you
just want to see if the user/password combination or whatever exist, so just
use a normal SELECT query, no need to use the wrong tool for the
Would it be ok to use the same code to check if customer is loged in?
$query = mysql_query(
SELECT COUNT(Username) as NoOfRecords
FROM customers
WHERE Username = '$Username' AND Password = '$Password');
if (mysql_result($query, 0) == 0)
{
At 10/26/2006 11:16 AM, [EMAIL PROTECTED] wrote:
Would it be ok to use the same code to check if customer is loged in?
$query = mysql_query(
SELECT COUNT(Username) as NoOfRecords
FROM customers
WHERE Username = '$Username' AND Password =
Would it be ok to use the same code to check if customer is loged in?
$query = mysql_query(
SELECT COUNT(Username) as NoOfRecords
FROM customers
WHERE Username = '$Username' AND Password =
'$Password');
if (mysql_result($query, 0) == 0)
I just
25 matches
Mail list logo