php-general Digest 23 Mar 2011 12:20:44 - Issue 7239
Topics (messages 311990 through 311998):
Re: echo?
311990 by: Al
311991 by: Jim Giner
311992 by: Tamara Temple
311993 by: Jim Giner
311994 by: Paul M Foster
311995 by: Geoff Lane
Hi Jim,
On Wednesday, March 23, 2011, 1:42:18 AM, you wrote:
ok - here's the code in question.
$q = 'select * from director_records ';
$qrslt = mysql_query($q);
$rows = mysql_num_rows($qrslt);
for ($i=0; $i$rows; $i++)
{
$j = $i+1;
$row = mysql_fetch_array($qrslt);
echo
23 mar 2011 kl. 02.42 skrev Jim Giner:
ok - here's the code in question.
$q = 'select * from director_records ';
$qrslt = mysql_query($q);
$rows = mysql_num_rows($qrslt);
for ($i=0; $i$rows; $i++)
{
$j = $i+1;
$row = mysql_fetch_array($qrslt);
echo $j.'-'.$row['userid'];
Hi
after of the for, u can use
it shoulds back the class of variable, by example its is string its is
int etc
for ($i=0;$i$rows;$i++)
echo $i.' '.$row['itemname'];
echo gettype($i);
Can be that you must define before the class of this variable, because, the
system is thinking this is a
On 23 March 2011 07:46, Geoff Lane ge...@gjctech.co.uk wrote:
Hi Jim,
On Wednesday, March 23, 2011, 1:42:18 AM, you wrote:
ok - here's the code in question.
$q = 'select * from director_records ';
$qrslt = mysql_query($q);
$rows = mysql_num_rows($qrslt);
for ($i=0; $i$rows; $i++)
{
I am outputting to a textarea on an html page. A br doesn't work, nor
does \n, hence the #13#10. Of course, if I don't need the then I've
just saved two keystrokes. :) Also - I do believe I tried ($i+1) and that
didn't work either.
Paul M Foster pa...@quillandmouse.com wrote in message
By george - I think you've solved it!
As for my coding choice - that's the beauty of programming - everybody has a
way of solving a problem/creating a solution. Unless you are concerned with
performance(which in this particular case is not a concern), there is no
'wrong way'.
Geoff Lane
On Wed, 2011-03-23 at 08:28 -0400, Jim Giner wrote:
I am outputting to a textarea on an html page. A br doesn't work, nor
does \n, hence the #13#10. Of course, if I don't need the then I've
just saved two keystrokes. :) Also - I do believe I tried ($i+1) and that
didn't work either.
not the concern in this posting
Richard Quadling rquadl...@gmail.com wrote in message
news:aanlktindqu7bzeamtcwh6y9f3m9yjxqpt-ime9ysh...@mail.gmail.com...
On 23 March 2011 07:46, Geoff Lane ge...@gjctech.co.uk wrote:
Hi Jim,
On Wednesday, March 23, 2011, 1:42:18 AM, you wrote:
ok - here's
it was as complete as need be to demonstrate my dilemma, as Richard has
discovered above
Frank Arensmeier farensme...@gmail.com wrote in message
news:7cfb015a-c530-4712-9ebc-fbdf5b0ed...@gmail.com...
23 mar 2011 kl. 02.42 skrev Jim Giner:
ok - here's the code in question.
$q = 'select * from
Very Interesting - '\n' doesn't work, but \n does work.
Steve Staples sstap...@mnsi.net wrote in message
news:1300883645.5100.973.camel@webdev01...
On Wed, 2011-03-23 at 08:28 -0400, Jim Giner wrote:
I am outputting to a textarea on an html page. A br doesn't work,
nor
does \n, hence the
http://php.net/manual/en/language.types.string.php
-Stuart
--
Stuart Dallas
3ft9 Ltd
http://3ft9.com/
On Wednesday, 23 March 2011 at 12:39, Jim Giner wrote:
Very Interesting - '\n' doesn't work, but \n does work.
Steve Staples sstap...@mnsi.net wrote in message
As Richard proved my problem was caused by my use of the archaic cr/lf
character pair. Once I found the correct syntax for using \n my output of
the loop counter worked.
thanks for all the suggestions. My first experience on a PHP newsgroup and
it was a postiive one. I've spent the last 12+
Thanks for the pointer. Had not run across that tidbit before.
Stuart Dallas stu...@3ft9.com wrote in message
news:b43dfd4fa2ac4489aaf538d1bf7a8...@3ft9.com...
http://php.net/manual/en/language.types.string.php
-Stuart
--
Stuart Dallas
3ft9 Ltd
http://3ft9.com/
On Wednesday, 23 March
On Wed, Mar 23, 2011 at 07:46:03AM +, Geoff Lane wrote:
Hi Jim,
On Wednesday, March 23, 2011, 1:42:18 AM, you wrote:
ok - here's the code in question.
$q = 'select * from director_records ';
$qrslt = mysql_query($q);
$rows = mysql_num_rows($qrslt);
for ($i=0; $i$rows; $i++)
I am not sure I am doing this right,
I have login.php which does:
$ua = $_SERVER['HTTP_USER_AGENT'];
$ua .= rand(0,4200);
$ua = md5($ua);
and upon successful auth, I push them to the main program:
header (Location: squert.php?id=$ua);
at the beginning of squert.php I have:
I am in need of an upload progress meter. I've seen plenty of tutorials =
on-line requiring installing modules, hooks, patches, etc. However, my =
Wordpress install accomplished this without me having to make any =
modifications to my PHP install. So, how is it done?
Thanks!
Floyd
--
PHP
On Wed, 2011-03-23 at 09:59 -0400, Floyd Resler wrote:
I am in need of an upload progress meter. I've seen plenty of tutorials =
on-line requiring installing modules, hooks, patches, etc. However, my =
Wordpress install accomplished this without me having to make any =
modifications to my
On Mar 23, 2011, at 10:10 AM, Steve Staples wrote:
On Wed, 2011-03-23 at 09:59 -0400, Floyd Resler wrote:
I am in need of an upload progress meter. I've seen plenty of tutorials =
on-line requiring installing modules, hooks, patches, etc. However, my =
Wordpress install accomplished this
Hi,
I'm developing a web application using moodle, and I'm trying to create a
PHP object tree to be used in $SESSION. Objects are defined as
class foo {
private $module_name;
private $sub_modules = array();
}
I have a main module (object) and I use the following function to add
serialized sub
Hello All,
I'm having a problem with this line of code which worked fine for years:
$l_url2 = ..$_GET[SERVER_NAME];
Here is the error:
[Wed Mar 23 13:33:49 2011] [error] [client 16.139.201.61] PHP Notice: Use
of undefined constant SERVER_NAME - assumed 'SERVER_NAME' in
On Wed, 2011-03-23 at 15:34 -0400, Curtis Maurand wrote:
I've been having a problem when querying a database with php and the mysql
library the offending code follows. If the result is an empty
set, PHP hangs. I've had to add code to the script to set up a max
execution time to kill the
The only obvious thing that I can see is that you're checking
if the
number of results is greater than a string, not a number.
I believe PHP
automagically converts it into an integer for the
comparison, but try
changing it to an actual integer and seeing
if that resolves it.
There is one
Anyone know of a working Javascript newsgroup? I googled and tried adding
several to my OE newsgroups but couldn't find the servers.
comp.lang.javascript
pl.lang.
mozilla..
All of these (can't remember their names now) came up with the same error
message.
As part of learning php, I
[snip]
Anyone know of a working Javascript newsgroup? I googled and tried
adding
several to my OE newsgroups but couldn't find the servers.
[/snip]
He jQuery forum also answers JavaScript questions; forum.jquery.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
Daniele Capuano wrote:
Hi,
I'm developing a web application using moodle, and I'm trying to create a
PHP object tree to be used in $SESSION. Objects are defined as
class foo {
private $module_name;
private $sub_modules = array();
}
I have a main module (object) and I use the following
At 04:20 PM 3/23/2011, Jim Giner wrote:
Anyone know of a working Javascript newsgroup? I googled and tried adding
several to my OE newsgroups but couldn't find the servers.
I frequent an on-line PHP forum at phpfreaks.com. There is a
Javascript section there that seems to be quite active:
Jack wrote:
Hello All,
I'm having a problem with this line of code which worked fine for years:
$l_url2 = ..$_GET[SERVER_NAME];
Here is the error:
[Wed Mar 23 13:33:49 2011] [error] [client 16.139.201.61] PHP Notice: Use
of undefined constant SERVER_NAME - assumed 'SERVER_NAME' in
Let's say I do a query:
$result = mysql_query(select * from tablename);
Is there some way I can manually update the contents of certain columns/records
in $result? I don't want to actually update MySQL, just the results that I'm
holding in memory for this script. Can I do it without converting
I should have said modify the contents of a MySQL resource.
On Mar 23, 2011, at 5:06 PM, Brian Dunning wrote:
Let's say I do a query:
$result = mysql_query(select * from tablename);
Is there some way I can manually update the contents of certain
columns/records in $result? I don't want
Jim Giner wrote:
I am outputting to a textarea on an html page. A br doesn't work, nor
does \n, hence the #13#10. Of course, if I don't need the then I've
just saved two keystrokes. :) Also - I do believe I tried ($i+1) and
that didn't work either.
Paul M Foster
On Wed, Mar 23, 2011 at 05:12:00PM -0700, Brian Dunning wrote:
I should have said modify the contents of a MySQL resource.
On Mar 23, 2011, at 5:06 PM, Brian Dunning wrote:
Let's say I do a query:
$result = mysql_query(select * from tablename);
Is there some way I can manually
Depends on where you want to manipulate.
In mysql you can
$query = 'select first_name as FNAME from tablename';
In this result you changed the column name from first_name to FNAME for the
result only.
In this example we can change the data returned in a particular field by
using an if
33 matches
Mail list logo