[PHP] [PHP4] class overload and ref to objects

2004-08-11 Thread Alessandro Vitale
return true; } else return false; } } ?> ---- *** Alessandro Vitale Jr. Software Engineer Tiscali International Network Spa +39 070 4601678 [EMAIL PROTECTED] *

[PHP] SNMP traps generation

2004-07-16 Thread Alessandro Vitale
Hi all, does anybody know any good library (class|script) for generating SNMP traps wirtten in PHP? thanks in advance, A. *** Alessandro Vitale Jr. Software Engineer Tiscali International Network Spa +39 070 4601678 [EMAIL PROTECTED

[PHP] R: [PHP] MYSQL Query results in pages

2004-06-25 Thread Alessandro Vitale
Here is a nice trick guys... if you want to page the result of this query : SELECT * FROM user; turn it into this one: SELECT SQL_CALC_FOUND_ROWS * FROM user LIMIT $offset,$limit; so in the end all you have to do is to perform one single query and even before fetching the rows you can call the

[PHP] R: [PHP] Holding links in a database

2004-06-24 Thread Alessandro Vitale
I'd like to apply! A. -Messaggio originale- Da: Jay Blanchard [mailto:[EMAIL PROTECTED] Inviato: giovedi 24 giugno 2004 14.00 A: [EMAIL PROTECTED]; Shaun Cc: [EMAIL PROTECTED] Oggetto: RE: [PHP] Holding links in a database [snip] Quoting Jay Blanchard <[EMAIL PROTECTED]>: > [snip] > I

[PHP] R: [PHP] query-apache2.0.49 installation

2004-06-01 Thread Alessandro Vitale
check apache server version from the test page. depending on your system, you may have another web server already running. if you really wish to install and use version 2.0.49 make sure the installed server is not conflicting with another one. cheers, A. -Messaggio originale- Da: rohit m

[PHP] R: [PHP] multiple checkbox help

2004-05-31 Thread Alessandro Vitale
I usually use this approach: . . --- foreach($_REQUEST['myName'] as $id => $value) { if($value == "CHECKED") array_push($idArray, $id); } if something is not clear, let me know cheers, A. -Messaggio originale- Da: Bob Lockie [mailto:[EMAIL PROTECTED] Inviato: l

[PHP] R: [PHP] Reading from XML file

2004-05-25 Thread Alessandro Vitale
I had a similar problem on my system too. In my case I fixed the problem simply outputting some information during the processing (I would recommend a process bar or something like that). The process itself was correct anyway, but doing that I was getting the expected behaviour from the browser: sh

[PHP] R: [PHP] variable passing using URL

2004-05-14 Thread Alessandro Vitale
in the html link you should set correctly the target window. Try using something like this: go to my site main_window is the name of the window as assigned in the frameset declaration. cheers, A. -Messaggio originale- Da: gowthaman ramasamy [mailto:[EMAIL PROTECTED] Inviato: venerdì 14

[PHP] tracking users

2004-05-14 Thread Alessandro Vitale
. /*** * Alessandro Vitale * Software Engineer * Tiscali International Network * [EMAIL PROTECTED] / -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] R: R: [PHP] Get "nice" variables from POST

2004-03-12 Thread Alessandro Vitale
;t work. $query = "SELECT * FROM user WHERE user_id = '$_POST['user_id']}'"; But you use brackets and it works.. Why do you use brackets ? $query = "SELECT * FROM user WHERE user_id = ${_POST['user_id']}"; >From: "Alessandro Vitale"

[PHP] R: [PHP] Get "nice" variables from POST

2004-03-11 Thread Alessandro Vitale
hi, why don't you simple use the $_POST vars? they are already available to you, so why you should copy them? example: function show_function() { $query = "SELECT * FROM user WHERE user_id = ${_POST['user_id']}"; } at the same time: - you save a lot of time ( you don't need to write

[PHP] pager related issue

2004-02-26 Thread Alessandro Vitale
I am working on a pager class that relies on a standard statement like: select * from my_table limit $offset, $limit As a feature of my pager class, I would like to display the total number of pages (each one of $limit rows) to display and the current page number. Does anybody use any clever tri

[PHP] R: [PHP][MySQL] FAKE DUPLICATE ROW

2004-02-20 Thread Alessandro Vitale
you are an angel, thanks for your great suggestion. cheers alessandro -Messaggio originale- Da: Richard Davey [mailto:[EMAIL PROTECTED] Inviato: venerdi 20 febbraio 2004 14.40 A: [EMAIL PROTECTED] Oggetto: Re: [PHP][MySQL] FAKE DUPLICATE ROW Hello Alessandro, Friday, February 20, 2004

[PHP][MySQL] FAKE DUPLICATE ROW

2004-02-20 Thread Alessandro Vitale
I have this table on my MYSQL 4.0.16 : CREATE TABLE `pls_in_row` ( `row_id` int(11) NOT NULL auto_increment, `pls_id` int(11) default NULL, `code` int(20) default NULL, `description` varchar(255) default NULL, `valid_from` date default NULL, PRIMARY KEY (`row_id`), UNIQUE KEY `pls_r

[PHP] R: [PHP] SQL Query Not Kosher?

2004-02-03 Thread Alessandro Vitale
try removing curly braces as follows: $query = mysql_query("UPDATE stories SET status='approved' WHERE story_id={$id}"); | | | \/ $query = mysql_query("UPDATE stories SET status='approved' WHERE story_id=$id"); or $query = mysql_query("UPDATE stories SET status='approved' WHERE story_

[PHP] R: [PHP][PEAR] PEAR::DB_Common::nextId()

2004-01-15 Thread Alessandro Vitale
esn't work perfectly but is ok. cheers alessandro -Messaggio originale- Da: Rory McKinley [mailto:[EMAIL PROTECTED] Inviato: giovedi 15 gennaio 2004 8.06 A: Alessandro Vitale; [EMAIL PROTECTED] Oggetto: Re: [PHP][PEAR] PEAR::DB_Common::nextId() On 14 Jan 2004 at 18:12, Alessandro V

[PHP][PEAR] PEAR::DB_Common::nextId()

2004-01-14 Thread Alessandro Vitale
I would like to get the last insert id... anyone has some experience in using the PEAR::DB_Common::nextId() ? any suggestion would be very much appreciated. alessandro -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] PEAR - Auth

2003-12-10 Thread Alessandro Vitale
Hi guys, I'd like to use one of the auth classes from pear. Any suggestion for the best one? cheers alessandro -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] R: [PHP] Handling Database errors in php

2003-12-05 Thread Alessandro Vitale
I am not sure if this could match you requirements but I often use this pattern: "INSERT IGNORE... SET VAR=0" "UPDATE..." the first query will do the insert if not present a record with a same unique index key the second will be redundand if the first succeed and will do the job if the first fail

[PHP] R: [PHP] mailing multilple addresses...?

2003-11-19 Thread Alessandro Vitale
try this: if ($action == 'send') { $fimail = explode(",", $list); $count = count($fimail); $show = "Users that have been mailed:"; $i = 1; while ($count > $i) { mail($fimail[$i], "Subject", $message, $headers); $show .= "$fimail"; $i++; }