On Fri, Oct 28, 2011 at 06:19:56PM -0400, Daniel Brown wrote:
> On Fri, Oct 28, 2011 at 18:13, Paul Halliday wrote:
> >
> > Whats the difference between fetch_assoc and fetch_row?
> >
> > I use:
> > while ($row = mysql_fetch_row($theQuery)) {
> > ? ?doCartwheel;
> > }
> >
> > on just under 300 mil
On Fri, Oct 28, 2011 at 02:57:02PM -0700, Tommy Pham wrote:
> On Fri, Oct 28, 2011 at 9:38 AM, Jim Long wrote:
>
> > I'm running PHP 5.3.8 on FreeBSD 8.2 with MySQL 5.1.55.
> >
> >
> Jim,
>
> Installed from packages or standard port tree build? Did you do
On Fri, Oct 28, 2011 at 03:42:48PM -0400, Eric Butera wrote:
> On Fri, Oct 28, 2011 at 3:29 PM, Daniel Brown wrote:
> > On Fri, Oct 28, 2011 at 13:25, Jim Long wrote:
> >>
> >> Eric:
> >>
> >> Thanks for your reply.
> >>
> >> &
On Fri, Oct 28, 2011 at 03:24:37PM -0400, Jim Giner wrote:
> If all you want to do is count the records, why are you not letting sql do
> it for you instead of doing the while loop? That's all that script is
> doing, if that is the exact code you ran.
Hi, Jim.
Thank you for replying.
One of
On Fri, Oct 28, 2011 at 12:09:24PM -0600, George Langley wrote:
> Hi all. Am wondering if there is a best practice for looping through an
> array, when you need both the item and its position (ie. 1, 2, 3). The
> two ways I know of:
>
> // the for loop tracks the position and you get e
On Fri, Oct 28, 2011 at 01:32:32PM -0400, James wrote:
> >
> >On Fri, Oct 28, 2011 at 12:38 PM, Jim Long wrote:
> >> I'm running PHP 5.3.8 on FreeBSD 8.2 with MySQL 5.1.55.
> >>
> >> The script below is designed to be able to WHILE it's way throug
On Fri, Oct 28, 2011 at 01:21:36PM -0400, Eric Butera wrote:
> On Fri, Oct 28, 2011 at 12:38 PM, Jim Long wrote:
> > I'm running PHP 5.3.8 on FreeBSD 8.2 with MySQL 5.1.55.
> >
> > The script below is designed to be able to WHILE it's way through
> > a MySQL q
I'm running PHP 5.3.8 on FreeBSD 8.2 with MySQL 5.1.55.
The script below is designed to be able to WHILE it's way through
a MySQL query result set, and process each row.
However, it runs out of memory a little after a quarter million
rows. The schema fields total to about 200 bytes per row, so
t
uot;,","", "$value");
$numeric_array[$key] = $value; //<reset the output array
echo "comma stripped";
}
}
Thanks again for all your help,
Jim Long
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi,
Thanks to those who are helping me.
Matt,
Same result, echo's sucess, but commas are still out put in the $numeric_array.
Jim Long
Matt Wrote:
> foreach($numeric_array as $key => $value ) {
> if(strstr($value,","))
> {
> $valu
ut does not
actually remove the commas
THANKS.. any other ideas?
Jim Long
--
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
cho("comma striped");
}
}
--
It passed the test but,
I'm doing something wrong because the commas are still there.
TIA,
Jim Long
Jim Long Wrote:
> Does anyone know how to make the flag "sort_numeric" work?
> Will it work with asort?
>
> asort ($numeric_array, SORT_NU
;s ignoring everything
after a comma when it sorts.
TIA,
Jim Long
BTW: asort is the one I need as I must maintain the keys
JanetVal Wrote:
> sort() sorts by value but assigns new keys as numbers.
> asort() sorts by value, but keeps the same
Hi,
I've got to sort the $numeric_arry
This doesn't seem to work:
sort ($numeric_array, SORT_NUMERIC);
I think its sorting $key
asort ($numeric_array, SORT_NUMERIC);
sorts as a string
THANKS AGAIN IN ADVANCE,
Jim Long
JanetVal Wrote:
> Well, as long as you know exactly what yo
nal_array = array_merge($numeric_array, $na_array);
> <-- End Code -->
This works.. THANKS! HOWEVER:
I think PHP is seeing a comma, in a large number and think that it IS
NOT NUMERIC, because when I test a large number it put it in the $na_array
Do I need to add something to this cod
Using this:
while (list ($key, $val) = each ($orderd_list)) {
if ($val == 'n/a'){
$no_plan_list = array ($key => $val);// need an array here for "n/a"
}else{
$plan_list = array ($key => $val);// need an array here for numeric
vals
}
}
Thanks In Advance,
Jim Long
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
ome vals are "n/a"
asort works to sort the array as a string, however, I need to sort the
numeric vals numeric, then have the n/a's go away or be output at the
bottom of the sort.
Please be clear and gentle.. I'm not schooled in php, just a tinkerer
trying to make this mess wor
Hi,
I have an array with an html link as key and different $vars as val:
$list = array (
'http://someplace.com/";>some place' => $vendor1_total,
'http://anotherplace.com/";>another place' => $vendor2__total,
[snip] etc..
some vals are numeric and some vals are "n/a"
asort works to sort the arra
ollowing:
> Root as the mysql user and localhost as the server, unless you selected remote mysql
> connections from the web control panel.
BTW: I DID select remote mysql. Should I unselect it?
FMI (forgive my ignorance):
What connection script should I use?
Thanks So Much in Advance,
Jim Lon
Hi,
I'm having trouble passing "$the_score" to "edit_s1_php3":
// Display the scores
while ( $row = mysql_fetch_array($result) ) {
echo( "" . "" .
$row["last_name"] . " , " . $row["first_name"] . "" .
$row["s1"] . " "
. "
edit score" ."" .
$row["s2"] . "
I have a basic sort:
$orderd_list = array ("$onec_rounded_total", "$aps_rounded_total",
"$bo_rounded_total", "$cap3_rounded_total", "$cap3_rounded_total",
"$cap_rounded_total", "$cfl_rounded_total", "$ecg_rounded_total",
"$ldd_rounded_total", "$png_rounded_total", "$spr_rounded_total",
"$ist917_
Using pull down for $state.
This works great!
> $incfilename = "Calc".$state.".class.inc";
> if (file_exists($incfilename))
> include($incfilename);
> else
> echo "Please select a State.\n";
Thanks To Everyone,
j
--
http://jimlong.net/web
> I'd do something similar to thi
de class
include("CalcAR.class.inc");
}
else if ($state == "AZ") {
// include class
include("CalcAZ.class.inc");
}
else{
echo "Please select a State.\n";
}
Thank You Very Much,
Jim Long
--
http://jimlong.net/web
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
THANKS TO ERIK PRICE !
You ablility to explain php concepts in simple langauge is exactly why I
signed up for this list!
I will be deeply greatful for any other tutorials like this one on
passing imputs.
THANKS AGAIN,
Jim Long
>Erik Price wrote:
> John,
>
> It seems that you&
Hello,
Is there a searchable archive of this PHP- general subscriber list?
Thanks in Advance,
Jim Long
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
25 matches
Mail list logo