[PHP] Re: Newbie form question

2013-06-21 Thread Jim Giner
On 6/21/2013 10:09 AM, Karl-Arne Gjersøyen wrote: Hello. I have an application that generete HTML5 form in PHP. The form is written in a while loop and therefore the form field has exact same name for every row in the loop. And that is the problem. Because when my PHP document shall handle submi

[PHP] Re: Newbie is trying to set up OOP With PHP and MySQL or MySQLi database class (using CRUD)

2013-02-15 Thread David Robley
dealTek wrote: > > Thanks for all the help folks, > > > PHP-light-PDO-Class > > ok well I found this... > > https://github.com/poplax/PHP-light-PDO-Class > > But it does not seem to recognize the port - I put the port as 8889 but > keeps saying can't connect port 3306 > > Warning: PDO::__co

[PHP] Re: Newbie is trying to set up OOP With PHP and MySQL or MySQLi database class (using CRUD)

2013-02-15 Thread dealTek
Thanks for all the help folks, PHP-light-PDO-Class ok well I found this... https://github.com/poplax/PHP-light-PDO-Class But it does not seem to recognize the port - I put the port as 8889 but keeps saying can't connect port 3306 Warning: PDO::__construct() [pdo.--construct]: [2002] Connect

Re: [PHP] Re: Newbie is trying to set up OOP With PHP and MySQL or MySQLi database class (using CRUD)

2013-02-14 Thread Haluk Karamete
Also worth checking http://justinvincent.com/ezsql Which is the class behind the WordPress' wpdb class. This is a great read too -> http://www.devarticles.com/c/a/MySQL/PHP-and-Databases-for-the-Lazy-Sod/ On Thu, Feb 14, 2013 at 10:30 AM, dealTek wrote: > > > On Feb 14, 2013, at 9:49 AM, dealTek

[PHP] Re: Newbie is trying to set up OOP With PHP and MySQL or MySQLi database class (using CRUD)

2013-02-14 Thread dealTek
On Feb 14, 2013, at 9:49 AM, dealTek wrote: > Hi everybody, > > Newbie is trying to set up OOP With PHP and MySQL or MySQLi database class > (using CRUD) > > Simple story: creating this class database by myself is way over my head. So > it be best for me to find something on the Internet th

[PHP] Re: newbie date time question

2011-06-22 Thread David Nicholls
On 23/06/11 10:04 AM, Shawn McKenzie wrote: On 06/22/2011 06:54 PM, David Nicholls wrote: I'm late to the party, but strtotime works great, though you need to give it what it expects: $ts = strtotime(str_replace('/', '-', $date)); Thanks, Shawn, that's a bit more elegant! I'll give it a go.

[PHP] Re: newbie date time question

2011-06-22 Thread Shawn McKenzie
On 06/22/2011 06:54 PM, David Nicholls wrote: >> I'm late to the party, but strtotime works great, though you need to >> give it what it expects: >> >> $ts = strtotime(str_replace('/', '-', $date)); >> > > Thanks, Shawn, that's a bit more elegant! I'll give it a go. I didn't > know how to do the

[PHP] Re: newbie date time question

2011-06-22 Thread David Nicholls
On 23/06/11 1:35 AM, Shawn McKenzie wrote: On 06/22/2011 09:05 AM, David Nicholls wrote: I'm trying to convert a date and time string using strtotime() The date and time strings are the first entry in each line in a csv file in the form: 22/06/2011 9:47:20 PM, data1, data2,... I've been tryin

[PHP] Re: newbie date time question

2011-06-22 Thread Shawn McKenzie
On 06/22/2011 09:05 AM, David Nicholls wrote: > I'm trying to convert a date and time string using strtotime() > > The date and time strings are the first entry in each line in a csv file > in the form: > > 22/06/2011 9:47:20 PM, data1, data2,... > > I've been trying to use the following approac

[PHP] Re: Newbie Question about Conditionals

2010-03-31 Thread Shawn McKenzie
Matty Sarro wrote: > Hey all! > This is probably my second post on the list, so please be gentle. Right now > I am running through the "Heads First PHP and MySQL" book from O'Reilly. > It's been quite enjoyable so far, but I have some questions about some of > the code they're using in one of the c

[PHP] RE: Newbie: can't access a return value.

2009-08-01 Thread MEM
Solved. Forget to assigning the return value of the method to anything. :S Sorry. Márcio > -Original Message- > From: MEM [mailto:tal...@gmail.com] > Sent: sábado, 1 de Agosto de 2009 17:13 > To: 'php-general@lists.php.net' > Subject: Newbie: can't access a return value. > > Hi all, > >

Re: [PHP] Re: newbie question - php parsing

2009-07-23 Thread Sebastiano Pomata
Thanks, it's now much more clear. I thought that html parts outside php tags were just dumped to output, no matter of if-else statements and other conditions. I was *definitely* wrong 2009/7/23 Peter Ford : > In response to Sebastiano: > > There would be not much point in using something like PHP

[PHP] Re: newbie question - php parsing

2009-07-23 Thread Peter Ford
João Cândido de Souza Neto wrote: > You made a mistake in your code: > > > > must be: > > > Not necessarily: what if you have function the_title() { echo "Title"; } for example... In response to Sebastiano: There would be not much point in using something like PHP if it ignore

[PHP] Re: newbie question - php parsing

2009-07-22 Thread Shawn McKenzie
João Cândido de Souza Neto wrote: > You made a mistake in your code: > > > > must be: > > > I haven't used worpress in a long time, but the the_title() function might echo the title unless you pass the FALSE parameter, in which case it just returns it. -- Thanks! -Shawn http://www.spidea

Re: [PHP] Re: newbie question - php parsing

2009-07-22 Thread Martin Scotta
This is how I'd write this snippet ', $title, ''; } ?> On Wed, Jul 22, 2009 at 6:31 PM, Lenin wrote: > Ted Turner > - > "Sports is like a war without the killing." > > 2009/7/23 Shane Hill > > > 2009/7/22 João Cândido

Re: [PHP] Re: newbie question - php parsing

2009-07-22 Thread Lenin
Ted Turner - "Sports is like a war without the killing." 2009/7/23 Shane Hill > 2009/7/22 João Cândido de Souza Neto > > > You made a mistake in your code: > > > > > > > > must be: > > > > > > > Short tag and not recommended

Re: [PHP] Re: newbie question - php parsing

2009-07-22 Thread Shane Hill
2009/7/22 João Cândido de Souza Neto > You made a mistake in your code: > > > > must be: > > also works. -Shane > > > -- > João Cândido de Souza Neto > SIENS SOLUÇÕES EM GESTÃO DE NEGÓCIOS > Fone: (0XX41) 3033-3636 - JS > www.siens.com.br > > "Sebastiano Pomata" escreveu na men

[PHP] Re: newbie question - php parsing

2009-07-22 Thread Jo�o C�ndido de Souza Neto
You made a mistake in your code: must be: -- João Cândido de Souza Neto SIENS SOLUÇÕES EM GESTÃO DE NEGÓCIOS Fone: (0XX41) 3033-3636 - JS www.siens.com.br "Sebastiano Pomata" escreveu na mensagem news:70fe20d60907221355m3fa49a75ua053d2f1b9aca...@mail.gmail.com... > Hi all, > > A lit

RE: [PHP] Re: Newbie: Composition by Association - Pagination Class general question.

2009-07-22 Thread MEM
Thanks a lot Tony. Unfortunately for me, I'm seeing myself in no conditions for properly learning a framework. I want to learn PHP and a framework bring so many concepts at once, that I found extremely complex and time consuming do dig in, at once, right now. Since I have no more than a few months

Re: [PHP] Re: Newbie: Composition by Association - Pagination Class general question.

2009-07-22 Thread Tony Marston
""MEM"" wrote in message news:000201ca0a9f$ca3fb110$5ebf13...@com... > > > As for (1) even in my pre-OO days I was used to using a single > > > generic DAO for all database access. The only time that more > > > than one DAO existed was for a different DBMS engine. This > > > is why I have one DA

RE: [PHP] Re: Newbie: Composition by Association - Pagination Class general question.

2009-07-22 Thread MEM
> > > As for (1) even in my pre-OO days I was used to using a single > > > generic DAO for all database access. The only time that more > > > than one DAO existed was for a different DBMS engine. This > > > is why I have one DAO class for MySQL, one for PostgreSQL > > > and another for Oracle. If y

Re: [PHP] Re: Newbie: Composition by Association - PaginationClass general question.

2009-07-19 Thread Tony Marston
"Paul M Foster" wrote in message news:20090719220923.gv14...@quillandmouse.com... > On Sun, Jul 19, 2009 at 03:56:43PM +0100, Tony Marston wrote: > >> Two things strike me as wrong with your thinking: >> >> (1) The idea that you have a separate DAO for each entity instead of a >> single generic

Re: [PHP] Re: Newbie: Composition by Association - Pagination Class general question.

2009-07-19 Thread Paul M Foster
On Sun, Jul 19, 2009 at 03:56:43PM +0100, Tony Marston wrote: > Two things strike me as wrong with your thinking: > > (1) The idea that you have a separate DAO for each entity instead of a > single generic DAO which can act for any entity in the system. > (2) The idea that pagination requires its

RE: [PHP] Re: Newbie: Composition by Association - Pagination Class general question.

2009-07-19 Thread MEM
> Why not? Why can't you replace a call to a mysqli function with a call > to a > PDO function? It's not just a simple replacement - I need to add bindparam, prepare, execute, placeholders and fetchObject. But I will give it a try... > > Also, I also intend to use fetchObject method instead of f

Re: [PHP] Re: Newbie: Composition by Association - Pagination Class general question.

2009-07-19 Thread Tony Marston
""MEM"" wrote in message news:002001ca0898$5d183840$1748a8...@com... > > As for (1) even in my pre-OO days I was used to using a single > > generic DAO for all database access. The only time that more > > than one DAO existed was for a different DBMS engine. This > > is why I have one DAO class

RE: [PHP] Re: Newbie: Composition by Association - Pagination Class general question.

2009-07-19 Thread MEM
> > As for (1) even in my pre-OO days I was used to using a single > generic > > DAO > > for all database access. The only time that more than one DAO existed > > was > > for a different DBMS engine. This is why I have one DAO class for > MySQL, > > one > > for PostgreSQL and another for Oracle. If

RE: [PHP] Re: Newbie: Composition by Association - Pagination Class general question.

2009-07-19 Thread MEM
> As for (1) even in my pre-OO days I was used to using a single generic > DAO > for all database access. The only time that more than one DAO existed > was > for a different DBMS engine. This is why I have one DAO class for MySQL, > one > for PostgreSQL and another for Oracle. If you are incapable

[PHP] Re: Newbie: Composition by Association - Pagination Class general question.

2009-07-19 Thread Tony Marston
Two things strike me as wrong with your thinking: (1) The idea that you have a separate DAO for each entity instead of a single generic DAO which can act for any entity in the system. (2) The idea that pagination requires its own class, and therefore needs this "is-a" and "has-a" nonsense. As f

[PHP] Re: Newbie - Setting Up Some Basic Sendmail Scripts

2009-05-05 Thread Manuel Lemos
Hello, on 05/05/2009 02:20 PM revDAVE said the following: > I'm trying to set up some basic php send mail scripts - and I'm curious of > the best way to go... > > > I checked these basics out: > > http://us.php.net/manual/en/function.mail.php > > And got this code below going, but I'll bet I n

[PHP] Re: Newbie - Setting Up Some Basic Sendmail Scripts

2009-05-05 Thread Maarten Schalekamp
i think you will need to make use of a pear package to be able to do this. pear package: http://pear.php.net/package/Mail examples: http://blog.thekimsfamily.com/archives/3 docs: http://pear.php.net/manual/en/package.mail.mail.factory.php http://pear.php.net/manual/en/package.mail.mail.send

[PHP] Re: newbie - how to receive/iterate posted arrays

2008-09-01 Thread Carlos Medina
Govinda schrieb: Hello early birds, I am going round and round the docs and list posts I saved on this topic... but I am still stumped. Kindly show me what I am missing. I want to simply send an array of vars via a post form to my receiving script. I've got simple inputs like this: value="

[PHP] Re: newbie - how to receive/iterate posted arrays

2008-09-01 Thread David Robley
Govinda wrote: > Hello early birds, > > I am going round and round the docs and list posts I saved on this > topic... but I am still stumped. > Kindly show me what I am missing. I want to simply send an array of > vars via a post form to my receiving script. > > I've got simple inputs like this

[PHP] Re: newbie Q: How to say, "if the fileNAME is equal to...", or better yet, "if the fileNAME ends with '.jpg'"?

2008-08-25 Thread Colin Guthrie
Govinda wrote: if (true == ($file=".jpg")) { Watch out for this! You're doing a test that is an assignment.. You are assigning the value ".jpg" to the variable $file. You are then comparing this to the value "true" and (due to the loose variable types) this succeeds. Altho

[PHP] Re: Newbie - is there a function similar to the sql 'like' comparison operator?

2008-05-09 Thread Colin Guthrie
revDAVE wrote: Newbie - is there a function similar to the sql 'like' comparison operator? I would like to be able to compare 2 strings: If $this ---*like or similar to*--- $that That type of thing... I strongly suggest you read up on regular expressions: http://uk.php.net/manual/en/book.reg

[PHP] Re: Newbie - is there a function similar to the sql 'like' comparisonoperator?

2008-05-08 Thread Shawn McKenzie
revDAVE wrote: Newbie - is there a function similar to the sql 'like' comparison operator? I would like to be able to compare 2 strings: If $this ---*like or similar to*--- $that That type of thing... I know of this page: http://us3.php.net/manual/sl/language.operators.comparison.php But

[PHP] Re: newbie with another HTML/navigation question

2008-04-29 Thread Peter Ford
Rod Clay wrote: I have a php script that is invoked on 2 different occasions: 1) the first to create a page with a form the user will use to input information for a new table row - this form has method=POST 2) the script is run a second time to accept the input from the completed form, add t

[PHP] Re: Newbie ' If Statement' Question

2008-03-19 Thread Dan
heredoc is probably the best way to go. There's no way you can mess up your quotes, and you don't have to worry about escaping. Altough I wonder what would happen if you put ?> in a heredoc, would it stop processing the php, thinking that it was the end of the php file, or would it just treat

[PHP] Re: Newbie ' If Statement' Question

2008-03-16 Thread Al
Here's how I'd do it. getRecordId();//Or, you can put this inside the heredoc with {} //heredoc $str= << txt; if (!empty($emp_row->getField('testfield')) print $str; else print "Non Print"; ?> [EMAIL PROTECTED] wrote: Hello Folks, I would like to be able to wrap a 'form' inside a php '

Re: [PHP] Re: Newbie asks about multi-lingual website strategies

2007-11-28 Thread Jochem Maas
Jean-Michel Philippon-Nadeau wrote: > Dear Tedd, Dear List, > > tedd wrote: >> As for being "hung-up" -- again, I'm clueless. I mistakenly thought >> that anything obtained from the browser was subject to suspicion as is >> any outside data. But apparently you can "trust" (I realize within >> cert

Re: [PHP] Re: Newbie asks about multi-lingual website strategies

2007-11-28 Thread Jochem Maas
tedd wrote: > At 3:01 PM +0100 11/28/07, Jochem Maas wrote: ... > Jochem: > > This just hasn't been my week -- everyone (long story) thinks I'm being > sarcastic when I'm not. ouch! > > The "Sorry, my bad" means "I apologize, my mistake." How can that be > taken as sarcasm? guess it's down t

Re: [PHP] Re: Newbie asks about multi-lingual website strategies

2007-11-28 Thread Jean-Michel Philippon-Nadeau
Dear Tedd, Dear List, tedd wrote: As for being "hung-up" -- again, I'm clueless. I mistakenly thought that anything obtained from the browser was subject to suspicion as is any outside data. But apparently you can "trust" (I realize within certain limits) some things provided by the browser --

[PHP] Re: Newbie asks about multi-lingual website strategies

2007-11-28 Thread Colin Guthrie
Jeff Benetti wrote: > Am I correct that if two people are logged on using two different languages > that the session var will keep track of the different users (by IP I assume) > and the server won’t mess up? Sessions are per-user and are not global (you'd need to use something like memcache or si

Re: [PHP] Re: Newbie asks about multi-lingual website strategies

2007-11-28 Thread Jochem Maas
Jeff Benetti wrote: ... > Am I correct that if two people are logged on using two different languages > that the session var will keep track of the different users (by IP I assume) > and the server won’t mess up? yes, the contents of $_SESSION are stored per user. this is tracked by way of a ses

Re: [PHP] Re: Newbie asks about multi-lingual website strategies

2007-11-28 Thread tedd
At 3:01 PM +0100 11/28/07, Jochem Maas wrote: tedd wrote: > So, sniffing the browser to determine language isn't the same as browser sniffing -- OK. there is no sniffing of the browser - merely a case of parsing the contents of the Accept-Language header if the browser sent it along with the

[PHP] Re: Newbie asks about multi-lingual website strategies

2007-11-28 Thread Colin Guthrie
tedd wrote: > At 12:56 AM +0100 11/28/07, Jochem Maas wrote: >> Colin Guthrie wrote: >>> tedd wrote: >> >> ... >> >> > >> > Sorry Tedd, but I'm not sure where the browser sniffing stuff came in. >>> IE and FF both offer a UI to input the user's preferred language, it's >>> an HTTP standard thi

[PHP] Re: Newbie asks about multi-lingual website strategies

2007-11-28 Thread Jeff Benetti
Wow! I love this group, ask and you shall receive. Thanks everyone for the comments and suggestions. The following snippet from Andrés Robinet would actually suit my current project.. define('DEFAULT_LANG_ID', 'en'); function getLanguageId() { // Allow for language id override in $

Re: [PHP] Re: Newbie asks about multi-lingual website strategies

2007-11-28 Thread Jochem Maas
tedd wrote: > At 12:56 AM +0100 11/28/07, Jochem Maas wrote: >> Colin Guthrie wrote: >>> tedd wrote: >> >> ... >> >> > >> > Sorry Tedd, but I'm not sure where the browser sniffing stuff came in. >>> IE and FF both offer a UI to input the user's preferred language, it's >>> an HTTP standard thi

Re: [PHP] Re: Newbie asks about multi-lingual website strategies

2007-11-28 Thread tedd
At 12:56 AM +0100 11/28/07, Jochem Maas wrote: Colin Guthrie wrote: tedd wrote: ... > > Sorry Tedd, but I'm not sure where the browser sniffing stuff came in. IE and FF both offer a UI to input the user's preferred language, it's an HTTP standard thing and nothign to do with user agents

Re: [PHP] Re: Newbie asks about multi-lingual website strategies

2007-11-27 Thread Jochem Maas
Colin Guthrie wrote: > tedd wrote: ... > > Sorry Tedd, but I'm not sure where the browser sniffing stuff came in. > IE and FF both offer a UI to input the user's preferred language, it's > an HTTP standard thing and nothign to do with user agents string > parsing. It uses the Accept-Language hea

[PHP] Re: Newbie asks about multi-lingual website strategies

2007-11-27 Thread Colin Guthrie
tedd wrote: > At 11:05 PM +0100 11/27/07, Jochem Maas wrote: >> tedd wrote: >> >> > If it were me, I wouldn't use any problematic browser detects schemes >>> (they don't work) or any of that high-thought stuff -- it's beyond me. >> >> whether it's beyond you or not only you can judge, but I disag

[PHP] Re: Newbie asks about multi-lingual website strategies

2007-11-27 Thread Colin Guthrie
Jochem Maas wrote: > tedd wrote: >> At 9:37 AM -0400 11/27/07, Jeff Benetti wrote: >>> Any any and all comments are welcome, it will be a learning curve no >>> matter >>> which route I take so a little advice on the best direction pros cons >>> would >>> be great. >>> >>> >>> Thanks, >>> Jeff >> Je

RE: [PHP] Re: Newbie asks about multi-lingual website strategies

2007-11-27 Thread Bastien Koert
templating the forms for each language. I would use a folder for each language. hth bastien > To: php-general@lists.php.net> From: [EMAIL PROTECTED]> Date: Tue, 27 Nov > 2007 15:18:45 +> Subject: [PHP] Re: Newbie asks about multi-lingual > website strategies> > Jeff

[PHP] Re: Newbie asks about multi-lingual website strategies

2007-11-27 Thread Colin Guthrie
Jeff Benetti wrote: > I'm a noob so keep the comments to a noob's level please. > > I am doing a website and my client wants the bulk of the text to be > bilingual (French and English). The last site I did used php and mysql so I > am getting comfortable with that technology. Typically I am usin

Re: [PHP] Re: newbie questions

2007-10-21 Thread Larry Garfield
I will bet you money that there are far better places to optimize your application than moving a single SQL insert to after the final output. On Sunday 21 October 2007, Ravi wrote: > Maybe you have a point. I will do performance testing and then decide if > I should try to optimize to that point.

Re: [PHP] Re: newbie questions

2007-10-21 Thread Greg Donald
On 10/21/07, Ravi <[EMAIL PROTECTED]> wrote: > Maybe you have a point. I will do performance testing and then decide if > I should try to optimize to that point. > > Yes the logging is just one simple insert into the database. Does your database support some form of INSERT DELAYED ? Like MySQL do

[PHP] Re: newbie questions

2007-10-21 Thread Ravi
Maybe you have a point. I will do performance testing and then decide if I should try to optimize to that point. Yes the logging is just one simple insert into the database. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: newbie questions

2007-10-21 Thread Larry Garfield
On Sunday 21 October 2007, Richard Heyes wrote: > Ravi wrote: > > Richard, unfortunately I cannot end the script. I need something like > > this: > > > > > header('Location: http://www.yahoo.com'); > > // somehow let the browser move to yahoo.com > > // now update the database to store

Re: [PHP] Re: newbie questions

2007-10-21 Thread Richard Heyes
Ravi wrote: Richard, unfortunately I cannot end the script. I need something like this: http://www.yahoo.com'); // somehow let the browser move to yahoo.com // now update the database to store some information about user exit; ?> In that case you might want to look at register_shu

Re: [PHP] Re: newbie questions

2007-10-21 Thread Ravi
Richard, unfortunately I cannot end the script. I need something like this: http://www.yahoo.com'); // somehow let the browser move to yahoo.com // now update the database to store some information about user exit; ?> Richard Heyes wrote: Ravi wrote: That was very very helpful.

Re: [PHP] Re: newbie questions

2007-10-21 Thread Richard Heyes
Ravi wrote: That was very very helpful. Thanks a ton! One more question. For every request, I am sending a redirect back to the user and the browser takes the user to another url. The problem is that the browser is not redirecting until the script finishes. Even if I do flush(), the browser

[PHP] Re: newbie questions

2007-10-21 Thread Ravi
That was very very helpful. Thanks a ton! One more question. For every request, I am sending a redirect back to the user and the browser takes the user to another url. The problem is that the browser is not redirecting until the script finishes. Even if I do flush(), the browser waits til scr

[PHP] Re: newbie questions

2007-10-21 Thread M. Sokolewicz
Ravi wrote: Guys, I am fairly new to PHP. Here are a few questions, if anybody can answer it will help me get started. Thanks I am trying to build a website and I would like to do the following in my scripts 1. I want to return response to the browser and AFTERWARDS make a log entry in to

[PHP] Re: Newbie: special characters in regex?

2007-09-25 Thread Al
Suggest using the hex or oct codes for the special characters. It will save you much heart ache. Here is a great utility http://www.dextronet.com/charprobe.php Zembower, Kevin wrote: I'm trying to modify a string so that it can be used as a Distinguished Name in an LDAP operation. Distinguish

[PHP] Re: Newbie Question - Form To Email Needed

2007-05-05 Thread itoctopus
1st page: 2nd page: $str_body = $_POST['thebody']; mail('[EMAIL PROTECTED]', 'This is the subject', $str_body); Of course you can have the email and the subject fields come also from the 1st page. Hope that helps! -- itoctopus - http://www.itoctopus.com "revDAVE" <[EMAIL PROTECTED]>

Re: [PHP] Re: newbie question about storing big5 codes into mysql-5.0.24a

2007-03-25 Thread Jochem Maas
Man-wai Chang wrote: >> queries in the command-line MySQL client. If it works there but not >> through mysqli_query() then you might have a case for asking here. > > For the 13081 chinese alphabets I tried, only 1 one failed, and it's > 0x9f54. mysqli_query() should have escaped the string for me.

[PHP] Re: newbie question about storing big5 codes into mysql-5.0.24a

2007-03-25 Thread Man-wai Chang
> queries in the command-line MySQL client. If it works there but not > through mysqli_query() then you might have a case for asking here. For the 13081 chinese alphabets I tried, only 1 one failed, and it's 0x9f54. mysqli_query() should have escaped the string for me. So ... I suppose most PHP p

Re: [PHP] Re: newbie question about storing big5 codes into mysql-5.0.24a

2007-03-25 Thread Stut
Man-wai Chang wrote: >>> create table temp ( big5 char(2) ) character set big5 collate big5_bin; >>> insert into temp ( big5 ) values ( 0x9f54 ); >>> insert into temp ( big5 ) values ( 0x9f53 ); >>> The 2nd query will report duplicated key. How should I fix the problem? >> What does this has to do

[PHP] Re: newbie question about storing big5 codes into mysql-5.0.24a

2007-03-24 Thread Man-wai Chang
>> create table temp ( big5 char(2) ) character set big5 collate big5_bin; >> insert into temp ( big5 ) values ( 0x9f54 ); >> insert into temp ( big5 ) values ( 0x9f53 ); >> The 2nd query will report duplicated key. How should I fix the problem? > What does this has to do with PHP? > First of all I

[PHP] Re: newbie question

2007-03-21 Thread itoctopus
Means you're passing the variable as reference. This means that any change in the variable inside your function will affect the variable outside your function, in other terms: if you have function myfunc(&$var){ $var = 5; } $a = 6; myfunc($a); will result in having $a=5 after the function a

[PHP] Re: newbie php tutorial question

2006-10-02 Thread zerof
srdaniel escreveu: I setup Apache 2.2.3.0 and PHP 5.1.6.6. When I run this PHP file: PHP Test Hello World'; ?> - Start here: http://www.educar.pro.br/ - zerof -- PHP General Mailing List (http://www.php.net/) To unsubscribe, v

Re: [PHP] Re: Newbie question about

2006-09-11 Thread tedd
At 5:36 PM +0100 9/11/06, Stut wrote: tedd wrote: Opinions? I would have to agree. Having watched the server CPU load while playing with this test script it would appear that the performance can be skewed a lot more by that than by the method you use for squidging out the output. As a cu

Re: [PHP] Re: Newbie question about

2006-09-11 Thread Satyam
- Original Message - From: "Stut" <[EMAIL PROTECTED]> To: "Satyam" <[EMAIL PROTECTED]> Cc: Sent: Monday, September 11, 2006 6:32 PM Subject: Re: [PHP] Re: Newbie question about Satyam wrote: I admit I'm totally surprised about the buffered res

Re: [PHP] Re: Newbie question about

2006-09-11 Thread Stut
Jon Anderson wrote: Stut wrote: How bored am I? This bored: http://dev.stut.net/phpspeed/ Server is running PHP 5.1.2 (really should upgrade that) with no caches of any sort. Just looking through the source, could you try changing the first example to put the output all on one line? It's th

Re: [PHP] Re: Newbie question about

2006-09-11 Thread Stut
tedd wrote: At 4:56 PM +0100 9/11/06, Stut wrote: How bored am I? This bored: http://dev.stut.net/phpspeed/ Server is running PHP 5.1.2 (really should upgrade that) with no caches of any sort. -Stut Which begs the question, does it make much of a difference? (not you being bored, but the

Re: [PHP] Re: Newbie question about

2006-09-11 Thread Stut
Satyam wrote: I admit I'm totally surprised about the buffered results. Nevertheless, may I sugest you add the following to the series of tests?: Using line-by-line single-quoted echowith comma separated arguments There seems to be one thing rarely anybody remembers, echo admits mu

Re: [PHP] Re: Newbie question about

2006-09-11 Thread Satyam
are the second best option. Satyam - Original Message - From: "Stut" <[EMAIL PROTECTED]> To: "Jon Anderson" <[EMAIL PROTECTED]> Cc: "Satyam" <[EMAIL PROTECTED]>; Sent: Monday, September 11, 2006 5:56 PM Subject: Re: [PHP] Re: Newbie que

Re: [PHP] Re: Newbie question about

2006-09-11 Thread tedd
At 4:56 PM +0100 9/11/06, Stut wrote: How bored am I? This bored: http://dev.stut.net/phpspeed/ Server is running PHP 5.1.2 (really should upgrade that) with no caches of any sort. -Stut Which begs the question, does it make much of a difference? (not you being bored, but the rather speed

Re: [PHP] Re: Newbie question about

2006-09-11 Thread Stut
How bored am I? This bored: http://dev.stut.net/phpspeed/ Server is running PHP 5.1.2 (really should upgrade that) with no caches of any sort. -Stut -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Newbie question about

2006-09-11 Thread Jon Anderson
Satyam wrote: for ($x=0;$x<1000;$x++) { echo ' X is ' , $x , ''; } This seems to be a hair faster. I extended the test to 1 requests (still concurrency 10) to make the test a little more reproducible: echo str,var,str did 604.65 requests a second where ?> did 599.63 requests a second. I

Re: [PHP] Re: Newbie question about

2006-09-10 Thread Satyam
- Original Message - From: "Jon Anderson" <[EMAIL PROTECTED]> To: Cc: "Al" <[EMAIL PROTECTED]> Sent: Sunday, September 10, 2006 9:16 PM Subject: Re: [PHP] Re: Newbie question about Al wrote: Structurally, there is a far better way to compile you

Re: [PHP] Re: Newbie question about

2006-09-10 Thread Jon Anderson
Al wrote: Structurally, there is a far better way to compile your html pages. This approach is easier to design and debug and it is faster since it sends one complete packet instead of one for every short tag. And, it saves using ob_start() and ob_flush(). Consider: $report= ''; $report .=

Re: [PHP] Re: Newbie question about

2006-09-10 Thread Satyam
- Original Message - From: "Al" <[EMAIL PROTECTED]> To: Sent: Sunday, September 10, 2006 5:52 PM Subject: [PHP] Re: Newbie question about Mike Borrelli wrote: Good day, While I've been using php for more than a little while now, I've never understood w

[PHP] Re: Newbie question about

2006-09-10 Thread Al
Mike Borrelli wrote: Good day, While I've been using php for more than a little while now, I've never understood why the use of the "" short tag is noted "to be avoided". Or rather, I understand that there's an option to disable it, and that's why it's noted in this way, but I don't understand

[PHP] Re: Newbie to PHP5

2005-11-22 Thread Yoyo
Danny wrote: Hi there, I´m familiar with PHP syntax, but I´ve been reading some sample scripts, in PHP5 and i´ve seen some "strange" things, like diferent ways to read a collection of rows, magic functions, wrapers, and operators like "::" and "->". I know that all is the manual, but before that

Re: [PHP] Re: Newbie Variable Question

2005-03-09 Thread Jackson Linux
Jochem and everyone, Thanks, this solved the problem. Regarding someone's much appreciated comment: [this]...allows any user to simply change the value of "r" to something more to their liking. given the reset of the code that you included in your first message, who knows what nice holes they'll f

Re: [PHP] Re: Newbie Variable Question

2005-03-09 Thread Jochem Maas
Jackson Linux wrote: On 9 Mar 2005, at 11:15, Jason Barnett wrote: Jackson Linux wrote: ... asks for cv.'1'.include.php ... And I need it to ask for cv.1.include.php How can I make a variable to fetch the literal number from the field cv.category? Not 100% certain that it will work, but try casti

Re: [PHP] Re: Newbie Variable Question

2005-03-09 Thread Jackson Linux
On 9 Mar 2005, at 11:15, Jason Barnett wrote: Jackson Linux wrote: ... asks for cv.'1'.include.php ... And I need it to ask for cv.1.include.php How can I make a variable to fetch the literal number from the field cv.category? Not 100% certain that it will work, but try casting the variable $r to

[PHP] Re: Newbie Variable Question

2005-03-09 Thread Jason Barnett
Jackson Linux wrote: ... > asks for > cv.'1'.include.php ... And I need it to ask for cv.1.include.php > > How can I make a variable to fetch the literal number from the field > cv.category? Not 100% certain that it will work, but try casting the variable $r to an integer: > > Thanks in advanc

[PHP] Re: [NEWBIE] How to allow for tags but no others?

2005-02-25 Thread Jason Barnett
The solution for this problem (doing it in the matter that you are suggesting) is certainly going to involve preg_replace(). However, this will require you to match only the tags you want to let through (which is always dangerous) and then strip out all of the rest of them. This can be very trick

[PHP] Re: [NEWBIE] Trying to combine array into one string

2005-02-15 Thread Ospinto
while ($tantoData = mysql_fetch_array($tantoResult)) { $tantoEmailArray[] = $tantoData; } now all the values are stored into an array ($tantoEmailArray). to convert an array to a string and join the elements together by a delimiter, use "implode". hence: implode(",",$tantoEmailA

Re: [PHP] Re: [NEWBIE GUIDE] For the benefit of new members

2005-01-26 Thread Jochem Maas
Jay Blanchard wrote: [snip] 4. a website/subsite & related DB to store data for phParrot, tips, etc. phparrot.net is up for grabs - I'm happy to register it (can't grace the list with ace mathematical explainations :-) but I'm happy to shell out a few bucks as a way of giving back a little) - and I

RE: [PHP] Re: [NEWBIE GUIDE] For the benefit of new members

2005-01-26 Thread Jay Blanchard
[snip] 4. a website/subsite & related DB to store data for phParrot, tips, etc. phparrot.net is up for grabs - I'm happy to register it (can't grace the list with ace mathematical explainations :-) but I'm happy to shell out a few bucks as a way of giving back a little) - and I'd just as happily t

Re: [PHP] Re: [NEWBIE GUIDE] For the benefit of new members

2005-01-26 Thread Jochem Maas
Jay Blanchard wrote: [snip] ...lots of really good stuff... [/snip] So, basically I saw 3 possible action items from this discussion... 1. phParrot development 2. Weekly CRON of NEWBIE GUIDE (once I get the e-mail portion figured out) 3. OT posts should contain a TIP or TRICK? If we did this we cou

Re: [PHP] Re: [NEWBIE GUIDE] For the benefit of new members

2005-01-26 Thread Jochem Maas
Jay Blanchard wrote: [snip] Now, perhaps, an INTERESTING project for some of us to work on would be that system: Spec: Robot subscriber to PHP-General. Reads all incoming messages. Discards anything that looks like a 'Reply:' including: Has 'Re: ' or 'Fwd: " in subject Has Message ID in-reply-t

RE: [PHP] Re: [NEWBIE GUIDE] For the benefit of new members

2005-01-26 Thread Jay Blanchard
[snip] ...lots of really good stuff... [/snip] So, basically I saw 3 possible action items from this discussion... 1. phParrot development 2. Weekly CRON of NEWBIE GUIDE (once I get the e-mail portion figured out) 3. OT posts should contain a TIP or TRICK? If we did this we could harvest them onc

RE: [PHP] Re: [NEWBIE GUIDE] For the benefit of new members

2005-01-26 Thread Jay Blanchard
[snip] I'm not going to promise any of this. If someone else is willing to donate the hardware to make this happen then contact me / the list. Of course anyone else that wants to donate coding time is more than welcome to join project ParrotHeadPoster. :) I can already imagine it now... "I'

RE: [PHP] Re: [NEWBIE GUIDE] For the benefit of new members

2005-01-26 Thread Jay Blanchard
[snip] Now, perhaps, an INTERESTING project for some of us to work on would be that system: Spec: Robot subscriber to PHP-General. Reads all incoming messages. Discards anything that looks like a 'Reply:' including: Has 'Re: ' or 'Fwd: " in subject Has Message ID in-reply-to header thingies Co

Re: [PHP] Re: [NEWBIE GUIDE] For the benefit of new members

2005-01-26 Thread Rolf Østvik
[EMAIL PROTECTED] (John Nichel) wrote in news:[EMAIL PROTECTED]: > Jay Blanchard wrote: >> [snip] >> CR> Just a thought, but would it be worth someone posting the list >> CR> once a week to catch new users as they sign up? >> >> Isn't it posted once a month as it is? >> [/snip] >> >> It used to

Re: Re[2]: [PHP] Re: [NEWBIE GUIDE] For the benefit of new members

2005-01-25 Thread Curt Zirzow
* Thus wrote Jay Blanchard: > [snip] > JB> It used to be, but it seems that it hasn't been posted in a while. > So I > JB> retrieved it and posted it. I was thinking about setting up a cron > to > JB> post it every other day or so. > > I think once a week would be more than enough. You have to act

Re: [PHP] Re: [NEWBIE GUIDE] For the benefit of new members

2005-01-25 Thread Jason Wong
On Wednesday 26 January 2005 09:46, Greg Donald wrote: > For example a newbie might be needing some help > debugging an array and may not have ran into the print_r() manual page > yet.. Meanwhile the same newbie probably wouldn't be asking why their > shiny new constructor doesn't automatically

  1   2   3   >