Re: [PHP] function not returning query

2009-11-25 Thread Ashley Sheridan
On Tue, 2009-11-24 at 23:27 -0800, Allen McCabe wrote: If I were to loop through my inputs, I could just exclude any problematic names, eg.: foreach ($_POST as $var = $val) { if ($var != filter.x || $var != filter.y) { $var = $val; } } Like that? On Tue, Nov 24, 2009

Re: [PHP] function not returning query

2009-11-25 Thread Philip Thompson
On Nov 25, 2009, at 4:32 AM, Ashley Sheridan wrote: On Tue, 2009-11-24 at 23:27 -0800, Allen McCabe wrote: If I were to loop through my inputs, I could just exclude any problematic names, eg.: foreach ($_POST as $var = $val) { if ($var != filter.x || $var != filter.y) { $var =

Re: [PHP] function not returning query

2009-11-24 Thread Ashley Sheridan
On Mon, 2009-11-23 at 21:53 -0800, Allen McCabe wrote: Okay, suddenly I got it to filter the results, but I still can't figure out where this part of the query is coming from, at the end of the query string in the URL, I have this filter.x=0filter.y=0. No where in my form do I have a field

Re: [PHP] function not returning query

2009-11-24 Thread Ashley Sheridan
On Tue, 2009-11-24 at 02:11 -0800, Allen McCabe wrote: I am! Will these extra query variables cause any problems or should I use standard submit inputs? Thanks Ashley! On Tue, Nov 24, 2009 at 1:10 AM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Mon,

[PHP] function not returning query

2009-11-23 Thread Allen McCabe
Hi, thanks for reading, I hope you can help: In my main file for an orders page I have the following code: if (isset($_GET['filterby'])) { $resultOrders = adminFilterQuery(); $numberOfOrders = mysql_num_rows($resultOrders); } else { $resultOrders = mysql_query(SELECT * FROM

Re: [PHP] function not returning query

2009-11-23 Thread Phpster
Likely your query failed due to an error. Try adding an or die(mysql_error()) to the end of your mysql_query statement to see what that error maybe Bastien Sent from my iPod On Nov 23, 2009, at 7:22 PM, Allen McCabe allenmcc...@gmail.com wrote: Hi, thanks for reading, I hope you can

Re: [PHP] function not returning query

2009-11-23 Thread Philip Thompson
On Nov 23, 2009, at 6:22 PM, Allen McCabe wrote: Hi, thanks for reading, I hope you can help: In my main file for an orders page I have the following code: if (isset($_GET['filterby'])) { $resultOrders = adminFilterQuery(); $numberOfOrders = mysql_num_rows($resultOrders); } else

Re: [PHP] function not returning query

2009-11-23 Thread Allen McCabe
Okay, suddenly I got it to filter the results, but I still can't figure out where this part of the query is coming from, at the end of the query string in the URL, I have this filter.x=0filter.y=0. No where in my form do I have a field named filter.x or filter.y. I DO however, have 3 forms (I