RE: [PHP] mysql problems [SOLVED]

2011-05-14 Thread Jasper Mulder
>[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

Re: [PHP] mysql problems [SOLVED]

2011-05-14 Thread Curtis Maurand
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

Re: Re: [PHP] mysql problems

2011-05-12 Thread Curtis Maurand
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

Re: Re: [PHP] mysql problems

2011-05-12 Thread Tim Streater
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

Re: [PHP] mysql problems

2011-05-11 Thread Sean Greenslade
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

Re: [PHP] mysql problems

2011-05-11 Thread Curtis Maurand
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

Re: [PHP] mysql problems

2011-05-11 Thread Curtis Maurand
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

Re: [PHP] mysql problems

2011-05-11 Thread Marc Guay
> 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

Re: [PHP] mysql problems

2005-03-01 Thread Rory McKinley
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

Re: [PHP] mysql problems

2005-03-01 Thread Richard Lynch
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

Re: [PHP] mysql problems, need quick help

2002-06-11 Thread Adam Voigt
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

RE: [PHP] mysql problems, need help quick

2002-06-11 Thread Jon Haworth
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

RE: [PHP] mysql problems

2002-03-12 Thread Narvaez, Teresa
"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

Re: [PHP] mysql problems

2002-03-12 Thread hugh danaher
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]>