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

2007-03-23 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? -- .~. Might, Courage, Vision, SINCERITY. http://www.linu

[PHP] Re: Another SimpleXMLElement question...

2007-03-23 Thread Haydar TUNA
Hello, This is Simple XML extensions. The SimpleXML extension requires PHP 5!. For this reason you can only use other XML extensions such as XML parser.:) -- Haydar TUNA Republic Of Turkey - Ministry of National Education Education Technology Department Ankara / TURKEY Web: http://www.haydartun

Re: [PHP] usage of flock

2007-03-23 Thread Myron Turner
Richard Lynch wrote: On Fri, March 23, 2007 7:52 pm, Yvan Strahm wrote: I am confused with the flock function and its usage. I have jobs which are stored in a database, these jobs are run by a series of job_runners scripts but sometimes the job_runners stop ( server or php crash-down). So i p

RE: [PHP] Question before upgrading to 5

2007-03-23 Thread Jake McHenry
Yea, that's what I was planning on doing, but the way I had my original configure options file set up it would have over written php4... Which turns out after my testing today it would have been ok :) ... But I installed a new copy of apache and php just to be safe... It only took an extra 10 minut

RE: [PHP] Configure question

2007-03-23 Thread Jake McHenry
I scanned over it quick.. Looks interesting.. Thanks :) I'll get into it more tomorrow Jake > -Original Message- > From: Jochem Maas [mailto:[EMAIL PROTECTED] > Sent: Friday, March 23, 2007 7:58 PM > To: Jake McHenry > Cc: php-general@lists.php.net > Subject: Re: [PHP] Configure questio

RE: [PHP] What is wrong with this function please?

2007-03-23 Thread Jake McHenry
Have you changed anything in an hour? I'm too lazy to compare the two emails... Jake > -Original Message- > From: Robin Wilson [mailto:[EMAIL PROTECTED] > Sent: Friday, March 23, 2007 10:46 PM > To: php-general@lists.php.net > Subject: [PHP] What is wrong with this function please?

RE: [PHP] What is wrong with this function please?

2007-03-23 Thread Jake McHenry
I take it there are no errors... And your using windows... Sending to exchange... I guess with seeing what you posted, I would start by echoing out what you have in $to, $subject, $msg, $headers. Are there any errors in Exchange logs? Do you see the message coming into Exchange queue? Jake > --

[PHP] What is wrong with this function please?

2007-03-23 Thread Robin Wilson
Hello I'm trying to do a function that emails users and sends an attachment. But I think something is in the wrong order or something as when I send it Exchange discards it. This is the function which I have put together from various sources: I would really appreciate any help as I have been

[PHP] What is wrong with this function please?

2007-03-23 Thread Robin Wilson
Hello I'm trying to do a function that emails users and sends an attachment. But I think something is in the wrong order or something as when I send it Exchange discards it. This is the function which I have put together from various sources: I would really appreciate any help as I have been

Re: [PHP] Name Capitalization

2007-03-23 Thread Richard Lynch
On Fri, March 23, 2007 1:03 pm, Paul Novitski wrote: > At 3/21/2007 04:57 AM, Shafiq Rehman wrote: >>Some problems are universal and we cannot fix them in computer >> science. I >>think it's better to educate/guide your visitors about such names >> that they >>write in correct capitalization > > >

Re: [PHP] Reuse PHP functions in a third-party application

2007-03-23 Thread Richard Lynch
On Wed, March 21, 2007 3:34 am, Robert Enyedi wrote: > Thanks for the info. Under these circumstances I suppose that the CGI > calling mode is the best suited. > > On the other hand this option might raise some performance penalty. I > wonder if better performance could be achieved if I would use a

Re: [PHP] Out source files

2007-03-23 Thread Richard Lynch
On Wed, March 21, 2007 4:36 am, Manuel Vacelet wrote: > My main question is "What happens if there is bug in my application, > if someone exploit a vulnerability of php or apache?". You will never ever have 100% guarantee that it's safe. Anybody who tells you that you do is lying. Or very stupid

Re: [PHP] High quality image resizing

2007-03-23 Thread Edward Vermillion
On Mar 23, 2007, at 8:32 PM, Jake McHenry wrote: On Fri, March 23, 2007 10:57 am, Markus Fischer wrote: I'm searching for a high quality image resizing facility to be used within PHP in an Unix/Linux environment. Probably everyone will now answer: imagecopyresampled() However, the quality

Re: [PHP] Flash animation without install Flash!

2007-03-23 Thread Richard Lynch
On Wed, March 21, 2007 4:58 am, Helder Lopes wrote: > Because the problems with virus in internet the people dont install > activex > controls. > My question is: > > How to put a flash in the website without asking the person to install > activex control?? A) There is no PHP in this question. B) F

Re: [PHP] trouble with function openssl_csr_new()

2007-03-23 Thread Richard Lynch
On Wed, March 21, 2007 5:05 am, Albert Kopka wrote: > > Hi ... > > I want to generate certificate for smardcard login (MS Win-XP) > and for do that the subject of certificate should contain same key > (in key:value of $dn) multiple times for example ... > > cert generated by ca suplied with W-2

Re: [PHP] read only texbox to html with php

2007-03-23 Thread Richard Lynch
The fact that you are using stripslashes tells me that something is very very very wrong somewhere... For output to the textarea, just htmlentities should be sufficient. Emailing HTML "enhanced" newsletter will reduce the number of people who actually read the dang thing, you know. On Wed, March

Re: [PHP] Re: Random Unique ID

2007-03-23 Thread Richard Lynch
On Wed, March 21, 2007 5:40 pm, [EMAIL PROTECTED] wrote: > Thanks. Yes, I check for errors. But there are other types of errors > so I'd need to verify that it is a duplicate key error and, in my > ignorance, I have not yet figured out how to do that programatically. > I worry about getting into

Re: [PHP] Random Unique ID

2007-03-23 Thread Richard Lynch
Use auto_increment. It's not random, but you should never show it to the end user anyway, so who cares? Another option is to use http://php.net/uniqid and you can create a UNIQUE INDEX on the column and simply check mysql_errno() to see if it's 1023 (or is it 2023?) when you insert to see if you

RE: [PHP] High quality image resizing

2007-03-23 Thread Jake McHenry
> > > On Fri, March 23, 2007 10:57 am, Markus Fischer wrote: > >> I'm searching for a high quality image resizing facility to be used > >> within PHP in an Unix/Linux environment. > >> > >> Probably everyone will now answer: imagecopyresampled() > >> > >> However, the quality of that functionality

RE: [PHP] Job Opportunity

2007-03-23 Thread Richard Lynch
On Wed, March 21, 2007 2:09 pm, Warren Vail wrote: > Too bad we have to constrain our messages to fit the threading > algorithm of > your list server. Another case of where man becomes servant to the > machine? If one "replies" to a message, and changes the "Subject" there are, in most sane syste

Re: [PHP] Performance: While or For loop

2007-03-23 Thread Richard Lynch
On Fri, March 23, 2007 7:54 pm, Tijnema ! wrote: > On 3/24/07, Richard Lynch <[EMAIL PROTECTED]> wrote: >> Folks: >> >> How often do you use a loop of any kind in PHP with enough >> iterations >> that this is even significant? >> >> Write the code that makes sense. >> >> Optimize the biggest bottle

Re: [PHP] close session when browser is closed

2007-03-23 Thread Richard Lynch
If you set the session timeout to 0, then it dies when the browser is quit. On Wed, March 21, 2007 12:37 pm, Alain Roger wrote: > Hi, > > I would like to know what is the best solution for my problem. > > When a user is connected to a https page and a session is open, if > user > close his browser

Re: [PHP] usage of flock

2007-03-23 Thread Richard Lynch
On Fri, March 23, 2007 7:52 pm, Yvan Strahm wrote: > I am confused with the flock function and its usage. I have jobs which > are > stored in a database, these jobs are run by a series of job_runners > scripts > but sometimes the job_runners stop ( server or php crash-down). So i > put a > job_cont

Re: [PHP] High quality image resizing

2007-03-23 Thread Edward Vermillion
On Fri, March 23, 2007 10:57 am, Markus Fischer wrote: I'm searching for a high quality image resizing facility to be used within PHP in an Unix/Linux environment. Probably everyone will now answer: imagecopyresampled() However, the quality of that functionality doesn't match the expectatio

Re: [PHP] Performance: While or For loop

2007-03-23 Thread Robert Cummings
On Sat, 2007-03-24 at 01:54 +0100, Tijnema ! wrote: > On 3/24/07, Richard Lynch <[EMAIL PROTECTED]> wrote: > > On Thu, March 22, 2007 5:14 pm, Tijnema ! wrote: > > > On 3/22/07, Jon Anderson <[EMAIL PROTECTED]> wrote: > > >> Your test isn't exactly fair. The for loop has no statements in it, > > >>

Re: [PHP] Passing variables

2007-03-23 Thread Richard Lynch
example.com?char_id=43&char=Bilbo There is nothing about _ and (int) at all. And, technically, you should use an HTML Entity on the & in your HTML output, so it turns into & On Wed, March 21, 2007 9:49 pm, Jeff wrote: > I want to thank you all for clearing me up on setting the > register_global

Re: [PHP] Check a string does not contain invalid characters

2007-03-23 Thread Richard Lynch
On Wed, March 21, 2007 11:15 pm, John Comerford wrote: > I want to accept a character string which I will use as a unique user > id. I want to check the string to ensure the user has not typed > characters that I consider to be invalid as part of a user id. I was > thinking of doing something alo

RE: [PHP] Question before upgrading to 5

2007-03-23 Thread Richard Lynch
On Thu, March 22, 2007 6:23 am, Jake McHenry wrote: > > Sorry about the delivery and read requests.. I was tired and forgot to > turn > them off for the list.. > >> alternatively you can search for 'Rasmus' and 'ProxyPass' in the >> list >> archive and use Rasmus' rather cool ProxyPass solution

Re: [PHP] Question before upgrading to 5

2007-03-23 Thread Richard Lynch
No, you can't load both PHP4 and PHP5 into the same Apache as Modules. You can run one as CGI. You can use proxy_server in one to shuttle requests to a different Apache pool. On Thu, March 22, 2007 12:07 am, Jake McHenry wrote: > Hi everyone, > > I just got done going through all my configure o

Re: [PHP] Performance: While or For loop

2007-03-23 Thread Tijnema !
On 3/24/07, Richard Lynch <[EMAIL PROTECTED]> wrote: On Thu, March 22, 2007 5:14 pm, Tijnema ! wrote: > On 3/22/07, Jon Anderson <[EMAIL PROTECTED]> wrote: >> Your test isn't exactly fair. The for loop has no statements in it, >> and >> the while loop has one. Your tests show while as approx 7% f

[PHP] usage of flock

2007-03-23 Thread Yvan Strahm
Hello All, I am confused with the flock function and its usage. I have jobs which are stored in a database, these jobs are run by a series of job_runners scripts but sometimes the job_runners stop ( server or php crash-down). So i put a job_controller in crontab to check regularly if the runner

Re: [PHP] Performance: While or For loop

2007-03-23 Thread Richard Lynch
On Thu, March 22, 2007 5:14 pm, Tijnema ! wrote: > On 3/22/07, Jon Anderson <[EMAIL PROTECTED]> wrote: >> Your test isn't exactly fair. The for loop has no statements in it, >> and >> the while loop has one. Your tests show while as approx 7% faster, >> while >> a modified test shows an approximate

Re: [PHP] High quality image resizing

2007-03-23 Thread Markus Fischer
Richard Lynch wrote: > Perhaps you could run GIMP from the command line to get it to re-size... Thanks .. very interesting idea. I'll see if I can make this feasable. Having the server running without X may be problematic .. not impossible, but probably hard. > You should also consider what quali

Re: [PHP] Creating an FTP account on the fly from PHP

2007-03-23 Thread Richard Lynch
On Thu, March 22, 2007 5:20 pm, PHP Fusebox wrote: > I built a CMS that lets a super user create and manage basic users > (among lots of other things). I want basic users to get an FTP account > that is automatically associated with their website user account, and > managed from my add/edit user fo

Re: [PHP] getting a variable from a file

2007-03-23 Thread Richard Lynch
On Fri, March 23, 2007 5:47 am, Ross wrote: > I am using a script to generate a sitemap. It displays the page names > (mypage.php) but I want it to display the titles. The page heads and > > are generated dynamically so the line below does not work > > if(preg_match("'(.+)'i", $f, $matches)){ > >

Re: [PHP] Add New Records Only!

2007-03-23 Thread Richard Lynch
If the table is "small", you could maybe do: delete from foo where id in (select b.id from foo as a, foo as b where a.id < b.id and a.field1 = b.field1 and a.field2 = b.field2 and ...) Another option would be to just create a UNIQUE INDEX on the fields you think "should" be unique, and then your

Re: [PHP] Configure question

2007-03-23 Thread Jochem Maas
Jake McHenry wrote: > I searched the archives... Haven't seen an answer to this yet > > Does anyone know why Virtual Directory Support is enabled on windows, but > disabled on unix? And what exactly is it? I know I can enable it by > --enable-maintainer-zts, but it says in configure that it is

Re: [PHP] POST a variable

2007-03-23 Thread Richard Lynch
On Fri, March 23, 2007 10:07 am, Dan Shirah wrote: > The reason I have to use it as I posted is because I am using > Microsoft SQL > server instead of MySQL. And I haven't found a php function for MSSQL > that > works the same as mysql_insert_id() I guarantee that there is a way to do it in MSSQL

Re: [PHP] POST a variable

2007-03-23 Thread Richard Lynch
On Fri, March 23, 2007 9:45 am, Dan Shirah wrote: > Okay, I feel like the correct answer to this is about 2mm back in my > grey > matter. > > 1. I have a query that pulls the last row number when a newly inserted > record is added: > > $maximum="SELECT MAX(payment_id) FROM payment_request"; > $ma

Re: [PHP] preview string with strlen PHP (help)

2007-03-23 Thread Richard Lynch
You don't need a function to do something repeatedly. You need some kind of loop, such as 'while', 'for' or 'foreach' Try working through a PHP / MySQL tutorial, as it will cover this. On Fri, March 23, 2007 10:55 am, Dwayne Heronimo wrote: > Dear all, > > hmm.. sorry the $previewstext thing was

Re: [PHP] preview string with strlen PHP (help)

2007-03-23 Thread Richard Lynch
On Fri, March 23, 2007 10:18 am, Dwayne Heronimo wrote: > function previewString($showcatvar) { > > $minitxt = $showcatvar; > $len = strlen($minitxt); > > if ($len > 235) > { > $len = 235; > } > else > { > $len = $len; > } Take out this whole "else" block -- Assigning a variable to its

Re: [PHP] High quality image resizing

2007-03-23 Thread Richard Lynch
On Fri, March 23, 2007 10:57 am, Markus Fischer wrote: > I'm searching for a high quality image resizing facility to be used > within PHP in an Unix/Linux environment. > > Probably everyone will now answer: imagecopyresampled() > > However, the quality of that functionality doesn't match the > expe

Re: [PHP] php support

2007-03-23 Thread Richard Lynch
On Fri, March 23, 2007 12:31 pm, Richard Dunne wrote: > Can anyone tell me where to get support for this? php5 undefined > function pg_connect() > Is there a specific mailig list fro users? It means you did not correctly compile/install the PostgreSQL extension to php. If you compiled from sourc

RE: [PHP] Alternatives to PHPLib for authentication, session management, etc

2007-03-23 Thread Jake McHenry
If it still works, then why switch? I wrote my own auth routines Phplib was last released last summer? That's not TOO old http://phplib.sourceforge.net/ Jake > > Hi. > > Been using PHP since the 2.0 days, and been using PHPLib > since 2000 as > the main method of user authentication

[PHP] Configure question

2007-03-23 Thread Jake McHenry
I searched the archives... Haven't seen an answer to this yet Does anyone know why Virtual Directory Support is enabled on windows, but disabled on unix? And what exactly is it? I know I can enable it by --enable-maintainer-zts, but it says in configure that it is "Thread Safety" for code main

[PHP] Alternatives to PHPLib for authentication, session management, etc

2007-03-23 Thread Mark R. Cervarich
Hi. Been using PHP since the 2.0 days, and been using PHPLib since 2000 as the main method of user authentication (logging in/out during same session), and simultaneously use it to give the users who are logged in different permissions. Since PHPLib has long ago stopped (at least in my opini

[PHP] Re: High quality image resizing

2007-03-23 Thread Markus Fischer
Hi, Al wrote: > Suggest visiting the IM forums and asking for help. > > Also, try resizing some images here > http://studio.webbyland.com/MagickStudio/scripts/MagickStudio.cgi thanks for the hints, I'll give them a try. > I use php exec() for my work. Same here. I know there are PHP libraries

Re: [PHP] POST a variable

2007-03-23 Thread Børge Holen
On Friday 23 March 2007 15:45, Dan Shirah wrote: > Okay, I feel like the correct answer to this is about 2mm back in my grey > matter. > > 1. I have a query that pulls the last row number when a newly inserted > record is added: > > $maximum="SELECT MAX(payment_id) FROM payment_request"; > $max_r

[PHP] Re: How to get class constants with there value?

2007-03-23 Thread Steve
Doesn't that destroy the entire reason for having variables within a class in the first place? Why not set them as private and use accessors and mutators to mess with their values? If you aren't going to use those, why not just create global variables and functions? You basically lose your enti

Re: [PHP] References challenge with PHP4

2007-03-23 Thread Jochem Maas
Martin Alterisio wrote: > 2007/3/20, Jochem Maas <[EMAIL PROTECTED] >: > > Robert Cummings wrote: > > On Tue, 2007-03-20 at 11:52 +0100, Jochem Maas wrote: > >> ok, I tried it in a whole number of variations - > >> no joy. > >> > >> you should use

Re: [PHP] preview string with strlen PHP (help)

2007-03-23 Thread Tijnema !
On 3/23/07, Németh Zoltán <[EMAIL PROTECTED]> wrote: 2007. 03. 23, péntek keltezéssel 17.30-kor Dwayne Heronimo ezt írta: > YES this works thank nemeth: your welcome but please call me Zoltán ;) (my first name is Zoltán. in Hungary we write names the opposite order than anywhere else ;) so that'

Re: [PHP] preview string with strlen PHP (help)

2007-03-23 Thread Németh Zoltán
2007. 03. 23, péntek keltezéssel 17.30-kor Dwayne Heronimo ezt írta: > YES this works thank nemeth: your welcome but please call me Zoltán ;) (my first name is Zoltán. in Hungary we write names the opposite order than anywhere else ;) so that's why my mailbox is set to display 'Németh Zoltán' but

[PHP] Re: Download tracker/counter

2007-03-23 Thread Mikey
Robert Wolfe wrote: [snip] 1) Allow the downloads of said files. readfile() is your friend here, although you will need to search around for the right HTTP headers to send as well. 2) Count the number of time a file has been downloaded. You could either look into creating a se

Re: [PHP] Random Unique ID

2007-03-23 Thread Németh Zoltán
2007. 03. 23, péntek keltezéssel 15.13-kor tedd ezt írta: > At 9:15 AM +0100 3/23/07, Németh Zoltán wrote: > >2007. 03. 22, csütörtök keltezéssel 12.58-kor tedd ezt írta: > >> At 4:53 PM +0100 3/22/07, Németh Zoltán wrote: > >> >2007. 03. 22, csütörtök keltezéssel 11.42-kor tedd ezt írta: > >> >

[PHP] Re: How to get class constants with there value?

2007-03-23 Thread Mikey
Mathijs wrote: Hello there, I use PHP5, and i wanted to know if there is an option to extract class constants with there name and value without using Refelection. Now i need to create a reflection of the class to get the info. Is there something like get_class_variables for constants?? Thx

Re: [PHP] Add New Records Only!

2007-03-23 Thread Mark
Rahul Sitaram Johari wrote: > > Ave, > > It's definitely not live data, so that is not a problem at all. But I'm > not sure I understand your method very well. > > I do understand getting data from both the existing DBF and the multiple > mySQL tables into a temporary mySQL table. But if I do g

RE: [PHP] IP to City detection

2007-03-23 Thread William Lovaton
Hi, Thanks to all of you who helped me out. I think this one is the best option for now, it even has an API for PHP 4 and another one for PHP 5. PHP 4: http://www.maxmind.com/download/geoip/api/php/ PHP 5: http://pear.php.net/package/Net_GeoIP/ Cheers, -William El mié, 21-03-2007 a las 14:

Re: [PHP] Re: Random Unique ID

2007-03-23 Thread Satyam
I'm sorry if I am repeating something that has been said, but in the comments to: http://es2.php.net/manual/en/function.uniqid.php there is a little piece of code that generates UUID as per RFC 4122, and those get as unique as they come. MySql has a UUID() function and so do any database eng

Re: [PHP] Random Unique ID

2007-03-23 Thread tedd
At 9:15 AM +0100 3/23/07, Németh Zoltán wrote: 2007. 03. 22, csütörtök keltezéssel 12.58-kor tedd ezt írta: At 4:53 PM +0100 3/22/07, Németh Zoltán wrote: >2007. 03. 22, csütörtök keltezéssel 11.42-kor tedd ezt írta: > > > As for efficiency, that's probably not even worth mentioning in thi

Re: [PHP] POST a variable

2007-03-23 Thread Dan Shirah
Ah, got it. Thanks a lot for the help Satyam! On 3/23/07, Satyam <[EMAIL PROTECTED]> wrote: It seems to me @@identity should sufice, and it certainly does not need to be any 'new' function, since it had been there for quite a while. My feeling is that those added functions might be used for

[PHP] Another SimpleXMLElement question...

2007-03-23 Thread Mikey
If at first you don't succeed... Our production environment is running on an old version of PHP 5.0 and cannot be easily updated. My problem is that I have developed code against a new version and it has the SimpleXMLElement::addChild() function, but this is not present on the older version o

Re: [PHP] POST a variable

2007-03-23 Thread Satyam
It seems to me @@identity should sufice, and it certainly does not need to be any 'new' function, since it had been there for quite a while. My feeling is that those added functions might be used for elaborate stored procedures, where you might be dealing with multiple tables or some fancy adm

Re: [PHP] POST a variable

2007-03-23 Thread Dan Shirah
Sorry, I was more tailoring my question to the syntax of my query. It wasn't displaying anything for my echo. I've changed it to this now: $get_max = "SELECT scope_identity()"; $max_result = mssql_query($get_max) or die(mssql_error()); $max_id = mssql_fetch_row($max_result); echo "$max_id";

[PHP] Re: Random Unique ID

2007-03-23 Thread ccspencer
Robert Cummings writes: Bleh, you can solve this with at most 2 queries. Thanks. That is a bit different than what I was thinking about but it might work for my purposes. Thanks also to all the other people who made suggestions. It appears to me that ther are 3 distinct approaches. 1) Ge

Re: [PHP] Add New Records Only!

2007-03-23 Thread Rahul Sitaram Johari
Ave, > A better solution would be to add a column in the MySQL table, maybe call it > "processed" with a default value of 0, and update this value to 1 with each > row inserted. Then you are only querying records where processed=0. > Of course this will not work if you cannot modify the MySQL tab

Re: [PHP] php support

2007-03-23 Thread Brad Bonkoski
Richard Dunne wrote: Tried that. PHP Warning: PHP Startup:Unable to load dynamic library './php_pgsql.dll' The specified module could not be found. Fatal Error: Call to undefined function pg_connect() Read here for some info: http://www.sitepoint.com/article/use-postgresql-php-windows/3 Not

RE: [PHP] Amazon AWS + SimpleXML

2007-03-23 Thread Brad Fuller
> -Original Message- > From: Myron Turner [mailto:[EMAIL PROTECTED] > Sent: Tuesday, March 20, 2007 10:24 AM > To: Brad Fuller > Cc: php-general@lists.php.net > Subject: Re: [PHP] Amazon AWS + SimpleXML > > Brad Fuller wrote: > > Hey guys, > > > > I'm having trouble trying to parse XML res

RE: [PHP] Add New Records Only!

2007-03-23 Thread Brad Fuller
Rahul wrote: > Ave, > > It's definitely not live data, so that is not a problem at all. But I'm > not > sure I understand your method very well. > > I do understand getting data from both the existing DBF and the multiple > mySQL tables into a temporary mySQL table. But if I do go ahead and do >

Re: [PHP] Name Capitalization

2007-03-23 Thread Paul Novitski
At 3/21/2007 04:57 AM, Shafiq Rehman wrote: Some problems are universal and we cannot fix them in computer science. I think it's better to educate/guide your visitors about such names that they write in correct capitalization In this case, the OP has an existing list of names he wants to de-c

Re: [PHP] Add New Records Only!

2007-03-23 Thread Rahul Sitaram Johari
Ave, It's definitely not live data, so that is not a problem at all. But I'm not sure I understand your method very well. I do understand getting data from both the existing DBF and the multiple mySQL tables into a temporary mySQL table. But if I do go ahead and do that, I guess I could write a

RE: [PHP] php support

2007-03-23 Thread Jake McHenry
Look at phpinfo(), you probably don't have PQSql support installed... Jake > -Original Message- > From: Richard Dunne [mailto:[EMAIL PROTECTED] > Sent: Friday, March 23, 2007 1:31 PM > To: php-general@lists.php.net > Subject: [PHP] php support > > Can anyone tell me where to get suppo

Re: [PHP] Add New Records Only!

2007-03-23 Thread markw
> > Ave, > > "Three: Insert everything and remove duplicates later." > > Out of the suggested options, this option is sounding the most sane > attainable on my end. I don't have a complete grip on how to accomplish > this, but certainly sounds feasible. Let me look at ways to achieve this. > > Than

Re: [PHP] php support

2007-03-23 Thread Brad Bonkoski
Richard Dunne wrote: Can anyone tell me where to get support for this? Here php5 undefined function pg_connect() postgresql was not built into your version of PHP. Perhaps post which platform your run on, and other information like using a pre-canned binary or are building for source. -B

[PHP] php support

2007-03-23 Thread Richard Dunne
Can anyone tell me where to get support for this? php5 undefined function pg_connect() Is there a specific mailig list fro users? Thanks, Richard Dunne Expecting? Get great news right away with email Auto-

Re: [PHP] Add New Records Only!

2007-03-23 Thread Satyam
Delete from table where id = (select min(id) from table group by field1, field2 ,... having count(id) > 1) Id is the unique primary key, fieldn are the fields that can be duplicated. Each time this runs it will remove one occurence of the all duplicated records. You'd have to run it several

Re: [PHP] preview string with strlen PHP (help)

2007-03-23 Thread Dwayne Heronimo
YES this works thank nemeth: 235) { $len = 235; } else { $len = $len; } $newstring = substr($minitxt,0,$len); $previewtext = $newstring; return $previewtext; } ?> and to display it: cheers Dwayne ""Németh Zoltán"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED

[PHP] Re: High quality image resizing

2007-03-23 Thread Al
I'd be surprised if Imagemagick won't do the job. It has a terrific amount of tools; but there is a bit of a learning curve. Suggest visiting the IM forums and asking for help. Also, try resizing some images here http://studio.webbyland.com/MagickStudio/scripts/MagickStudio.cgi I use php exe

Re: [PHP] Add New Records Only!

2007-03-23 Thread Rahul Sitaram Johari
Ave, "Three: Insert everything and remove duplicates later." Out of the suggested options, this option is sounding the most sane attainable on my end. I don't have a complete grip on how to accomplish this, but certainly sounds feasible. Let me look at ways to achieve this. Thanks! On 3/23/07

RE: [PHP] preview string with strlen PHP (help)

2007-03-23 Thread Flavien CHANTELOT
In your function there is at the end before the return statement: $previewtext = $whowcatvar; First $whowcatvar isn't defined. So it could be an answer. And I think u need to delete this line. -Message d'origine- De : Dwayne Heronimo [mailto:[EMAIL PROTECTED] Envoyé : vendredi 23 mars 20

Re: [PHP] preview string with strlen PHP (help)

2007-03-23 Thread Németh Zoltán
2007. 03. 23, péntek keltezéssel 16.55-kor Dwayne Heronimo ezt írta: > Dear all, > > hmm.. sorry the $previewstext thing was a typo in my mail. > > But yes it is working but it will only display the first record of the > recordset. I have like a list for items with short text in a page and of >

Re: [PHP] preview string with strlen PHP (help)

2007-03-23 Thread Dwayne Heronimo
Dear all, hmm.. sorry the $previewstext thing was a typo in my mail. But yes it is working but it will only display the first record of the recordset. I have like a list for items with short text in a page and of course made a query to make the database variables available. Which where the var

Re: [PHP] Re: Keep the PHP list ON TOPIC!

2007-03-23 Thread Jochem Maas
Myron Turner wrote: > Jochem Maas wrote: >> Myron Turner wrote: >> >>> Jochem Maas wrote: >>> I would have made a similar comment - but I have soap stuck between my teeth atm :-P >>> Just use a little of that saliva that you've been wasting on >>> spitballs. ;-) >>>

[PHP] High quality image resizing

2007-03-23 Thread Markus Fischer
Hi, I'm searching for a high quality image resizing facility to be used within PHP in an Unix/Linux environment. Probably everyone will now answer: imagecopyresampled() However, the quality of that functionality doesn't match the expectations of our designers. I've done my tests with PHP4 and GD

Re: [PHP] preview string with strlen PHP (help)

2007-03-23 Thread Jochem Maas
Dwayne Heronimo wrote: > Dear All, > > I am very new to programming. I want to make a preview text that would > display only a part of the text that is a text field in a database. > > //Begin Make preview string > > $minitxt = $row_show_cat['text']; > $len = strlen($minitxt); > > if ($len >

RE: [PHP] preview string with strlen PHP (help)

2007-03-23 Thread Edward Kay
> -Original Message- > From: Dwayne Heronimo [mailto:[EMAIL PROTECTED] > Dear All, > > I am very new to programming. I want to make a preview text that would > display only a part of the text that is a text field in a database. > > //Begin Make preview string > > $minitxt = $row_show_cat

Re: [PHP] POST a variable

2007-03-23 Thread Satyam
Do a 'select @@identity', it will give you the last record id. The gap in between steps 3 and 4, brief as it may seem, is enough to get you in trouble. Satyam - Original Message - From: "Dan Shirah" <[EMAIL PROTECTED]> To: "Németh Zoltán" <[EMAIL PROTECTED]> Cc: "php-general" Sen

RE: [PHP] preview string with strlen PHP (help)

2007-03-23 Thread Flavien CHANTELOT
-Message d'origine- De : Tijnema ! [mailto:[EMAIL PROTECTED] Envoyé : vendredi 23 mars 2007 16:26 À : Dwayne Heronimo Cc : php-general@lists.php.net Objet : Re: [PHP] preview string with strlen PHP (help) On 3/23/07, Dwayne Heronimo <[EMAIL PROTECTED]> wrote: > Dear All, > > I am very n

Re: [PHP] Add New Records Only!

2007-03-23 Thread Mark
Rahul Sitaram Johari wrote: As far as I can see, there is probably only three ways to do this: One: Make sure your dbase system contains unique primary key capability, and use it to avoid duplicates. Two: query for the row, if it isn't there insert it. (You'll have to deal with concurrency with l

Re: [PHP] preview string with strlen PHP (help)

2007-03-23 Thread Tijnema !
On 3/23/07, Dwayne Heronimo <[EMAIL PROTECTED]> wrote: Dear All, I am very new to programming. I want to make a preview text that would display only a part of the text that is a text field in a database. //Begin Make preview string $minitxt = $row_show_cat['text']; $len = strlen($minitxt);

Re: [PHP] POST a variable

2007-03-23 Thread Németh Zoltán
2007. 03. 23, péntek keltezéssel 11.07-kor Dan Shirah ezt írta: > The reason I have to use it as I posted is because I am using > Microsoft SQL server instead of MySQL. And I haven't found a php > function for MSSQL that works the same as mysql_insert_id() you wrote something earlier as far as I

[PHP] preview string with strlen PHP (help)

2007-03-23 Thread Dwayne Heronimo
Dear All, I am very new to programming. I want to make a preview text that would display only a part of the text that is a text field in a database. //Begin Make preview string $minitxt = $row_show_cat['text']; $len = strlen($minitxt); if ($len > 235) { $len = 235; } else { $len = $

[PHP] Re: close session when browser is closed

2007-03-23 Thread Colin Guthrie
Edward Vermillion wrote: >> Personally I think this does make sense. I fully expect the browser to >> maintain cookies "Until it is closed" -- If I have closed one tab that >> had set a cookie, re-opening that URL in a new window/tab should still >> cause the browser to send in my cookie. >> > >

RE: [PHP] POST a variable

2007-03-23 Thread Edward Kay
> -Original Message- > From: Németh Zoltán [mailto:[EMAIL PROTECTED] > 2007. 03. 23, péntek keltezéssel 10.45-kor Dan Shirah ezt írta: > > Okay, I feel like the correct answer to this is about 2mm back > in my grey > > matter. > > > > 1. I have a query that pulls the last row number when

Re: [PHP] POST a variable

2007-03-23 Thread Dan Shirah
The reason I have to use it as I posted is because I am using Microsoft SQL server instead of MySQL. And I haven't found a php function for MSSQL that works the same as mysql_insert_id() So, to come out with a comparable function with pretty reliable results, I follow this process: 1. User ente

Re: [PHP] Add New Records Only!

2007-03-23 Thread clive
you could do a serialized md5 of sum of the more unique columns from your db abd use that as a unique identifier for the row. Then you would need to compare this 'key' before doing a insert. Also keeping a log of the date and time of the last operation would help as then you only need to sele

Re: [PHP] Creating an FTP account on the fly from PHP

2007-03-23 Thread Tijnema !
On 3/23/07, Travis Doherty <[EMAIL PROTECTED]> wrote: PHP Fusebox wrote: > I built a CMS that lets a super user create and manage basic users > (among lots of other things). I want basic users to get an FTP account > that is automatically associated with their website user account, and > managed

Re: [PHP] Integer question

2007-03-23 Thread Tijnema !
On 3/23/07, Richard Lynch <[EMAIL PROTECTED]> wrote: On Thu, March 22, 2007 2:33 pm, Tijnema ! wrote: >> > 2). How do you handle numbers that large, while maintaining >> precision. >> >> keep them as strings - and/or use a 64bit machine? > > a 64bit machine would make the number larger, not unli

Re: [PHP] POST a variable

2007-03-23 Thread Németh Zoltán
2007. 03. 23, péntek keltezéssel 10.45-kor Dan Shirah ezt írta: > Okay, I feel like the correct answer to this is about 2mm back in my grey > matter. > > 1. I have a query that pulls the last row number when a newly inserted > record is added: > > $maximum="SELECT MAX(payment_id) FROM payment_req

Re: [PHP] Permissions issue on share

2007-03-23 Thread Tijnema !
On 3/23/07, Jim Lucas <[EMAIL PROTECTED]> wrote: Rahul Sitaram Johari wrote: > Ave, > > I¹m not sure if anyone here is going to be able to help, but I¹ve run into a > permissions snag. > I have Apache Web Server running on Mac OS X with PHP. I have a folder on a > windows machine mounted on my Ma

Re: [PHP] Performance: While or For loop

2007-03-23 Thread Tijnema !
On 3/23/07, Mario Guenterberg <[EMAIL PROTECTED]> wrote: On Fri, Mar 23, 2007 at 12:24:45AM -0500, Travis Doherty wrote: > After multiple runs I see that the for pre-increment loop is fastest. > Note that the while loop with a post-increment runs once more than with > a pre-increment. > > Everyti

  1   2   >