Re: [PHP-DB] Pop3?

2003-09-22 Thread andu
On Mon, 22 Sep 2003 16:04:06 -0400
"Chris Payne" <[EMAIL PROTECTED]> wrote:

> Hi there,
> 
> I get an error about a T_Variable here:
> 
> $messg_list=pop3_list($id);
> print_r $messg_list;

print_r($messg_list);

> pop3_quit($id);

My mistake but you can't really use php without learning it. Having looked up
print_r in the manual you would've noticed what was missing.
The danger here is that if you don't do your part you will prove those who just
answer RTFM right.

> 
> (The print_r line).  If I change $messg_list to $id on the print_r line, it
> doesn't give me that error by rather the ID Number, but I try with the
> $messg_list I get a T_Variable error, any ideas?
> 
> BTW, I haven't touched your functions so they are the same as you sent to
> the list, I just changed the details for my pop3 server which logs in fine
> as if I put in a wrong password it knows it's wrong :-)
> 
> Chris
> 
> > On Sunday, September 21, 2003, at 11:58  PM, Chris Payne wrote:
> >
> > > Hi there,
> > >
> > > Thanks for that, very appreciated, just one question?  Without meaning
> > > to
> > > sound dumb (Which I probably will) how do I call your function?  I
> > > don't
> > > usually deal with functions, I know I need to start though .
> > >
> > > Chris
> > >
> > Don't have time to test but this is the idea:
> >  > require_once('pop3_fcn.php');
> >
> > $id=open_pop3("server","110","username","passwd");
> >
> > $messg_list=pop3_list($id);
> > print_r $messg_list;
> > pop3_quit($id);
> > ?>
> >
> > Andu
> >
> 
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
> 



Regards, Andu Novac

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] Pop3?

2003-09-21 Thread andu
On Sunday, September 21, 2003, at 10:53  PM, Chris Payne wrote:

Hi there everyone,

Does anyone have any sample code whereby I can conntect to, and list 
the emails on my pop3 server for my own username/password?  I tried 
something on the PHP.NET documentation but I get errors :-(

Basically, I need to list all emails that I have in my inbox (POP3) so 
then I can insert selected data into a database backup (Hard to 
explain).

Any help would be really appreciated :-)

Regards

Chris
See the attachment, I believe it works but I'm not sure if it's a draft 
or the real thing since I wrote it a while ago.
Andu


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] sqlite question

2003-09-02 Thread andu
I use the following to delete a column from a table:

$columns= "'col1','col2','col3','col4','col5'";
$columns=str_replace(','."'col3'",'',$columns);
$this->open_db(); //get the resource number($this->c_id)
$r=sqlite_query($this->c_id,"BEGIN");
$r=sqlite_query($this->c_id,"CREATE TEMPORARY TABLE
'backup'($columns)");
$r=sqlite_query($this->c_id,"INSERT INTO 'backup'
SELECT $columns FROM '$table_name'");
$r=sqlite_query($this->c_id,"DROP TABLE '$table_name'");
$r=sqlite_query($this->c_id,"CREATE TABLE '$table_name'($columns)");
$r=sqlite_query($this->c_id,"INSERT
INTO'$table_name' SELECT $columns FROM 'backup'");
$r=sqlite_query($this->c_id,"DROP TABLE 'backup'");
$r=sqlite_query($this->c_id,"COMMIT");
sqlite_close($this->c_id);

What happens is that 
"INSERT INTO 'backup'SELECT $columns FROM '$table_name'" 
populates the 'backup' table with
the names of the columns instead of the content of the columns. If I
unquote the columns names in $columns (col1,col2,col3...) the new table
is populated with the content, which is the correct behaviour. 
Trouble is that I prefer quoting column names in case they have more
words then one.
Same problem happened with my 'add column' function but I was able to
fix that selecting *  as opposed to $columns for populating the
temp table. 
I am pretty sure this is not sqlite behavior in console.
Any help will be appreciated, thanks.
This extension is new and probably still has bugs and undocumented features but
I've used sqlite in other applications and it kicks ass, for most web applications
anything bigger is overkill.



Regards, Andu Novac

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] upgrading mySQL remotely

2003-08-31 Thread andu
On Sun, 31 Aug 2003 22:14:39 +0100
"John Ryan" <[EMAIL PROTECTED]> wrote:

> i need to upgrade to mysql 4 to avail of UNION, so im just downloading
> the 9MB RPM on dial-up, uploading it to my remote server and then can
> i do the installation from the telnet??

Better telnet into your server and wget the rpm directly there, then
install it.

> 
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
> 


-- 
Regards, Andu Novac

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] sqlite functions

2003-08-24 Thread andu
The function sqlite_fetch_all() mentioned in the changelog of version
1.0 of the extension is not documented in php docs.
I'd like to know what is the diference between sqlite_fetch_all() and
sqlite_array_query() about which the docs say that "[it] is best suited
to queries returning 45 rows or less. If you have more data than that,
it is recommended that you write your scripts to use
sqlite_unbuffered_query() instead for more optimal performance."
Does sqlite_fetch_all() have the same restriction? Is it the recommended
function for large amounts of data as sqlite_unbuffered_query()?
TIA


Regards, Andu Novac

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php