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 statement
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
Jim Giner wrote:
> I am outputting to a on an html page. A doesn't work, nor
> does \n, hence the
. 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" wrote in message
> news:201
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 do
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 convertin
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
/hom
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:
ht
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 funct
[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: http:/
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 su
> 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 i
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 t
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 script after 30 seconds if it doesn't
complete. This is happen
On 23/03/2011 17:46, 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
On Wed, Mar 23, 2011 at 10:46 AM, Jack wrote:
> I'm having a problem with this line of code which worked fine for years:
>
> $l_url2 = ".".$_GET[SERVER_NAME];
>
Place quotes around the key.
$l_url2 = ".".$_GET['SERVER_NAME'];
Normally PHP treats SERVER_NAME as the name of a constant. There
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
/home//modules/j
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 m
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
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
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 Gene
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:
if(!isset($_SESSI
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<$
Thanks for the pointer. Had not run across that tidbit before.
"Stuart Dallas" 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 2011
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+
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" wrote in message
> news:1300883645.5100.973.camel@webdev
Very Interesting - '\n' doesn't work, but "\n" does work.
"Steve Staples" 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 on an html page. A doesn't work,
>> nor
>> does \n, hence the
. Of course, if
it was as complete as need be to demonstrate my dilemma, as Richard has
discovered above
"Frank Arensmeier" 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 director_records
not the concern in this posting
"Richard Quadling" wrote in message
news:aanlktindqu7bzeamtcwh6y9f3m9yjxqpt-ime9ysh...@mail.gmail.com...
On 23 March 2011 07:46, Geoff Lane wrote:
> Hi Jim,
>
> On Wednesday, March 23, 2011, 1:42:18 AM, you wrote:
>
>> ok - here's the code in question.
>> $q = 'se
On Wed, 2011-03-23 at 08:28 -0400, Jim Giner wrote:
> I am outputting to a on an html page. A doesn't work, nor
> does \n, hence the
. 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
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" wro
I am outputting to a on an html page. A doesn't work, nor
does \n, hence the
. 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" wrote in message
news:20110323034621.go1...@quillandm
On 23 March 2011 07:46, 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++)
>> {
>>
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 i
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['user
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);
>
35 matches
Mail list logo