Re: [PHP] question about php with sql database

2008-03-19 Thread Chris
Sudhakar wrote: instead of using mysql database which is conventionally used as database with php, if sql server database is used with php are there any major differences to keep in mind. In syntax or what? Yes there are differences between the two as far as sql syntax goes. 1. are the

Re: [PHP] question about php with sql database

2008-03-19 Thread Brady Mitchell
On Mar 18, 2008, at 1008PM, Sudhakar wrote: 1. are the connection statements ex = $conn = mysql_connect($hostname, $user, $dbpassword); etc does these remain the same or are they different. http://php.net/mssql 2. unlike in mysql with phpmyadmin which is browser based to access databases

Re: [PHP] General use of rewrite / redirect

2008-03-19 Thread Per Jessen
Nathan Nobbe wrote: im sorry i havent read through all the replies, but i have read through several of them. i essentially agree w/ Aschwin here. I'm still having difficulties understanding Aschwins main point, as well as how you can work (properly) with forms without using a 303 redirect.

Re: [PHP] General use of rewrite / redirect

2008-03-19 Thread Per Jessen
Larry Garfield wrote: True, but bear in mind that the browser has to make a HEAD request for every such file in order to determine if it needs to download it again. That's a non-small amount of HTTP traffic if you have a lot of images or CSS files. True - although I rarely see HEAD

Re: [PHP] General use of rewrite / redirect

2008-03-19 Thread Stut
On 19 Mar 2008, at 09:54, Per Jessen wrote: Larry Garfield wrote: True, but bear in mind that the browser has to make a HEAD request for every such file in order to determine if it needs to download it again. That's a non-small amount of HTTP traffic if you have a lot of images or CSS

Re: [PHP] General use of rewrite / redirect

2008-03-19 Thread Per Jessen
Stut wrote: On 19 Mar 2008, at 09:54, Per Jessen wrote: BTW, why does the browser do this for objects it has already cached? (assuming they're fresh/not expired) Because by default most web servers don't add expiry headers, so it's up to the browser. My server does add expire headers -

Re: [PHP] General use of rewrite / redirect

2008-03-19 Thread Stut
On 19 Mar 2008, at 10:11, Per Jessen wrote: Stut wrote: On 19 Mar 2008, at 09:54, Per Jessen wrote: BTW, why does the browser do this for objects it has already cached? (assuming they're fresh/not expired) Because by default most web servers don't add expiry headers, so it's up to the

Re: [PHP] Is this the best way?

2008-03-19 Thread Jason Pruim
On Mar 19, 2008, at 12:02 AM, Shawn McKenzie wrote: Why is Jason schreefing again? Because I'm good at it? ;) -- Jason Pruim Raoset Inc. Technology Manager MQC Specialist 3251 132nd ave Holland, MI, 49424-9337 www.raoset.com [EMAIL PROTECTED] -- PHP General Mailing List

Re: [PHP] Is this the best way?

2008-03-19 Thread Jason Pruim
Just to warn you... I've been up for about 30 minutes and I'm still on my first shot of caffeine... Sorry if things don't make 100% sense :) On Mar 18, 2008, at 10:27 PM, Jochem Maas wrote: Jason Pruim schreef: On Mar 18, 2008, at 3:20 PM, Jochem Maas wrote: what started out as a simple

Re: [PHP] Fastest way to get table records' number

2008-03-19 Thread Daniel Brown
On Tue, Mar 18, 2008 at 11:43 PM, Shelley [EMAIL PROTECTED] wrote: Hi all, What do you think is the FASTEST sql to get the total number of a table with millions of records? That question would be better on the PHP-DB list, so for archive's sake, I'm CC'ing that list. $sql = SELECT

Re: [PHP] Closures

2008-03-19 Thread Zoltán Németh
in short, functional programming support would have been great in php if it had been incorporated early on, at this point i can live without it. if we were going to see support for anything anonymous that i would welcome it would be anonymous objects and the ability to create an object on

Re: [PHP] Fastest way to get table records' number

2008-03-19 Thread Andrew Ballard
On Tue, Mar 18, 2008 at 11:47 PM, Nathan Nobbe [EMAIL PROTECTED] wrote: On Tue, Mar 18, 2008 at 11:43 PM, Shelley [EMAIL PROTECTED] wrote: Hi all, What do you think is the FASTEST sql to get the total number of a table with millions of records? when you say 'total number' do you mean

Re: [PHP] Is this the best way?

2008-03-19 Thread Stut
Jason Pruim wrote: $cmd = $iau ? 'verify account' : 'login'; I've seen these kinds of things in other scripts that I've looked at, but don't totally understand what the : does between 2 options... $cmd = $iau ? 'verify account' :'login'; if () { $cmd =

Re: [PHP] question about php with sql database

2008-03-19 Thread Daniel Brown
Again, another question better-asked on the PHP-DB list, so it's being CC'd there. Responses in-line On Wed, Mar 19, 2008 at 1:08 AM, Sudhakar [EMAIL PROTECTED] wrote: instead of using mysql database which is conventionally used as database with php, if sql server database is used

Re: [PHP] Fastest way to get table records' number

2008-03-19 Thread Stut
Shelley wrote: What do you think is the FASTEST sql to get the total number of a table with millions of records? Generally speaking 'select count(1) from table' is the quickest way, but it really depends on the database and storage engine you're using. Your best bet is to look at the

Re: [PHP] Is this the best way?

2008-03-19 Thread TG
Just to warn you... I've been up for about 30 minutes and I'm still on my first shot of caffeine... Sorry if things don't make 100% sense :) Same here. start from scratch again? By the time I'm ready to release this, I'll have 50 versions :) Measure twice, cut once. Not that I

Re: [PHP] Fastest way to get table records' number

2008-03-19 Thread Nathan Nobbe
On Wed, Mar 19, 2008 at 9:42 AM, Andrew Ballard [EMAIL PROTECTED] wrote: That works; I'm just wondering why you went with a count on an 'ID' column rather than COUNT(*). ouch, it looks like im horribly wrong :O mysql select count(*) from table; +--+ | count(*) | +--+ |

Re: [PHP] Objects as array key names??

2008-03-19 Thread Jim Lucas
Nathan Nobbe wrote: another developer brought to my attention the spl method spl_object_hash() method which afforded a mod in the previously posted class whereby foreach could be used properly. also, it allows a more efficient internal implementation. however, to my dismay, it appears that

Re: [PHP] Detecting \u0000 in a string...

2008-03-19 Thread Mikey
Casey wrote: On Mon, Mar 17, 2008 at 3:56 AM, Mikey [EMAIL PROTECTED] wrote: Hi! I was wondering if anyone here had experienced a simliar problem to mine. I am updating an Oracle XMLType column with XML built using DOM that is populated with values from an Excel spreadsheet saved out as a

Re: [PHP] Fastest way to get table records' number

2008-03-19 Thread Mikey
Nathan Nobbe wrote: On Tue, Mar 18, 2008 at 11:43 PM, Shelley [EMAIL PROTECTED] wrote: Hi all, What do you think is the FASTEST sql to get the total number of a table with millions of records? when you say 'total number' do you mean the total number of records? in that case assuming the

[PHP] php book

2008-03-19 Thread alexus
what book would you guys suggest for someone who's new and wants to learn php? -- http://alexus.org/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Fastest way to get table records' number

2008-03-19 Thread tedd
At 10:35 AM -0400 3/19/08, Nathan Nobbe wrote: On Wed, Mar 19, 2008 at 9:42 AM, Andrew Ballard [EMAIL PROTECTED] wrote: That works; I'm just wondering why you went with a count on an 'ID' column rather than COUNT(*). ouch, it looks like im horribly wrong :O mysql select count(*) from

Re: [PHP] Fastest way to get table records' number

2008-03-19 Thread Andrew Ballard
On Wed, Mar 19, 2008 at 10:35 AM, Nathan Nobbe [EMAIL PROTECTED] wrote: On Wed, Mar 19, 2008 at 9:42 AM, Andrew Ballard [EMAIL PROTECTED] wrote: That works; I'm just wondering why you went with a count on an 'ID' column rather than COUNT(*). ouch, it looks like im horribly wrong :O

Re: [PHP] Fastest way to get table records' number

2008-03-19 Thread Stut
On 19 Mar 2008, at 14:53, tedd wrote: At 10:35 AM -0400 3/19/08, Nathan Nobbe wrote: On Wed, Mar 19, 2008 at 9:42 AM, Andrew Ballard [EMAIL PROTECTED] wrote: That works; I'm just wondering why you went with a count on an 'ID' column rather than COUNT(*). ouch, it looks like im horribly

Re: [PHP] Fastest way to get table records' number

2008-03-19 Thread Andrew Ballard
On Wed, Mar 19, 2008 at 10:53 AM, tedd [EMAIL PROTECTED] wrote: At 10:35 AM -0400 3/19/08, Nathan Nobbe wrote: On Wed, Mar 19, 2008 at 9:42 AM, Andrew Ballard [EMAIL PROTECTED] wrote: That works; I'm just wondering why you went with a count on an 'ID' column rather than COUNT(*).

Re: [PHP] php book

2008-03-19 Thread Daniel Brown
On Wed, Mar 19, 2008 at 10:50 AM, alexus [EMAIL PROTECTED] wrote: what book would you guys suggest for someone who's new and wants to learn php? This is just my opinion, of course, but I wouldn't recommend starting with a book. I'd recommend the online manual at http://php.net/manual/ and

Re: [PHP] php book

2008-03-19 Thread tedd
At 11:04 AM -0400 3/19/08, Daniel Brown wrote: On Wed, Mar 19, 2008 at 10:50 AM, alexus [EMAIL PROTECTED] wrote: what book would you guys suggest for someone who's new and wants to learn php? This is just my opinion, of course, but I wouldn't recommend starting with a book. I'd

Re: [PHP] Fastest way to get table records' number

2008-03-19 Thread jeffry s
On Wed, Mar 19, 2008 at 10:57 PM, Andrew Ballard [EMAIL PROTECTED] wrote: On Wed, Mar 19, 2008 at 10:53 AM, tedd [EMAIL PROTECTED] wrote: At 10:35 AM -0400 3/19/08, Nathan Nobbe wrote: On Wed, Mar 19, 2008 at 9:42 AM, Andrew Ballard [EMAIL PROTECTED] wrote: That works; I'm

Re: [PHP] Fastest way to get table records' number

2008-03-19 Thread Stut
jeffry s wrote: what about SELECT MAX(id) FROM table :) Won't give you the number of records, just the highest ID. -Stut -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Double click problem

2008-03-19 Thread tedd
Hi gang: I have a situation where users can purchase stuff online. In the last step in the process, the user clicks a confirm purchase button and their credit card is checked and if it's valid, they are awarded the product. Everything works, but it takes a little time to check the credit

RE: [PHP] Fastest way to get table records' number

2008-03-19 Thread Edward Kay
At 10:35 AM -0400 3/19/08, Nathan Nobbe wrote: On Wed, Mar 19, 2008 at 9:42 AM, Andrew Ballard [EMAIL PROTECTED] wrote: That works; I'm just wondering why you went with a count on an 'ID' column rather than COUNT(*). ouch, it looks like im horribly wrong :O

Re: [PHP] Double click problem

2008-03-19 Thread Dan Joseph
On Wed, Mar 19, 2008 at 11:48 AM, tedd [EMAIL PROTECTED] wrote: In the last step in the process, the user clicks a confirm purchase button and their credit card is checked and if it's valid, they are awarded the product. Everything works, but it takes a little time to check the credit card.

RE: [PHP] php book

2008-03-19 Thread George Pitcher
On Wed, Mar 19, 2008 at 10:50 AM, alexus [EMAIL PROTECTED] wrote: what book would you guys suggest for someone who's new and wants to learn php? This is just my opinion, of course, but I wouldn't recommend starting with a book. I'd recommend the online manual at http://php.net/manual/

Re: [PHP] Double click problem

2008-03-19 Thread Stut
tedd wrote: I have a situation where users can purchase stuff online. In the last step in the process, the user clicks a confirm purchase button and their credit card is checked and if it's valid, they are awarded the product. Everything works, but it takes a little time to check the credit

RE: [PHP] Double click problem

2008-03-19 Thread Edward Kay
Hi gang: I have a situation where users can purchase stuff online. In the last step in the process, the user clicks a confirm purchase button and their credit card is checked and if it's valid, they are awarded the product. Everything works, but it takes a little time to check the credit

RE: [PHP] Double click problem

2008-03-19 Thread Edward Kay
Hi gang: I have a situation where users can purchase stuff online. In the last step in the process, the user clicks a confirm purchase button and their credit card is checked and if it's valid, they are awarded the product. Everything works, but it takes a little time to check the credit

Re: [PHP] Double click problem

2008-03-19 Thread Eric Butera
On Wed, Mar 19, 2008 at 11:48 AM, tedd [EMAIL PROTECTED] wrote: Hi gang: I have a situation where users can purchase stuff online. In the last step in the process, the user clicks a confirm purchase button and their credit card is checked and if it's valid, they are awarded the product.

[PHP] algorithm of pages beaking

2008-03-19 Thread It Maq
Hi, I am working in page breaking (dividing the result of a select query in multiple pages). Now my problem is not with the php code, but with the algorithm that organize the links to the pages. I want to do something like google, the pages numbers at the bottom of the page must not exceed a

Re: [PHP] Double click problem

2008-03-19 Thread Daniel Brown
On Wed, Mar 19, 2008 at 11:48 AM, tedd [EMAIL PROTECTED] wrote: Hi gang: I have a situation where users can purchase stuff online. In the last step in the process, the user clicks a confirm purchase button and their credit card is checked and if it's valid, they are awarded the product.

Re: [PHP] Double click problem

2008-03-19 Thread Daniel Brown
On Wed, Mar 19, 2008 at 12:01 PM, Eric Butera [EMAIL PROTECTED] wrote: Unique form tokens. Generate a token when the form is displayed and save that value in the session. Then on post check it and remove it. Then if they re-submit it will not exist therefore be invalid. I like

Re: [PHP] algorithm of pages beaking

2008-03-19 Thread Daniel Brown
On Wed, Mar 19, 2008 at 12:01 PM, It Maq [EMAIL PROTECTED] wrote: Hi, I am working in page breaking (dividing the result of a select query in multiple pages). It's more commonly referred to as pagination. You'll get more accurate results with the proper terminology. Now my problem

Re: [PHP] algorithm of pages beaking

2008-03-19 Thread tedd
At 9:01 AM -0700 3/19/08, It Maq wrote: I am working in page breaking (dividing the result of a select query in multiple pages). Now my problem is not with the php code, but with the algorithm that organize the links to the pages. I want to do something like google, the pages numbers at the

[PHP] selling gpl software?

2008-03-19 Thread jeffry s
i know it is forbidden to sell open source software. let say i have costumer want me to modified an open source php script. i have the right to charge him the service to modified the software. but this costumer ask me to do one thing against the gpl software. he want me to remove all the link

RE: [PHP] Double click problem

2008-03-19 Thread tedd
At 4:00 PM + 3/19/08, Edward Kay wrote: Oh, I'd also add a bit of text near the button saying: Please click this button ONCE only. Clicking again may result in your credit card being billed twice. I'm always much more precise with my clicking when such warnings are displayed :) That's

Re: [PHP] php book

2008-03-19 Thread Daniel Brown
On Wed, Mar 19, 2008 at 11:51 AM, George Pitcher [EMAIL PROTECTED] wrote: I must agree with Dan's approach. I've messed with Frontier, ASP, Java and PHP using this approach and it works for me. I always find that books just miss out on that vital topic I need to work on. I find that

RE: [PHP] algorithm of pages beaking

2008-03-19 Thread Edward Kay
Hi, I am working in page breaking (dividing the result of a select query in multiple pages). Now my problem is not with the php code, but with the algorithm that organize the links to the pages. I want to do something like google, the pages numbers at the bottom of the page must not

Re: [PHP] selling gpl software?

2008-03-19 Thread Stut
jeffry s wrote: i know it is forbidden to sell open source software. let say i have costumer want me to modified an open source php script. i have the right to charge him the service to modified the software. but this costumer ask me to do one thing against the gpl software. he want me to

Re: [PHP] Double click problem

2008-03-19 Thread Richard Heyes
tedd wrote: // ... Your first (and the quickest by far) method to employ would be to disable the submit button using Jabbascript when the form is submitted. That will stop the vast majority of occurrences. You could also employ an intermediary page which actually does the card processing and

Re: [PHP] selling gpl software?

2008-03-19 Thread Richard Heyes
jeffry s wrote: i know it is forbidden to sell open source software. Er, no it's not. let say i have costumer want me to modified an open source php script. i have the right to charge him the service to modified the software. Of course. but this costumer ask me to do one thing against

Re: [PHP] What's wrong the __autoload()?

2008-03-19 Thread Greg Donald
On 3/13/08, Andrés Robinet [EMAIL PROTECTED] wrote: Sorry dude, RoR is still an academic toy. Wrong. I've worked with a team of 12 or so Ruby/Rails developers rewriting a Java/Oracle electronic medical record to use Rails/PostgreSQL instead. Hundreds of tables in a real-life app for real-world

Re: [PHP] selling gpl software?

2008-03-19 Thread Daniel Brown
On Wed, Mar 19, 2008 at 12:11 PM, jeffry s [EMAIL PROTECTED] wrote: i know it is forbidden to sell open source software. That's your first mistake. It may be unethical and frowned upon by the community-at-large, but nearly all open source licenses (including GPL) allow for the code to be

RE: [PHP] selling gpl software?

2008-03-19 Thread bruce
umm... if the author of the app has included terms saying that you can use the app, provided that you keep the links/etc... then no, you can't violate the terms... however, in reality, of course people do it all the time... the single guy, or a few guys who are working on an open source app,

Re: [PHP] selling gpl software?

2008-03-19 Thread tedd
At 12:11 AM +0800 3/20/08, jeffry s wrote: i know it is forbidden to sell open source software. let say i have costumer want me to modified an open source php script. i have the right to charge him the service to modified the software. but this costumer ask me to do one thing against the gpl

[PHP] Checking how many letters are in a string.

2008-03-19 Thread Dotan Cohen
I need to count how many Hebrew characters a given string has. I have been checking, character by character, if the given character is a [א-ת] and if so I simply ++ the counting variable. It turns out that this is rather resouce intensive, and I may need a better way of doing this. I have looked

Re: [PHP] selling gpl software?

2008-03-19 Thread Richard Heyes
if the author of the app has included terms saying that you can use the app, provided that you keep the links/etc... then no, you can't violate the terms... however, in reality, of course people do it all the time... Then it wouldn't be under the GPL. The GPL is itself a set of terms that

Re: [PHP] Double click problem

2008-03-19 Thread tedd
At 4:19 PM + 3/19/08, Richard Heyes wrote: tedd wrote: // ... Your first (and the quickest by far) method to employ would be to disable the submit button using Jabbascript when the form is submitted. That will stop the vast majority of occurrences. You could also employ an intermediary

Re: [PHP] Checking how many letters are in a string.

2008-03-19 Thread Richard Heyes
I need to count how many Hebrew characters a given string has. I have been checking, character by character, if the given character is a [א-ת] and if so I simply ++ the counting variable. It turns out that this is rather resouce intensive, and I may need a better way of doing this. I have looked

Re: [PHP] Double click problem

2008-03-19 Thread Jim Lucas
Daniel Brown wrote: On Wed, Mar 19, 2008 at 12:01 PM, Eric Butera [EMAIL PROTECTED] wrote: Unique form tokens. Generate a token when the form is displayed and save that value in the session. Then on post check it and remove it. Then if they re-submit it will not exist therefore be

Re: [PHP] Double click problem

2008-03-19 Thread Daniel Brown
On Wed, Mar 19, 2008 at 12:44 PM, Jim Lucas [EMAIL PROTECTED] wrote: Daniel Brown wrote: I like Eric's method better than the timestamp method I proposed. Much cleaner and easier to institute, and I'd hazard a guess at it being more reliable as well. The initial problem that

[PHP] Re: selling gpl software?

2008-03-19 Thread Colin Guthrie
jeffry s wrote: i know it is forbidden to sell open source software. Actually, you can sell GPL software. But that's not the point here. Persumably the client knows all about it and knows it exists and selling it per-se is not the important part here. let say i have costumer want me to

Re: [PHP] Checking how many letters are in a string.

2008-03-19 Thread tedd
At 6:39 PM +0200 3/19/08, Dotan Cohen wrote: I need to count how many Hebrew characters a given string has. I have been checking, character by character, if the given character is a [ý‚™] and if so I simply ++ the counting variable. It turns out that this is rather resouce intensive, and I may

Re: [PHP] Re: selling gpl software?

2008-03-19 Thread Daniel Brown
On Wed, Mar 19, 2008 at 12:55 PM, Colin Guthrie [EMAIL PROTECTED] wrote: IANAL so apologies if I've gotten anything wrong here. Yes, we know you're anal. ;-P In all seriousness, looks like you got it all right. +1 for you (and a gold star)! -- /Daniel P. Brown Forensic Services,

Re: [PHP] Fastest way to get table records' number

2008-03-19 Thread TG
It seems that count(*) pulls all the data from the row then performs a count increment whereas count(did) only pulls the 'did' column. I wonder if count(did) is the same speed as count(1) or if it will depend on how much/what type of data is in 'did'. I also wonder why count() takes a

RE: [PHP] selling gpl software?

2008-03-19 Thread bruce
richard... sure it would!! you can easily have gpl software, and then apply additional copyright/use terms. as long as your additional conditions don't obviate, or change the gpl, then you're fine... peace.. -Original Message- From: Richard Heyes [mailto:[EMAIL PROTECTED] Sent:

Re: [PHP] Re: selling gpl software?

2008-03-19 Thread jeffry s
On Thu, Mar 20, 2008 at 1:02 AM, Daniel Brown [EMAIL PROTECTED] wrote: On Wed, Mar 19, 2008 at 12:55 PM, Colin Guthrie [EMAIL PROTECTED] wrote: IANAL so apologies if I've gotten anything wrong here. Yes, we know you're anal. ;-P In all seriousness, looks like you got it all

Re: [PHP] Fastest way to get table records' number

2008-03-19 Thread Andrew Ballard
On Wed, Mar 19, 2008 at 1:04 PM, TG [EMAIL PROTECTED] wrote: It seems that count(*) pulls all the data from the row then performs a count increment whereas count(did) only pulls the 'did' column. Again, I don't believe COUNT(*) pulls any data. If there is a row, it simply counts it. The row

Re: [PHP] Re: selling gpl software?

2008-03-19 Thread Daniel Brown
On Wed, Mar 19, 2008 at 1:13 PM, jeffry s [EMAIL PROTECTED] wrote: forgive me for my stupidness. i am quite confuse with law thing and gpl, gplv2 and gplv3 or gnu proven hard for me to understand. anyone can point me a comparison between all this? GPL is the (GNU) General Public License.

Re: [PHP] Fastest way to get table records' number

2008-03-19 Thread Daniel Brown
On Wed, Mar 19, 2008 at 1:19 PM, Andrew Ballard [EMAIL PROTECTED] wrote: On Wed, Mar 19, 2008 at 1:04 PM, TG [EMAIL PROTECTED] wrote: It seems that count(*) pulls all the data from the row then performs a count increment whereas count(did) only pulls the 'did' column. Again, I

Re: [PHP] Checking how many letters are in a string.

2008-03-19 Thread TG
Is the question: How do I tell how many characters are in a string that may contain Hebrew characters? or is the question... How do I tell how many Hebrew characters are in a string that may contain Hebrew and non-Hebrew characters.. but I only want a count of the Hebrew characters? or

Re: [PHP] Re: selling gpl software?

2008-03-19 Thread jeffry s
On Thu, Mar 20, 2008 at 1:19 AM, Daniel Brown [EMAIL PROTECTED] wrote: On Wed, Mar 19, 2008 at 1:13 PM, jeffry s [EMAIL PROTECTED] wrote: forgive me for my stupidness. i am quite confuse with law thing and gpl, gplv2 and gplv3 or gnu proven hard for me to understand. anyone can point me

Re: [PHP] Fastest way to get table records' number

2008-03-19 Thread It Maq
Hi, did you try mysql_num_rows ? --- Andrew Ballard [EMAIL PROTECTED] wrote: On Wed, Mar 19, 2008 at 1:04 PM, TG [EMAIL PROTECTED] wrote: It seems that count(*) pulls all the data from the row then performs a count increment whereas count(did) only pulls the 'did' column. Again,

Re: [PHP] Fastest way to get table records' number

2008-03-19 Thread David Giragosian
Doesn't the 1 in Select count(1) from table refer to the first column in the table, like order by 1 asc? David -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Fastest way to get table records' number

2008-03-19 Thread Daniel Brown
On Wed, Mar 19, 2008 at 1:53 PM, David Giragosian [EMAIL PROTECTED] wrote: Doesn't the 1 in Select count(1) from table refer to the first column in the table, like order by 1 asc? No, it evaluates to Boolean TRUE. It's the same as the one (1) here: SELECT * FROM table WHERE 1; --

Re: [PHP] Fastest way to get table records' number

2008-03-19 Thread TG
First, I swore I deleted that message before I sent it. Rethought the whole count(*) thing and re-read the OP that said count(*) was faster. Oh well.. hah.. Second.. about mysql_num_rows()... at that point, the database has collected the data and sent it to the PHP script. If you're

[PHP] eval uquestion

2008-03-19 Thread chetan rane
HI All I have the follwoing code function cleanufx($str){ return ucase($str); } $value=xyz; $var =ufx; $fn=clean$var($value); $val =eval($fn;); echo $val; can anyone tell me what is wrong in this as the eval is returning 0 (false); -- Have A pleasant Day Chetan. D. Rane

Re: [PHP] Checking how many letters are in a string.

2008-03-19 Thread Dotan Cohen
On 19/03/2008, TG [EMAIL PROTECTED] wrote: Is the question: How do I tell how many characters are in a string that may contain Hebrew characters? or is the question... How do I tell how many Hebrew characters are in a string that may contain Hebrew and non-Hebrew characters.. but I

Re: [PHP] eval uquestion

2008-03-19 Thread Andrew Ballard
On Wed, Mar 19, 2008 at 3:22 PM, chetan rane [EMAIL PROTECTED] wrote: HI All I have the follwoing code function cleanufx($str){ return ucase($str); } $value=xyz; $var =ufx; $fn=clean$var($value); $val =eval($fn;); echo $val; can anyone tell me what is

[PHP] Newbie question, Which way is best?

2008-03-19 Thread George J
Hi, I have a script that contains a form and a pagination routine that calls itself. I want to pass an sql query along with some other variables to the called script. The code to acheive this, using the form, is working but when I try to write the code, using the scripts URL to call itself, I

Re: [PHP] Newbie question, Which way is best?

2008-03-19 Thread Daniel Brown
On Wed, Mar 19, 2008 at 3:47 PM, George J [EMAIL PROTECTED] wrote: Hi, I have a script that contains a form and a pagination routine that calls itself. I want to pass an sql query along with some other variables to the called script. The code to acheive this, using the form, is working but

Re: [PHP] Newbie question, Which way is best?

2008-03-19 Thread Andrew Ballard
On Wed, Mar 19, 2008 at 3:47 PM, George J [EMAIL PROTECTED] wrote: Hi, I have a script that contains a form and a pagination routine that calls itself. I want to pass an sql query along with some other variables to the called script. The code to acheive this, using the form, is working but

Re: [PHP] Newbie question, Which way is best?

2008-03-19 Thread George J
Hi Daniel, WHOA! Passing the SQL query via a URL is a Very Bad Idea[tm]! As a newbie I just have to ask why. I suspect you're going to say it gives the table and field names used in my database. I'm not really aware of all the possible avenues that this method might open up. It just feels

Re: [PHP] Newbie question, Which way is best?

2008-03-19 Thread Daniel Brown
On Wed, Mar 19, 2008 at 4:45 PM, George J [EMAIL PROTECTED] wrote: Hi Daniel, WHOA! Passing the SQL query via a URL is a Very Bad Idea[tm]! As a newbie I just have to ask why. I suspect you're going to say it gives the table and field names used in my database. I'm not really aware

Re: [PHP] Newbie question, Which way is best?

2008-03-19 Thread Jason Pruim
On Mar 19, 2008, at 4:45 PM, George J wrote: Hi Daniel, WHOA! Passing the SQL query via a URL is a Very Bad Idea[tm]! As a newbie I just have to ask why. I suspect you're going to say it gives the table and field names used in my database. I'm not really aware of all the possible

Re: [PHP] Objects as array key names??

2008-03-19 Thread Nathan Nobbe
On Wed, Mar 19, 2008 at 10:37 AM, Jim Lucas [EMAIL PROTECTED] wrote: I would be interested in your examples. From what you described, I can't see in my head how it all goes together. there was one caveat; i had to introduce a keyVal() instance method so client code can get the object that

[Fwd: Re: [PHP] Newbie question, Which way is best?]

2008-03-19 Thread Shawn McKenzie
George J wrote: Hi Daniel, WHOA! Passing the SQL query via a URL is a Very Bad Idea[tm]! As a newbie I just have to ask why. I suspect you're going to say it gives the table and field names used in my database. I'm not really aware of all the possible avenues that this method might

[PHP] Re: SOAP Server in PHP4

2008-03-19 Thread Eric Gorr
Looks like I will be unable to use PHP5 to do a SOAP server. I believe it was possible to do such a thing in PHP4, but perhaps not as cleanly. is this because you arent able to use php5 in your current situation, Yes. because php can do soap servers in php5. I know...I have one

Re: Re: [PHP] Newbie question, Which way is best?]

2008-03-19 Thread George J
Hi Shawn, Shawn McKenzie [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] George J wrote: Hi Daniel, WHOA! Passing the SQL query via a URL is a Very Bad Idea[tm]! As a newbie I just have to ask why. I suspect you're going to say it gives the table and field names used in my

Re: [PHP] Checking how many letters are in a string.

2008-03-19 Thread tedd
At 9:29 PM +0200 3/19/08, Dotan Cohen wrote: I am asking the second question: how many Hebrew characters in a string that _very_likely_ contains other characters as well. The array suggestion sounds about what I am doing: checking if each letter is a Hebrew character. I will also look into the

[PHP] Re: algorithm of pages beaking

2008-03-19 Thread George J
Hi, I'm trying to resolve an issue with a pagination routine. Sounds like we're working on a similar routine. I have a query returning products from a database and then display the results in a defined number of products per page. Checkout - 'Newbie question, Which way is best?' in this

[PHP] fwrite/fclose troubles

2008-03-19 Thread Mark Weaver
Hi all, I've been lurking and reading now for some time, but have decided to come out of the shadows cause I've got an issue that's gonna drive me crazy! I'm developing an application and within this application is a class that is very simple and only serves a singular purpose - to make log

Re: [PHP] fwrite/fclose troubles

2008-03-19 Thread Stut
On 19 Mar 2008, at 23:38, Mark Weaver wrote: I've been lurking and reading now for some time, but have decided to come out of the shadows cause I've got an issue that's gonna drive me crazy! I'm developing an application and within this application is a class that is very simple and only

[PHP] MySQL Group?

2008-03-19 Thread John Taylor-Johnston
Does anyone know of a good MySQL group? I want to make a relational link from `data` to `shopping` so when I insert a new record in `shopping`, I will see the contents of `data`.`name` and `data`.`email` as a drop-down menu in `shopping`. Where does one go to get this kind of help? Thanks,

[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: MySQL Group?

2008-03-19 Thread John Taylor-Johnston
John Taylor-Johnston wrote: Does anyone know of a good MySQL group? Found it: http://lists.mysql.com/mysql/ Thanks, John -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: algorithm of pages beaking

2008-03-19 Thread jeffry s
On Thu, Mar 20, 2008 at 7:35 AM, George J [EMAIL PROTECTED] wrote: Hi, I'm trying to resolve an issue with a pagination routine. Sounds like we're working on a similar routine. I have a query returning products from a database and then display the results in a defined number of products per

[PHP] Re: MySQL Group?

2008-03-19 Thread George J
Hi John, John Taylor-Johnston [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Does anyone know of a good MySQL group? I want to make a relational link from `data` to `shopping` so when I insert a new record in `shopping`, I will see the contents of `data`.`name` and `data`.`email`

Re: [PHP] fwrite/fclose troubles

2008-03-19 Thread Stut
Please keep replies on-list so everyone can benefit from the discussion. On 20 Mar 2008, at 00:13, Mark Weaver wrote: Stut wrote: RTFM. The fopen function (http://php.net/fopen) will return a stream resource. The fwrite (http://php.net/fwrite) and fclose (http://php.net/fclose - noticing a

Re: [PHP] Re: selling gpl software?

2008-03-19 Thread Larry Garfield
On Wednesday 19 March 2008, Colin Guthrie wrote: Also as it's GPL and as you are supplying the modifications you make to your client, you are obliged to release the changes you make to the community. If this was a 100% internal development (e.g. you are employed directly by your client, not

Re: [PHP] Fastest way to get table records' number

2008-03-19 Thread Shelley
Nathan Nobbe wrote: On Wed, Mar 19, 2008 at 9:42 AM, Andrew Ballard [EMAIL PROTECTED] wrote: That works; I'm just wondering why you went with a count on an 'ID' column rather than COUNT(*). ouch, it looks like im horribly wrong :O mysql select count(*) from table; +--+ |

Re: [PHP] Re: selling gpl software?

2008-03-19 Thread Larry Garfield
On Wednesday 19 March 2008, jeffry s wrote: what is the difference between gpl, gplv2 and gplv3 ? http://www.fsf.org/licensing/licenses/quick-guide-gplv3.html -- Larry Garfield AIM: LOLG42 [EMAIL PROTECTED] ICQ: 6817012 If nature has made any one thing less

  1   2   >