Re: [PHP-DB] imagecopyresize???????

2010-04-05 Thread Rasmus Lerdorf
On 04/05/2010 09:03 PM, Karl DeSaulniers wrote: Hello List, I am hoping this will be a quick and easy for someone to help me with. I am trying to create an upload form that lets a user upload a product photo to the server. In the process of this upload, I want to take the file they are

Re: [PHP-DB] Re: PHP and table/view names with '$'

2009-04-23 Thread Rasmus Lerdorf
This is well-documented in the String part of the Data Types section: http://www.php.net/manual/en/language.types.string.php -Rasmus Mark Casson wrote: Hi Guys, Thanks to you both - you are spot on! Shame this is not better documented somewhere. Mark Mark Casson

Re: [PHP-DB] HTML Tables in PHP...

2005-09-26 Thread Rasmus Lerdorf
There are many ways to do it. I prefer one of these two: ?php echo EOB table align=center width=$width EOB; ? or. table align=center width=?php echo $width? -Rasmus Micah Stevens wrote: I apologize, I was being rude. More specifically, I don't see why you say all html tags should be

Re: [PHP-DB] HTML Tables in PHP...

2005-09-26 Thread Rasmus Lerdorf
Micah Stevens wrote: Rasmus, there's a shortcut for this: ?php echo $width? ?=$width? Saves me a lot of time, although it can be confusing for those unfamiliar with it. Yes, I am quite familiar with it ;) But I don't like it. It's an ugly ASP'ism. -Rasmus -- PHP Database

Re: [PHP-DB] HTML Tables in PHP...

2005-09-26 Thread Rasmus Lerdorf
mario wrote: hi, silly question: what is EOB? google returns: Your search - EOB site:www.php.net - did not match any documents. I see your (short) side note on EOB on http://www.oracle.com/technology/pub/articles/php_experts/rasmus_php.html EOB is not an entry in your 'programming

Re: [PHP-DB] Letters loop

2005-05-27 Thread Rasmus Lerdorf
Chris wrote: You could create a string, loop through it's length, then access the $i character in the string. $sAlpha = 'ABCDEF...XYZ'; for($i=0;$i26;++$i) { $sLetter = $sAlpha{$i}; // code } range() is a powerful function for creating such strings. You don't need to loop.

Re: [PHP-DB] Letters loop

2005-05-26 Thread Rasmus Lerdorf
Absolutely nothing wrong with that solution. But here is an alternative just for fun: for($letters = range('A','Z'), $i=0; isset($letters{$i}); $i++) echo $letters{$i}. ; -Rasmus Miguel Guirao wrote: Thanks!! I think the ord() function should receive an integer as a parameter and it

Re: [PHP-DB] History of MySQL support in PHP

2005-03-19 Thread Rasmus Lerdorf
The actual code for the first MySQL extension was just a search and replace of msql-mysql in the original msql extension I wrote before that. I found 1995'ish documentation for that the other day: http://lerdorf.com/php/msql.html And that extension was based on the original msql support in

Re: [PHP-DB] Why isn't this working?

2005-02-26 Thread Rasmus Lerdorf
Chris Payne wrote: Hi everyone, Im trying to split a string by comma, but its not working, can you see any reason that the below doesnt work? $keywords = preg_split(',','$Agent_Rep'); Not sure why you sent this to php-db, but have another look at the preg_split documentation. You need

Re: [PHP-DB] Empty Table command?

2003-11-26 Thread Rasmus Lerdorf
delete from table_name On Wed, 26 Nov 2003, Chris Payne wrote: Hi there everyone, Just a quick question which I can't for the life of me find the answer for on MySQL's website (Probably as i'm looking for the wrong term?) I want to know how to empty a table, is there an empty command or

Re: [PHP-DB] can PHP give MySQL the missing relational properties?

2003-10-28 Thread Rasmus Lerdorf
Your question makes very little sense to me. PHP is not a database obviously. Also, MySQL has foreign keys and triggers and it can do cascading actions. So I don't understand what you are talking about. -Rasmus On Tue, 28 Oct 2003, Morten Gulbrandsen wrote: MySQL as database for PHP,

Re: [PHP-DB] non-GPL MySQL licenses PHP5

2003-07-01 Thread Rasmus Lerdorf
On Tue, 1 Jul 2003, Nabil wrote: You need to purchase commercial non-GPL MySQL licenses: a.. If you distribute MySQL Software with your non open source software, b.. If you want warranty from MySQL AB for the MySQL software, c.. If you want to support MySQL development. So Why it is

Re: [PHP-DB] non-GPL MySQL licenses PHP5

2003-07-01 Thread Rasmus Lerdorf
On Tue, 1 Jul 2003 [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] (Rasmus Lerdorf) wrote in news:[EMAIL PROTECTED]: On Tue, 1 Jul 2003, Nabil wrote: You need to purchase commercial non-GPL MySQL licenses: a.. If you distribute MySQL Software with your non open source software, b

Re: [PHP-DB] No MySQL Support in PHP5 - Uh oh!

2003-06-29 Thread Rasmus Lerdorf
On Sun, 29 Jun 2003, Ben Lake wrote: Anyone have an input on the recent announcement that about MySQL libraries not being present in PHP 5. What other means might be available to connect to MySQL? This only affects the bundled library. It doesn't mean the MySQL extension is going away. Just

Re: [PHP-DB] No MySQL Support in PHP5 - Uh oh!

2003-06-29 Thread Rasmus Lerdorf
On Sun, 29 Jun 2003, Marco Tabini wrote: The MySQL extension has been debundled because MySQL has changed its licensing policy and, effective 4.0, the library is now distributed either under the GPL (which is incompatible with the PHP license) or by purchasing a commercial license. Please

Re: [PHP-DB] mysql_connect error

2003-06-10 Thread Rasmus Lerdorf
You have to load the extension in your php.ini file. eg. extension=mysql.so -Rasmus On Tue, 10 Jun 2003, Sparky Kopetzky wrote: Good afternoon! I have Apache w/php installed on one server. I have mysql installed on a windows machine. I keep getting this error 'Call to undefined

Re: [PHP-DB] image resizing and saving

2003-04-04 Thread Rasmus Lerdorf
A single img src=script.php can only show a single image. If your script.php generates two complete images, then I would think the browsers would choke, but perhaps they fail gracefully and only show you the first one. If you want two images, you need 2 img src... tags and thus two calls to your

Re: [PHP-DB] GD support in 4.3?

2003-03-03 Thread Rasmus Lerdorf
Wrong mailing list. --with-gd On Mon, 3 Mar 2003, nate hurto wrote: According to the GD web site http://www.boutell.com/gd/, there is native GD support in v4.3.0. Anyone know how to enable this support? Thanks. Nate. -- PHP Database Mailing List (http://www.php.net/) To

Re: [PHP-DB] Is my Hosting service full of it?

2003-02-08 Thread Rasmus Lerdorf
Their comments do make sense, and without seeing your code it is impossible to say whether they are correct or not. They are basically saying that you have written some very inefficient code. 700 requests an hour should never come anywhere close to bogging anything down unless you have

Re: [PHP-DB] Connecting to remote db securely

2002-11-25 Thread Rasmus Lerdorf
Which DB? MySQL supports encrypted connections. On Mon, 25 Nov 2002, Lisi wrote: I am writing a content management section for a site that will use as part of the front page three small sub-sections from another site's home page (with their permission, of course). They are worried about

Re: [PHP-DB] Connecting to remote db securely

2002-11-25 Thread Rasmus Lerdorf
need to look at? Thanks, -Lisi At 12:09 AM 11/25/02 -0800, Rasmus Lerdorf wrote: Which DB? MySQL supports encrypted connections. On Mon, 25 Nov 2002, Lisi wrote: I am writing a content management section for a site that will use as part of the front page three small sub-sections from

Re: [PHP-DB] Connecting to remote db securely

2002-11-25 Thread Rasmus Lerdorf
Is there any secure way to connect using these versions? I am on a virtual host so there's not much I can do about upgrading. Also, does it matter which versions the server I am connecting to are running? -Lisi At 12:22 AM 11/25/02 -0800, Rasmus Lerdorf wrote: See php.net/mysql_connect

RE: [PHP-DB] PDFlib

2002-11-25 Thread Rasmus Lerdorf
We do mention it at http://www.php.net/mailing-lists.php I'll post the mailing list guidelines here as well, as it is good to remind people every now and then: * Use a valid email adress. Every new poster's email address is checked for validity through confirmation. * Send plain

Re: [PHP-DB] Inserting things into the DB

2002-11-17 Thread Rasmus Lerdorf
addslashes() On Sun, 17 Nov 2002, Peter Beckman wrote: Having a little trouble doing some inserts into a db. The problem is escaping the right characters. Data integrity is important. Right now, I have taken an email and split it into $body and $header (containing the respective parts of

Re: [PHP-DB] php sessions using mysql (or any db)

2002-11-15 Thread Rasmus Lerdorf
CREATE TABLE `SessionsTable` ( `SID` varchar(32) NOT NULL default '', This doesn't need to be a varchar. The sid will always be 32 chars, so make it a char(32) `expiration` int(11) NOT NULL default '0', I would suggest using a timestamp type here so MySQL will handle updating it for you

Re: [PHP-DB] Imploding an array?

2002-11-06 Thread Rasmus Lerdorf
You sure you want [$i] on that? Is it a 2-dimensional array? On Wed, 6 Nov 2002, Aaron Wolski wrote: Hey all, Can't seem to figure out why this won't work: $test = implode(,, $order_index[$i]); When I print_r() the variable I have values so I know that works. Any thoughts on this?

Re: [PHP-DB] ODBTP, a possible solution for MS-SQL and other databases

2002-11-02 Thread Rasmus Lerdorf
Sounds interesting. Perhaps toss it into PEAR/PECL and see if anybody is interested in pitching in with maintenance. You never know, someone might pop up and add a bunch of improvements that will benefit you directly. -Rasmus On Sat, 2 Nov 2002, Robert Twitty wrote: Hello I have been using

Re: [PHP-DB] Automattic Rollback on User Cancel with MySQL

2002-10-19 Thread Rasmus Lerdorf
PHP 4.3 handles this correctly. Give a snapshot from snaps.php.net a try. -Rasmus On Fri, 18 Oct 2002, Benjamin Schleinzer wrote: Hi I Am using the latest PHP version 4.2.3 with MySQL 3.23.51-max. I use InnoDB tables for transactions and everything works fine with Rollback and Commit. But

Re: [PHP-DB] Some data manipulation

2002-10-05 Thread Rasmus Lerdorf
So loop through and check the last char. Am I missing something that makes this harder than the obvious: foreach($arr as $key=$val) { $end = $val[strlen($val)-1]; switch($end) { case '1': $arr[$key] = substr($val,0,-1); break; case '2': case '3': $arr[$key] =

Re: [PHP-DB] Getting POSTed values

2002-10-04 Thread Rasmus Lerdorf
echo $Name; Or if register_globals is off in your php.ini, use: echo $_POST['Name']; -Rasmus On Fri, 4 Oct 2002, Shoulder to Shoulder Farm wrote: Hi all, Sorry, but I REALLY don't want to subscribe to the PHP general list, it's so high volume, so here goes. --T How can I get values that

Re: [PHP-DB] Register Globals Question

2002-09-30 Thread Rasmus Lerdorf
Whoever told you that was wrong. It will not be deprecated, the default php.ini setting was merely changed. If you have a php.ini file and you upgrade you won't notice any change whatsoever. -Rasmus On Mon, 30 Sep 2002, Ryan Jameson (USA) wrote: I was recently told this: register_globals

Re: [PHP-DB] PHP htaccess username grab

2002-09-05 Thread Rasmus Lerdorf
$REMOTE_USER On Thu, 5 Sep 2002, Keith Spiller wrote: Hello, If I were to use a plain old htaccess file with a htpasswd file for user authentication, rather than php files, could PHP somehow later retrieve the username used through some system or browser variables? I would assume that

Re: [PHP-DB] Indepth Tutorial... need help.

2002-09-03 Thread Rasmus Lerdorf
Most of this stuff is actually just SQL and has little to do with PHP. So look for an SQL tutorial. From the PHP side all you need to know is mysql_connect(), mysql_select_db(), mysql_query() and mysql_fetch_row().'' All queries are sent to the database via mysql_query(). It doesn't matter to

Re: [PHP-DB] Are running sessions using a MySQL handler faster?

2002-08-21 Thread Rasmus Lerdorf
Chances are the files-based one is probably a bit quicker. Especially on systems where /tmp is optimized or perhaps even set up as a ramdisk. -Rasmus On Wed, 21 Aug 2002, Jonathan Thomas wrote: Good afternoon! Quick performance question - I'm currently preparing the release of a new

Re: [PHP-DB] PHP --with-pgsql

2002-08-01 Thread Rasmus Lerdorf
It is obviously missing libpq You need to installed the postgresql libraries. If you are installing from packages, install the postgresql-devel package. -Rasmus On Thu, 1 Aug 2002, Jan Feller wrote: Hello! IĀ“have a problem compiling PHP 4.1.2 with PostgreSQL. Running the Makefile returns

Re: [PHP-DB] mySQL max connections

2002-07-30 Thread Rasmus Lerdorf
I would suggest looking into MySQL's replication support. Split reads and writes so they go to separate servers. That is, create a master server where you send all database writes. And do all reads on the replicated slave servers. Have a look at this presentation I gave last week on this

Re: [PHP-DB] mysql_fetch_array limit? - more details

2002-07-30 Thread Rasmus Lerdorf
What do you mean it uses 2? It does not. On Tue, 30 Jul 2002, Andrey Hristov wrote: Maybe it will help you but I've read that when using persistent connections PHP uses 2 on every request. So if in one moment you have 10 scripts,that use persistent connections, running you will have 20

Re: [PHP-DB] mysql_fetch_array limit? - more details

2002-07-30 Thread Rasmus Lerdorf
have been to increase the MySQL max_connections parameter from the default of 100. [/snip] Andrey - Original Message - From: Rasmus Lerdorf [EMAIL PROTECTED] To: Andrey Hristov [EMAIL PROTECTED] Cc: Paul Worthington [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, July 30, 2002 7

[PHP-DB] Re: [PHP] saving temporary image to database

2002-06-29 Thread Rasmus Lerdorf
There is no imagejpeg() call in the code snippet you provided. And you don't say how it is failing. You haven't provided us with enough data to answer this question. -Rasmus On Sat, 29 Jun 2002, andy wrote: Hi there, I would like to save a jpg into a blob field of mysql. The function

Re: [PHP-DB] db sql issue from var

2002-05-26 Thread Rasmus Lerdorf
Well, where is your ';'? At the end of the statement? You don't terminate queries with semi colons when talking directly to the database. Just remove it. -Rasmus On Sun, 26 May 2002, Dave Carrera wrote: Hi All I have found the problem from my last post and need to know how to solve it.

Re: [PHP-DB] db sql issue from var

2002-05-26 Thread Rasmus Lerdorf
Ah, there is the issue. You cannot issue 2 SQL queries in a single mysql_query() call. You have to do them one at a time without the ; -Rasmus On Sun, 26 May 2002, Janet Valade wrote: Can't you do what you want to do without using two SQL statements? CREATE TABLE IF NOT EXISTS. Janet

Re: [PHP-DB] db sql issue from var

2002-05-26 Thread Rasmus Lerdorf
I think it an issue with including multiple sql commands in one var... Yup, you can't do that. Simply separate them and do them one at a time. -Rasmus -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] Re: [PHP] convert yyyy/mm/dd to mm/dd/yyyy, how?

2002-01-13 Thread Rasmus Lerdorf
MySQL has plenty of functions to return dates to you in any format you specify. Please read http://mysql.com/documentation/mysql/bychapter/manual_Reference.html#Date_and_time_functions and pay special attention to the DATE_FORMAT() function. -Rasmus On Sun, 13 Jan 2002, Sander Peters wrote:

Re: [PHP-DB] Re: [PHP] convert yyyy/mm/dd to mm/dd/yyyy, how?

2002-01-13 Thread Rasmus Lerdorf
(and possibly in some situations, vice-versa)? Regards, =dn - Original Message - From: Rasmus Lerdorf [EMAIL PROTECTED] To: Sander Peters [EMAIL PROTECTED] Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: 13 January 2002 19:52 Subject: [PHP-DB] Re: [PHP] convert /mm/dd to mm/dd/

[PHP-DB] Re: [PHP] PHP XML

2001-12-07 Thread Rasmus Lerdorf
No, you need to disable short_tags and use ?php ... ? for all your PHP tags if you are going to mix PHP and XML tags in the same file. -Rasmus On Fri, 7 Dec 2001, Steve Haemelinck wrote: Hi Guys I am developing with PHP and XML. Now I experience some problem with the processing

[PHP-DB] Re: [PHP] MYSQL_SOCKET

2001-08-16 Thread Rasmus Lerdorf
the variable MYSQL_SOCKET is set to /tmp/mysql.sock and i need it to be /var/lib/mysql/mysql.sock is there anyway i can set this variable in php? From http://php.net/mysql_connect : resource mysql_connect ([string hostname[:port][:/path/to/socket] [, string username [, string password]]])

[PHP-DB] Re: [PHP] MYSQL_SOCKET

2001-08-16 Thread Rasmus Lerdorf
? thanks, jay - Original Message - From: Rasmus Lerdorf [EMAIL PROTECTED] To: Jay Paulson [EMAIL PROTECTED] Cc: [EMAIL PROTECTED]; php [EMAIL PROTECTED] Sent: Thursday, August 16, 2001 2:45 AM Subject: Re: [PHP] MYSQL_SOCKET the variable MYSQL_SOCKET is set to /tmp/mysql.sock and i

Re: [PHP-DB] PROBLEM IN INSERTING TEXT WITH SINGLE QUOTE

2001-04-22 Thread Rasmus Lerdorf
When a user fills out a form field that includes an apostrophe ex. Jen's , the verify screen shows it as Jen\'s and it That's because magic_quotes_gpc is enabled in your php.ini file. You can turn this off if you wish, or simply do a stripslashes() on the string you are displaying. is then

Re: [PHP-DB] Can't recognize new line

2001-04-22 Thread Rasmus Lerdorf
nl2br() On Sun, 22 Apr 2001, Jennifer Arcino Demeterio wrote: It works! Thanks for the help! Anyway, I hope you won't mind if I'll ask you another question, when the text type is pulled out from the MySQL database into my display script it can't recognize the new line. It diplays the text

Re: [PHP-DB] Connecting to a remote postgres database

2001-04-19 Thread Rasmus Lerdorf
Uncomment this line in your php.ini file: extension=php_pgsql.dll -Rasmus On Thu, 19 Apr 2001, Jerome O Macaranas wrote: using PHP 4.0 under Win2K IIS 5.0 got this error - Fatal error: Call to undefined function: pg_connect() in C:\Inetpub\PHPwwwroot\index.php on line 17 is there

Re: [PHP-DB] A Real PHP problem for a change...

2001-04-10 Thread Rasmus Lerdorf
That said, (Now on to actual PHP) I've noticed (in my own scripting) and a few other problems posted here quite a bit of confusion with PHP's single ' and double " quotes. Reading the material I was led to believe that ' ' outputs exactly what is in the quotes and " " outputs variables

Re: [PHP-DB] Encode/Decode Secure Enough?

2001-04-07 Thread Rasmus Lerdorf
No On Sat, 7 Apr 2001, Jeff Oien wrote: Are encode and decode secure enough for storing credit card numbers on a Web server? Jeff Oien -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To

RE: [PHP-DB] problems configuring php and postgres - call to und efined function

2001-03-20 Thread Rasmus Lerdorf
Message- From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]] Sent: 20 March 2001 16:09 To: Steve Brett Subject: RE: [PHP-DB] problems configuring php and postgres - "call to und efined function" Well, you just didn't point PHP at the right place then. On Tue, 20 Mar 2001, S

Re: [PHP-DB] problems configuring php and postgres - call toundefined function

2001-03-19 Thread Rasmus Lerdorf
What kind of binary install did you do? An rpm? If so, simply also install the rpm-devel package and it will compile nicely. -Rasmus On Tue, 20 Mar 2001, Gary Huntress wrote: I am trying to get postgresql (pg) support for php working on my RH7 box. I had a working binary installation of