>[SNIP]
> added and else clause.
> while ($_parent != 0)
> {
> if
> ($num_rows > 0)
>{
>
> perform some action
>}
>else
>{
> $_parent =
> "0";
>}
> }
>
> and that solved the
> problem.
>
> Thank you, everyone for your help.
>
> Curtis
A small remark:
I think it is good
Sean Greenslade wrote:
>>
>
> [MASSIVE
SNIP]
>
> Well, from what I saw while wading through your
code, you allow
> unsanitized
> variables to be
concatenated to your queries. Big no-no! For ANY
>
client-generated variable, always sanitize with
mysql_real_escape_string.
> In
> fact, sanitize al
Tim Streater wrote:
> On 11 May 2011 at 19:25, Curtis
Maurand wrote:
>
>>
$_cartTotal="$0.00";
>
> Surely that should
be:
>
> $_cartTotal = "0.00";
Good
pickup. I missed that. I didn't write the code, I'm just
trying to figure out what's going on.
Thanks, I'll look at
that. --C
On 11 May 2011 at 19:25, Curtis Maurand wrote:
> $_cartTotal="$0.00";
Surely that should be:
$_cartTotal = "0.00";
tim
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Wed, May 11, 2011 at 2:25 PM, Curtis Maurand wrote:
>
>
> Marc Guay wrote:
> >> Does anyone have any ideas?
> >
> > Sounds like it's getting caught in a loop. Post the whole script
> for
> > best results.
> >
> It looks like the site is
> under attack, because I keep seeing the query, "SELECT
Marc Guay wrote:
>> Does anyone have any ideas?
>
> Sounds like it's getting caught in a loop. Post the whole script
for
> best results.
>
It looks like the site is
under attack, because I keep seeing the query, "SELECT catagory_parent FROM
t_catagories where catagory_ID=" .
$_currentCat"
wh
Marc Guay wrote:
>> Does anyone have any ideas?
>
> Sounds like it's getting caught in a loop. Post the whole script
for
> best results.
>
It looks like the site is
under attack, because I keep seeing the query, "SELECT catagory_parent FROM
t_catagories where catagory_ID=" .
$_currentCat"
wh
> Does anyone have any ideas?
Sounds like it's getting caught in a loop. Post the whole script for
best results.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Jed R. Brubaker wrote:
Hi all -
I could use a lead on a problem. I just don't know where to start.
I have a PHP script that populates a database table. No big deal. It creates
mailing labels. However, a weird things keeps happening - every once in a
while, a query is run twice. It is the same que
Jed R. Brubaker wrote:
> I could use a lead on a problem. I just don't know where to start.
>
> I have a PHP script that populates a database table. No big deal. It
> creates
> mailing labels. However, a weird things keeps happening - every once in a
> while, a query is run twice. It is the same qu
Primary Key's, by nature, are designed to always be uniqiue, which
means that even if you delete row 6, the next row you insert will be
10 because there is no id 10. If you simply need to get the list of
items in a query, in the order they were inserted, I would suggest using
something like: SELEC
Hi Hawk,
(snip auto-incrementing PKs)
> is there somewhere the "next" number is located ?
No. Why would you care, anyway? The thing about PKs is that they have to be
unique, not sequential.
If you're *really* bothered by it, you'll have to dump the contents of the
table to a file, drop the tab
"Unable to connect to SQL server: ". mysql_error());
-Teresa
-Original Message-
From: hugh danaher [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 12, 2002 8:27 PM
To: Maarten Weyn; php
Subject: Re: [PHP] mysql problems
Maarten,
Perhaps "table" isn't the name of the
Maarten,
Perhaps "table" isn't the name of the table you want.
If mysql can't find the table (in line 13?), your $result variable is empty
and this causes (line 17?) to fail also.
Hope this helps,
Hugh
- Original Message -
From: "Maarten Weyn" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
14 matches
Mail list logo