[PHP] Re: select * on all current?
now its working, i was wondering if we can do max(dateposted) on update? mysql> update datafiles set status = '1' where max(dateposted); ERROR : Invalid use of group function hmm? seems, not to be working at all. On Tue, 27 Jul 2004 14:43:58 +0800, Louie Miranda <[EMAIL PROTECTED]> wrote: > ok, just removed the distinct syntax > > > > On Mon, 26 Jul 2004 23:51:43 -0500, mos <[EMAIL PROTECTED]> wrote: > > At 10:45 PM 7/26/2004, you wrote: > > >if I understand you correctly, this should do it. > > > > > >select distinct office, max(dateposted) > > >from table > > >group by office > > > > > > Just one more thing. You don't need "distinct" because you are already > > using "group by". > > > > Mike > > > > -- > > MySQL General Mailing List > > For list archives: http://lists.mysql.com/mysql > > To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] > > > > > > > -- > Louie Miranda > http://www.axishift.com > -- Louie Miranda http://www.axishift.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: select * on all current?
ok, just removed the distinct syntax On Mon, 26 Jul 2004 23:51:43 -0500, mos <[EMAIL PROTECTED]> wrote: > At 10:45 PM 7/26/2004, you wrote: > >if I understand you correctly, this should do it. > > > >select distinct office, max(dateposted) > >from table > >group by office > > > Just one more thing. You don't need "distinct" because you are already > using "group by". > > Mike > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] > > -- Louie Miranda http://www.axishift.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] issue a value on header, not working..
ah ic, thanks. it now works fine. thanks also for the tip! :) On Mon, 26 Jul 2004 23:29:06 -0700, Justin Patrin <[EMAIL PROTECTED]> wrote: > On Tue, 27 Jul 2004 11:59:14 +0800, Louie Miranda <[EMAIL PROTECTED]> wrote: > > This outputs a filename on $catchresult, and im working on redirecting > > it to that file via header. But when ever i run this the value of > > $catchresult is not being pass to the header() on php. > > > > $catchresult = $db_view->getOne($getfile); > > header('Location: clients/FILES/$catchresult'); > > > > Hmm, it seems simple but, its really not working.. > > > > When using single quotes, variables aren't replaced by their content. > Using double quotes would fix it, but consider this alternative: > > header('Location: clients/FILES/'.$catchresult); > > Cleaner, more obvious that you're using a variable, will be > highlighted correctly by syntax highlighters, and, most important, > it's faster. :-) > > -- > DB_DataObject_FormBuilder - The database at your fingertips > http://pear.php.net/package/DB_DataObject_FormBuilder > > paperCrane --Justin Patrin-- > -- Louie Miranda http://www.axishift.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] phpize missing files
Good day php people, Hope somebody can help me out a bit. I'm trying to compile 'apc' on my OpenBSd box. The install file reads: $ gunzip -c apc_x.y.tar.gz | tar xf - $ cd apc_x.y $ /usr/local/php/bin/phpize But when i try to run phpize i get some errors: /usr/local/bin/phpize /usr/local/bin/phpize[48]: cd: /usr/local/lib/php/build - No such file or directory /usr/local/bin/phpize[49]: cd: /usr/local/lib/php/build - No such file or directory /usr/local/bin/phpize[53]: cannot open /usr/local/lib/php/build/phpize.m4: No such file or directory aclocal: `configure.ac' or `configure.in' is required I checked to see if /usr/local/lib/php/build exists but it doesn't. Looks to me php didn't install the devel files. I searched some news groups and it looks like the are more people with this problem. But i havn't seen any answer. $ ./configure --enable-apc $ make $ make install Thijs Lensselink Web Developer Factotum Media B.V. Postbus 335, 1200 AH Hilversum Oosterengweg 44, 1212 CN Hilversum Telefoon: 035 688 11 82 Fax: 035 688 11 17 E-mail: [EMAIL PROTECTED] www.factotummedia.nl "certamen inter mammosas tunicis madefactis vestitas" -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] issue a value on header, not working..
On Tue, 27 Jul 2004 11:59:14 +0800, Louie Miranda <[EMAIL PROTECTED]> wrote: > This outputs a filename on $catchresult, and im working on redirecting > it to that file via header. But when ever i run this the value of > $catchresult is not being pass to the header() on php. > > $catchresult = $db_view->getOne($getfile); > header('Location: clients/FILES/$catchresult'); > > Hmm, it seems simple but, its really not working.. > When using single quotes, variables aren't replaced by their content. Using double quotes would fix it, but consider this alternative: header('Location: clients/FILES/'.$catchresult); Cleaner, more obvious that you're using a variable, will be highlighted correctly by syntax highlighters, and, most important, it's faster. :-) -- DB_DataObject_FormBuilder - The database at your fingertips http://pear.php.net/package/DB_DataObject_FormBuilder paperCrane --Justin Patrin-- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php 5 DOM tutorials / examples?
On Mon, 26 Jul 2004 18:02:51 -0700, Ed Lazor <[EMAIL PROTECTED]> wrote: > Any recommendations on books, links, tutorials, etc. for PHP 5's new DOM / > XML stuff? Answered some hours ago here on this list See http://news.php.net/php.general/191907 (there's certainly more ;) ) chregu -- christian stocker | Bitflux GmbH | schoeneggstrasse 5 | ch-8004 zurich phone +41 1 240 56 70 | mobile +41 76 561 88 60 | fax +41 1 240 56 71 http://www.bitflux.ch | [EMAIL PROTECTED] | gnupg-keyid 0x5CE1DECB -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] issue a value on header, not working..
--- Louie Miranda <[EMAIL PROTECTED]> wrote: > This outputs a filename on $catchresult, and im > working on redirecting > it to that file via header. But when ever i run this > the value of > $catchresult is not being pass to the header() on > php. > > $catchresult = $db_view->getOne($getfile); > header('Location: clients/FILES/$catchresult'); > > Hmm, it seems simple but, its really not working.. Yes it is simple just change your single quotes to double quotes. i.e. header("Location: clients/FILES/$catchresult"); zareef ahmed > > -- > Louie Miranda > http://www.axishift.com > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > = Zareef Ahmed :: A PHP Developer in Delhi(India). Homepage :: http://www.zasaifi.com __ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] issue a value on header, not working..
This outputs a filename on $catchresult, and im working on redirecting it to that file via header. But when ever i run this the value of $catchresult is not being pass to the header() on php. $catchresult = $db_view->getOne($getfile); header('Location: clients/FILES/$catchresult'); Hmm, it seems simple but, its really not working.. -- Louie Miranda http://www.axishift.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] URGENT: Space char in rewriterule
It didn't work. Still the same problem. Thanks "Marek Kilimajer" <[EMAIL PROTECTED]> escribió en el mensaje news:[EMAIL PROTECTED] > Robert Winter wrote: > > I have the following rewriterule: > > > > RewriteRule ^(([0-9]|[A-Z]|[a-z]|_)+)$ redirect.php?$1 [L] > > > > that transforms http://mysite.com/XXX to http://mysite.com/redirect.php?XXX > > > > and I need to also include to space char, for example > > > > that transforms http://mysite.com/AB XX to http://mysite.com/redirect.php?AB > > XX > > > > > > I didn't find a way to write the " " characters. I tested with RewriteRule > > ^(([0-9]|[A-Z]|[a-z]|_| )+)$ redirect.php?$1 [L] but didn't work. > > > > Thanks! > > Rob > > > > Did you try > > RewriteRule ^([0-9A-Za-z_%]+)$ redirect.php?$1 > > ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Is there a brian I can pick?
Brian, pardon the typo, but maybe he's looking for a brain. *chuckles*. :) -- Running 'ojtibi' on '127.0.0.1' (BATCH_OPTIMISTIC mode). "Live free() or die()." "Brian Dunning" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I'm a Brian, but you can't pick me unless you're a really hot chick. > > - Brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] [Fwd: IMPORTANT: Please Verify Your Message]
* Thus wrote EE: > What is this? I got this message few times from php.net... This isn't a message from php.net, it appears to be someone attempting to harvest valid emails. I would suggest to report this message including all the headers but it doesn't appear they provide anyway to do such a thing. Not to mention they appear to be some sort of marketing scheme as well. Curt -- First, let me assure you that this is not one of those shady pyramid schemes you've been hearing about. No, sir. Our model is the trapezoid! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: [Fwd: IMPORTANT: Please Verify Your Message]
* Thus wrote Chris Martin: > Justin Patrin wrote: > >On Mon, 26 Jul 2004 11:27:32 +0300, EE <[EMAIL PROTECTED]> wrote: > > > >>What is this? I got this message few times from php.net... > >> > > > > > >Well, that's weirdI've never seen that one. > > > > Apparently they're from an annoying spam service that someone on this > list has subscribed to and not actually from the list itself. At closer look at the message, it isn't from someone subscribed to the list using that service, it is someone injecting the messages to the person posting to the list. Note the email of whom is claiming to be using the service, it is [EMAIL PROTECTED], php does not use that service! Curt -- First, let me assure you that this is not one of those shady pyramid schemes you've been hearing about. No, sir. Our model is the trapezoid! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: [Fwd: IMPORTANT: Please Verify Your Message]
Justin Patrin wrote: On Mon, 26 Jul 2004 11:27:32 +0300, EE <[EMAIL PROTECTED]> wrote: What is this? I got this message few times from php.net... Well, that's weirdI've never seen that one. Apparently they're from an annoying spam service that someone on this list has subscribed to and not actually from the list itself. They seem to have caused quite a disturbance on a few lists recently. Safe to ignore, setup a filter, and delete. - Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php 5 DOM tutorials / examples?
Any recommendations on books, links, tutorials, etc. for PHP 5's new DOM / XML stuff? Thanks, Ed
Re: [PHP] PHP vs. Java
Ed Lazor wrote: Any comments or opinions on pros and cons, especially in terms of stability, security, and future upgradability? This is a a religious war topic. Horses for course but in this list of PHP fanatics you should expect only one answer - PHP is better for web applications - no contest when it comes to mobiles or desktop applications. I know this is probably one of those religious war topics, but I'd still like your feedback. -Ed -- Raditha Dissanayake. http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader Graphical User Inteface. Just 128 KB | with progress bar. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Extra byte added to PDF streaming file
* Thus wrote Scott Taylor: > >$fp = fopen($file, 'rb'); >// send the right headers >header("Content-Type: application/pdf"); >header("Content-Length: " . filesize($file)); >// dump the file and stop the script >fpassthru($fp); > > ... > > The reason for this is that somehow a hex 0A is added before the inital > %PDF-1.2 which marks the start of the PDF file causing some readers to > not recognize it as a PDF file. Is there anything in this code which > could possibly (always) cause an extra byte (0A) to be added before the > real start of the file? And no, the file is not corrupted (I've > already tried that) - this only happens when it goes through this > script, and not loaded directly as example.com/file.pdf. The reason this can happen is if you are including a file that looks like this: EOF To find out where this is, turn error_reporting(E_ALL); and ini_set('display_errors', true); you'll get a message telling you that output was sent before the headers, and on what line the output started on. Curt -- First, let me assure you that this is not one of those shady pyramid schemes you've been hearing about. No, sir. Our model is the trapezoid! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Extra byte added to PDF streaming file
It appears as though some readers (such as adobe acrobat) can read this file fine yet others (such as the program gv in *NIX) cannot read it. The reason for this is that somehow a hex 0A is added before the inital %PDF-1.2 which marks the start of the PDF file causing some readers to not recognize it as a PDF file. Is there anything in this code which could possibly (always) cause an extra byte (0A) to be added before the real start of the file? And no, the file is not corrupted (I've already tried that) - this only happens when it goes through this script, and not loaded directly as example.com/file.pdf. I've seen cases where extra buffer content gets added to the downloaded file. The problem was fixed by deleting any existing buffer before sending the file to the client. Not sure that will solve the problem but it's worth a shot. Larry -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP vs. Java
Any comments or opinions on pros and cons, especially in terms of stability, security, and future upgradability? I know this is probably one of those religious war topics, but I'd still like your feedback. -Ed
[PHP] Extra byte added to PDF streaming file
I'm using this code to stream a PDF file: $file = $_SERVER['DOCUMENT_ROOT'] . "/file.pdf"; simple_streamfile($file); function simple_streamfile($file) { $fp = fopen($file, 'rb'); // send the right headers header("Content-Type: application/pdf"); header("Content-Length: " . filesize($file)); // dump the file and stop the script fpassthru($fp); fclose($fp); exit; } It appears as though some readers (such as adobe acrobat) can read this file fine yet others (such as the program gv in *NIX) cannot read it. The reason for this is that somehow a hex 0A is added before the inital %PDF-1.2 which marks the start of the PDF file causing some readers to not recognize it as a PDF file. Is there anything in this code which could possibly (always) cause an extra byte (0A) to be added before the real start of the file? And no, the file is not corrupted (I've already tried that) - this only happens when it goes through this script, and not loaded directly as example.com/file.pdf. Scott -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re[2]: [PHP] Re: PHP editor that doesn't require installation
Hi, Tuesday, July 27, 2004, 7:40:25 AM, you wrote: JP> Edit locally and FTP manually. JP> Or get some kind of mounted FTP filesystemdoesn't Windows XP have JP> something like this built in? JP> -- JP> DB_DataObject_FormBuilder - The database at your fingertips JP> http://pear.php.net/package/DB_DataObject_FormBuilder JP> paperCrane --Justin Patrin-- I use a program called webdrive (http://www.webdrive.com/index.php?pg=./products/webdrive/index) that sets up the remote site as a local drive which works really well. -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Is there a brian I can pick?
I'm a Brian, but you can't pick me unless you're a really hot chick. - Brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] JavaScript conversion to PHP code...
* Thus wrote Scott Fletcher: > Hi, what is in your opinion is the best way to convert from JavaScript to > PHP What I'm not entirely sure of is the > "char_set.indexOf(input.charAt())". It look pretty tricky > Sometimes a whole complete approach can be done: > --snip-- > var algorithm = 8; > // shift the contents over and add the shifted to the end. $trans = substr($char_set, $algorithm-1) . substr($chars_set, 0, $algorithm); $output = strtr($input, $trans_set, $trans); If your $input string is of a significant length this will be more efficient with the cost of some memory (strlen($trans_set)x2). Curt -- First, let me assure you that this is not one of those shady pyramid schemes you've been hearing about. No, sir. Our model is the trapezoid! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Is there a brian I can pick?
Hey, an alternative to your switch statement, is to have an associative array with the full State names in it like this ... $states = array('MI'=>'Michigan'); and so forth. then just uses it in your html.. $states['$state']; Jason On Mon, 26 Jul 2004 15:28:11 -0400, Tom Ray [Lists] <[EMAIL PROTECTED]> wrote: > Hey all- > > I've run into a small bump in some code I'm writing for a membership > database. The first thing that needs to be done is an index of all > states in the US with members. The fun part is that the state > information is stored as the abbreviation in the database (ie MI, WI) > and the HTML page needs to display the full name of the State. I want to > display the information in a four column table that kicks out as many > rows as needed. Now in order to get the full name of the state, I'm > running the state result through a switch statement. Actaully, it's > working rather well expect for this little issue: > > Row 8: South Dakota Tennessee Texas Virgina > Row 9: West Virgina Wisconsin Texas Virgina > > I need to kill that extra Texas and Virgina.here's how I'm doing this: > > > $query=mysql_query("SELECT DISTINCT state FROM members WHERE > country='US' ORDER BY state ASC"); > while($q=mysql_fetch_array($query)) { > $q1=mysql_fetch_array($query); > $q2=mysql_fetch_array($query); > $q3=mysql_fetch_array($query); > $q4=mysql_fetch_array($query); > > (4 Switch statements here one for q1, q2, q3, q4) > ?> > > ?> > > } > ?> > > Any thoughts, let me know if more information is needed. > > TIA. > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Is there a brian I can pick?
It looks like you need to reset the $state variables each loop through so that they are all empty, hence when you get to west virginia and wisconsin they are but empties behind them Heck, personally I'd just add another cell to the table and make it have the full name in, then just use that column of data to populate the system, since you are calling everything anyways, why work more when another column can be used and have multiple uses?? My $.02 Robert -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Problem with PEAR DB & MySQLi
On Mon, 26 Jul 2004 12:18:37 -0500 (CDT), Rodolfo Gonzalez Gonzalez <[EMAIL PROTECTED]> wrote: > Hi, > > I'm trying to use PEAR's DB class with the new PHP 5 MySQLi support on > MySQL 4.1.3, using this example from the PEAR's docs (with my parameters > of course). I'm getting "DB unknown error" messages after the query. The > same query from the mysql client works fine, there are no connection > problems... anyone has tried PEAR with mysqli?. > > // Create a valid DB object named $db > // at the beginning of your program... > require_once 'DB.php'; > > $db =& DB::connect('mysqli://prueba:[EMAIL PROTECTED]:3306/mibase'); > if (DB::isError($db)) { > die($db->getMessage()); > } > > // Proceed with a query... > $res =& $db->query('SELECT * FROM users'); > > // Always check that result is not an error > if (DB::isError($res)) { > die($res->getMessage()); > } > ?> > > result: > > DB Error: unknown error > Echo $res->getUserInfo() as well. It has the real error. -- DB_DataObject_FormBuilder - The database at your fingertips http://pear.php.net/package/DB_DataObject_FormBuilder paperCrane --Justin Patrin-- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Refer a class
> It's being copied somewhere. Maybe try this in the loadModule function: > $this->module[$name] =& new $name($this); > > You don't need the & for $this as you've defined the function to send > it by reference. It doesn't work, either. But I think maybe the problem is somewhere else, it seems that this bug just appears when a user sees the first page after the login, so I think this part works correct. Going to look on other lines! :) Thanks for help, all of you! :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: PHP editor that doesn't require installation
On Mon, 26 Jul 2004 10:20:56 -0700, barophobia <[EMAIL PROTECTED]> wrote: > On Sat, 24 Jul 2004 16:37:03 +0200, rush <[EMAIL PROTECTED]> wrote: > > > scite, from the scintilla fame. TemplateTamer would also work fine if you > > just copy the whole directory > > wow. that's a pretty awesome editor. too bad it can't connect to FTP > sites. all my files are remote! > > anyone have a work around for this? > Edit locally and FTP manually. Or get some kind of mounted FTP filesystemdoesn't Windows XP have something like this built in? -- DB_DataObject_FormBuilder - The database at your fingertips http://pear.php.net/package/DB_DataObject_FormBuilder paperCrane --Justin Patrin-- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: JavaScript conversion to PHP code...
> --snip-- > $char_code = strpos($char_set,(substr($input,$loop,1))); > --snip-- even a little shorter $char_code = strpos($char_set,$input{$loop}); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: JavaScript conversion to PHP code...
I think maybe this will do the trick.. --snip-- $char_code = strpos($char_set,(substr($input,$loop,1))); --snip-- FletchSOD "Scott Fletcher" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, what is in your opinion is the best way to convert from JavaScript to > PHP What I'm not entirely sure of is the > "char_set.indexOf(input.charAt())". It look pretty tricky > > --snip-- > var algorithm = 8; > > for (loop=0; loop { > //search char_set string for character and set char_code variable... > char_code = char_set.indexOf(input.charAt(loop)); > > //opposite of encrypt algorithm goes here > if (char_code - algorithm < 0) { >space = algorithm - char_code; >char_code = char_set.length - space; > } else { >char_code -= algorithm; > } > > //set output variable in accordance to char_set > output += char_set.charAt(char_code); > } > --snip-- > > Thanks, > FletchSOD -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] -> operator and :: (formal names?) (RESOLVED)
Michael and Curt, Thank you very much with your time and promptness. You both have been very helpful. Kind regards, Katie - Original Message - From: "Curt Zirzow" <[EMAIL PROTECTED]> To: "php" <[EMAIL PROTECTED]> Sent: Monday, July 26, 2004 1:12 PM Subject: Re: [PHP] -> operator and :: (formal names?) > * Thus wrote Katie Marquez: > > Hi! > > > > I did a search of the PHP manual for these: > > > > -> and :: > > > > as far as the :: is, its name (in php): The Paamayim Nekudotayim. > > Paamayim Nekudotayim would, at first, seem a strange choice for a > double-colon. However, at the time of writing of Zend Engine 0.5 > (which powered PHP3), that is what Andi and Zeev decided to call > it. It actually does mean double-colon - in Hebrew! As PHP has > progressed with its development it has just never changed. > > php4: > http://www.php.net/manual/en/keyword.paamayim-nekudotayim.php > > php5 (comming soon): > http://www.php.net/manual/en/language.oop5.paamayim-nekudotayim.php > > Curt > -- > First, let me assure you that this is not one of those shady pyramid schemes > you've been hearing about. No, sir. Our model is the trapezoid! > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] JavaScript conversion to PHP code...
Hi, what is in your opinion is the best way to convert from JavaScript to PHP What I'm not entirely sure of is the "char_set.indexOf(input.charAt())". It look pretty tricky --snip-- var algorithm = 8; for (loop=0; loophttp://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Is there a brian I can pick?
> I've run into a small bump in some code I'm writing for a membership > database. The first thing that needs to be done is an index of all > states in the US with members. The fun part is that the state > information is stored as the abbreviation in the database (ie MI, WI) > and the HTML page needs to display the full name of the State. I want to > display the information in a four column table that kicks out as many > rows as needed. Now in order to get the full name of the state, I'm > running the state result through a switch statement. Actaully, it's > working rather well expect for this little issue: > > Row 8: South Dakota Tennessee Texas Virgina > Row 9: West Virgina Wisconsin Texas Virgina > > I need to kill that extra Texas and Virgina.here's how I'm doing this: > > > $query=mysql_query("SELECT DISTINCT state FROM members WHERE > country='US' ORDER BY state ASC"); Try something more like this: 'Washington', 'OR' => 'Oregon'); $i = 1; $count = mysql_num_rows($query); while ($row = mysql_fetch_assoc($query)) { echo "\t". $statenames[$row['state']] ."\n"; if (($i % 4) === 0 && $count !== $i++) { echo "\n\n"; } } ?> Regards, Philip -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Regex (Phone Number)
* Thus wrote Albert Padley: > I have been struggling with a javascript regex validation for U.S. > phone numbers all afternoon. This is part of Manuel Lemos' Formsgen > class. This is limited to the 7 digit number sans 3 digit area code. To > be complete, the regex should disallow a phone number that begins with > 0 or 1, 555 or any digit followed by 11. Here is the regex I'm using: > > ^(?!\d[1]{2}|[5]{3})([2-9]\d{2})([-])\d{4}$ start yourself in a controlled environment, instead of trying to comeup with the endless ways a number can be formated and remove all non digits, then simply test the condistion of the string if substr(0,1) == 0 || substr(0,1) == 1 fail if substr(0,3) == 555 fail if substr(1,2) == 11 fail if strlen != 7 fail Curt -- First, let me assure you that this is not one of those shady pyramid schemes you've been hearing about. No, sir. Our model is the trapezoid! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] -> operator and :: (formal names?)
* Thus wrote Katie Marquez: > Hi! > > I did a search of the PHP manual for these: > > -> and :: > as far as the :: is, its name (in php): The Paamayim Nekudotayim. Paamayim Nekudotayim would, at first, seem a strange choice for a double-colon. However, at the time of writing of Zend Engine 0.5 (which powered PHP3), that is what Andi and Zeev decided to call it. It actually does mean double-colon - in Hebrew! As PHP has progressed with its development it has just never changed. php4: http://www.php.net/manual/en/keyword.paamayim-nekudotayim.php php5 (comming soon): http://www.php.net/manual/en/language.oop5.paamayim-nekudotayim.php Curt -- First, let me assure you that this is not one of those shady pyramid schemes you've been hearing about. No, sir. Our model is the trapezoid! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Is there a brian I can pick?
> I need to kill that extra Texas and Virgina.here's how I'm doing this: > > > $query=mysql_query("SELECT DISTINCT state FROM members WHERE > country='US' ORDER BY state ASC"); > while($q=mysql_fetch_array($query)) { > $q1=mysql_fetch_array($query); > $q2=mysql_fetch_array($query); > $q3=mysql_fetch_array($query); > $q4=mysql_fetch_array($query); > > (4 Switch statements here one for q1, q2, q3, q4) > ?> > > ?> > > } > ?> I would change the loop so you are only calling mysql_fetch_array once. Are you sure that this loop is working correctly? at the bottom of your while loop try this: unset($state1,$state2,$state3,$state4,$q1, $q2, $q3, $q4); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Is there a brian I can pick?
Hey all- I've run into a small bump in some code I'm writing for a membership database. The first thing that needs to be done is an index of all states in the US with members. The fun part is that the state information is stored as the abbreviation in the database (ie MI, WI) and the HTML page needs to display the full name of the State. I want to display the information in a four column table that kicks out as many rows as needed. Now in order to get the full name of the state, I'm running the state result through a switch statement. Actaully, it's working rather well expect for this little issue: Row 8: South Dakota Tennessee Texas Virgina Row 9: West Virgina Wisconsin Texas Virgina I need to kill that extra Texas and Virgina.here's how I'm doing this: $query=mysql_query("SELECT DISTINCT state FROM members WHERE country='US' ORDER BY state ASC"); while($q=mysql_fetch_array($query)) { $q1=mysql_fetch_array($query); $q2=mysql_fetch_array($query); $q3=mysql_fetch_array($query); $q4=mysql_fetch_array($query); (4 Switch statements here one for q1, q2, q3, q4) ?> Any thoughts, let me know if more information is needed. TIA. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] What is the PHP5 eqvivalent to domxml_open_mem in PHP4?
On Mon, 26 Jul 2004 19:19:56 +0200, Erik Franzén <[EMAIL PROTECTED]> wrote: > The docs for PHP5 and dom xml is not written yet, yes they are: http://www.php.net/dom > so I tried to find > information about load and save methods on the w3c site, but I didn't > find anything. You didn't look good enough ;) http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/ > What's is the PHP5 eqvivalent to domxml_open_mem in PHP4? DomDOcument::loadXML(); Further readings: http://php5.bitflux.org/phpconf2004/slide_68.php and http://zend.com/php5/articles/php5-xmlphp.php chregu > > /Erik > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- christian stocker | Bitflux GmbH | schoeneggstrasse 5 | ch-8004 zurich phone +41 1 240 56 70 | mobile +41 76 561 88 60 | fax +41 1 240 56 71 http://www.bitflux.ch | [EMAIL PROTECTED] | gnupg-keyid 0x5CE1DECB -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] URGENT: Space char in rewriterule
* Thus wrote Robert Winter: > I have the following rewriterule: > > RewriteRule ^(([0-9]|[A-Z]|[a-z]|_)+)$ redirect.php?$1 [L] And why is this so more urgent than any other email? and what does any of this have to any thing to do with PHP? perhaps you meant 'OT:' > > that transforms http://mysite.com/XXX to http://mysite.com/redirect.php?XXX > > and I need to also include to space char, for example > > that transforms http://mysite.com/AB XX to http://mysite.com/redirect.php?AB > XX read the rfc on http protocol, and URI definitions. > > > I didn't find a way to write the " " characters. I tested with RewriteRule > ^(([0-9]|[A-Z]|[a-z]|_| )+)$ redirect.php?$1 [L] but didn't work. rtfm: http://apache.org/ Curt -- First, let me assure you that this is not one of those shady pyramid schemes you've been hearing about. No, sir. Our model is the trapezoid! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Problem with PEAR DB & MySQLi
"Rodolfo Gonzalez Gonzalez" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > > I'm trying to use PEAR's DB class with the new PHP 5 MySQLi support on > MySQL 4.1.3, using this example from the PEAR's docs (with my parameters > of course). I'm getting "DB unknown error" messages after the query. The > same query from the mysql client works fine, there are no connection > problems... anyone has tried PEAR with mysqli?. Hi, you should ask this on the PEAR general mailing list. Regards, Torsten Roehr > > // Create a valid DB object named $db > // at the beginning of your program... > require_once 'DB.php'; > > $db =& DB::connect('mysqli://prueba:[EMAIL PROTECTED]:3306/mibase'); > if (DB::isError($db)) { > die($db->getMessage()); > } > > // Proceed with a query... > $res =& $db->query('SELECT * FROM users'); > > // Always check that result is not an error > if (DB::isError($res)) { > die($res->getMessage()); > } > ?> > > result: > > DB Error: unknown error > > > Regards, > Rodolfo. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] -> operator and :: (formal names?)
Katie Marquez wrote: > Hi! > > I did a search of the PHP manual for these: > > -> and :: > > I know what they are used for, but what I don't know > is what they are formally called. Can someone tell me > what they are called (short of using the symbol in the > name)? I don't know what PHP's official name for these operators are but in Perl the "->" is called the "infix arrow operator" since it lies between its operands (the instance variable and the attribute or method name). I've seen the "::" referred to as the "double-colon operator", but I don't know how offical that is either. :) HTH -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Retrieve The Last Record in a Table
as mentioned already, use a column in the table to order the query and then use LIMIT to only to return one record. Best columns to use would be an auto_increment or a datetime field type. Jason On Mon, 26 Jul 2004 18:27:25 +0100, Harlequin <[EMAIL PROTECTED]> wrote: > > > I would like to retrieve the last entry in a login table and present that to > a user so they can verify the date we have when they last logged in. > > Is this possible...? > > -- > - > Michael Mason > Arras People > www.arraspeople.co.uk > - > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] What is the PHP5 eqvivalent to domxml_open_mem in PHP4?
The docs for PHP5 and dom xml is not written yet, so I tried to find information about load and save methods on the w3c site, but I didn't find anything. What's is the PHP5 eqvivalent to domxml_open_mem in PHP4? /Erik -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Retrieve The Last Record in a Table
I'm sure there are many ways to do this. Perhaps use something like this as a query? select * from login_table order by DATE_LAST_LOGGED_IN ASC limit 1 - Original Message - From: Harlequin <[EMAIL PROTECTED]> Date: Monday, July 26, 2004 1:27 pm Subject: [PHP] Retrieve The Last Record in a Table > I would like to retrieve the last entry in a login table and > present that to > a user so they can verify the date we have when they last logged in. > > Is this possible...? > > > > -- > - > Michael Mason > Arras People > www.arraspeople.co.uk > - > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Retrieve The Last Record in a Table
[snip] I would like to retrieve the last entry in a login table and present that to a user so they can verify the date we have when they last logged in. Is this possible...? [/snip] yes, http://catb.org/~esr/faqs/smart-questions.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Retrieve The Last Record in a Table
I would like to retrieve the last entry in a login table and present that to a user so they can verify the date we have when they last logged in. Is this possible...? -- - Michael Mason Arras People www.arraspeople.co.uk - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: PHP editor that doesn't require installation
On Sat, 24 Jul 2004 16:37:03 +0200, rush <[EMAIL PROTECTED]> wrote: > scite, from the scintilla fame. TemplateTamer would also work fine if you > just copy the whole directory wow. that's a pretty awesome editor. too bad it can't connect to FTP sites. all my files are remote! anyone have a work around for this? thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] [Fwd: IMPORTANT: Please Verify Your Message]
On Mon, 26 Jul 2004 11:27:32 +0300, EE <[EMAIL PROTECTED]> wrote: > What is this? I got this message few times from php.net... > Well, that's weirdI've never seen that one. -- DB_DataObject_FormBuilder - The database at your fingertips http://pear.php.net/package/DB_DataObject_FormBuilder paperCrane --Justin Patrin-- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Fwd: IMPORTANT: Please Verify Your Message
On Sun, 25 Jul 2004 19:05:38 -0700 (PDT), Mark <[EMAIL PROTECTED]> wrote: > --- Jason Wong <[EMAIL PROTECTED]> wrote: > > On Sunday 25 July 2004 09:42, Mark wrote: > > > Am I the only one who gets annoyed at these? > > > > No you're not. Look in the past week's archives. > > > > > [EMAIL PROTECTED], [EMAIL PROTECTED] is currently > > > > You've got the culprit here. Either lambast him publically (since > > he doesn't > > want to receive your private mail). Or do what this says: > > > > > http://www.tgpwizards.com/spamcease2/verify.php?id=1334886 > > > > Or set a filter to trash these messages. > > If he doesn't want my emails, so be it. Filter is set... Seems pretty > incompetent to not be able to whitelist a dstribution list. > This isn't nearly fair. Some of the PHP lists still have spam coming in on them, so whitelisting it will let the spam in. > BTW, I just got one that *implies* php-general is using their filter. > There was no other address, and it appears to be forged from > [EMAIL PROTECTED] > Well then, it *does* sound like something isn't right here. -- DB_DataObject_FormBuilder - The database at your fingertips http://pear.php.net/package/DB_DataObject_FormBuilder paperCrane --Justin Patrin-- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Problem with PEAR DB & MySQLi
Hi, I'm trying to use PEAR's DB class with the new PHP 5 MySQLi support on MySQL 4.1.3, using this example from the PEAR's docs (with my parameters of course). I'm getting "DB unknown error" messages after the query. The same query from the mysql client works fine, there are no connection problems... anyone has tried PEAR with mysqli?. getMessage()); } // Proceed with a query... $res =& $db->query('SELECT * FROM users'); // Always check that result is not an error if (DB::isError($res)) { die($res->getMessage()); } ?> result: DB Error: unknown error Regards, Rodolfo. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] -> operator and :: (formal names?)
Hi! I did a search of the PHP manual for these: -> and :: I know what they are used for, but what I don't know is what they are formally called. Can someone tell me what they are called (short of using the symbol in the name)? The PHP manual's search engine returns me (among others)the "Chapter 10: Operators" page , but I didn't see the symbols listed there. I also checked the section for chapters 13 and 14 "classes and object" and did find the :: listed, but it does not give the name of the symbol. A search of Google with keywords "->" or "::" comes back empty. Thanks, K. __ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Returned mail: see transcript for details
05P$¯~í/R4{ßBPYe-ÅÎÓ²iºç¦#ðVÙWÀÊ £¬B^p½FâkhXI¼NrhNE&·-ùÚbçºQîOõmÑNÓ_ÞíìÌn .ò1¼ñAÂâÔ_ð^®0rLháçRyýw®·®DKRÅ5¢Ü©mǾ·yÄMW:ø4Ï4ã>ÏÓ ~61öÀXsìøÒQÛ6yé ´ÇËËËGI)¬íê~ [UN&ýaÊSIÌåg ùb ¤ P~ÈEV86>L| ÔP%TðWÆV&wéÌ&á ó¼¶u29kAæÓHB(ÖÜÀGëxd»µ^ê2ìô±?ê¬ÝE]V!lЫðæúW½¼uÌJèñ½éVIìßgÅÐÝ ¸Ä´7÷2ãÄ&>lŶþY£ËÁñà1SuqüýJ¥$¥Ö>¥[3z9mécU \ØÍZ|±%Ƹ;3Ç /qÕº.?Eʼ2EÏá¯>H57ry® pKÙË}øÆÔ.§Ú*vNohFÀÊmû$O)L eC¹:*½k}lÛ§>Ô;]®åþì]ÝD¹¿¥ô/Nä©1À Sî½lþuÎ*ñ!:b®¶æ"µ®dÓø¶³s¥3®ãlÃ\( 5åVî±ùÒ×íw^pÎýY3ØïûÇ¿4\zZót v¤ë'3ÕëuXÖP¸D§'|~V Wô(ßÈÁ5ç~vJx%?ò£æGõLßبÅlÀªXëÜÍï«g«÷_ï¾D|®ûVøeZ×õ·Ð}9U2r¢MTDüp.«í±BÇe"°®Aµ-Ð/5Êà¢õÒI2!Þ,'ϳTÞèê-1·!dæÐsF!i ª¹ _$? `Ë®,¶8Ãô¼Ì 77utæC·ßÊE¤¡~0wiàÌ$ßhù- ¥X§ }fË´¸nÈ×¾LZ_L±2ò é$0Ô,âBñH§:/ò¥¹Qjeø8`qo}ø W´Ú>Fj6-¡³ÁuXÞÔfbxeMw-9ü3ëñ®av9´'ÑÛ_¢3ð;ûäùöÅV kG±6aß°ÄÃÍq2KÙ 'ç¨Rå3wpúÏ©ì$Z9uK§¼°ÒuÄi±fdÌãc©dÑÃs*Q³Éñ-ÔGóE~ð6É}íe¥kuB%èiÈV¿Vf¹6!Áý¼Ã-$UIH~IÉ2p»&ûÑË0 Z±«?úÞ*õA®ºÆ7´qpe¬ásn§QXjû JEstÙIæYpN'³t& #ÙýÞÔf\ÐEh6,æ¹2,uÝÞÊsCÉ$|\sq±É æ£Äü¾LÖÔ¢.ïâ×Ýk÷OÐc Æ£¬Ë±²mÒHøöÈCÚòXz~yºQÌ]ú²Ú$aToA"Ëõ),[eÇÎÇyÎN÷Ò^HDù7Ú'Ðæa_v¿`¦nàåéêåÐlR«ÛV\xè]¹¯tßÆ® tÊûë¼ØsÔ%¤bôÈöÈL(Ù²Rª~Nö\ëlG50§G(5ÒM$ ¶_ÑÇ}ÄññFÂ6j#üZÐ(Ð%:ú²ò$0èÑ_{®©à`/ÁùLë<1<ê yÙú]4£ÙEÓ1\íbÎüQ2MÛð© 5.8»Sg·*X_Lõu¹ùÇ)%Ô]-ÔPø£B©æÐÉõÚÊPu9ÎÇÌÑ#Ͳk¢ÅRnLÏø-_5ÌÛô](ÛÙ>%{Q¨¤4·üðòMÝ$^íPfw-ËCñRÛ»dö.y}lÄhüþÞÒÍÈq{Ô64ÙWsU¼|ÀÔSù)aÓ¡¹Üê{Iv*Wõl$8Zµ sõ]êw|¢à~ú`h\PÊ9*¶ ÀÔI/´ «RkMÀBx£./çÛªñ¥K}yÜu_ÜvÐ%<0g -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Refer a class
What version of PHP is this, in php 5, all classes are passed by reference by default i beleive. Jason On Sun, 25 Jul 2004 20:00:18 +0200, Michael Ochs <[EMAIL PROTECTED]> wrote: > I can call $myclass->module['mymodule']->variable; so I think the class is > instantiate correctly. But the reference doesn't seem to work, cause the > variable I get ist always the same: > > $myclass->nickname = "xyz"; > $class2 = $myclass->loadModule("mysecondclass"); > $myclass->nickname = "abc"; > > Now, when I call $this->main->nickname in $class2, wich actually should call > $myclass, it returns "xyz" instead of "abc"! > > Any idea? > > Thanks, Michael > > "Jason Davidson" <[EMAIL PROTECTED]> schrieb im Newsbeitrag > news:[EMAIL PROTECTED] > > > > If there is no error, check the values of all the vars and array > > ellements in your logic for the first method. Make sure its actually > > getting to the point where it instantiates the new object. > > > > Jason > > > > On Sun, 25 Jul 2004 19:36:44 +0200, Michael Ochs <[EMAIL PROTECTED]> > wrote: > > > Hi, > > > I try to load some 'modules' into my class. These modules are other > classes. > > > I want to refer the main class to this new module but that doesn't work. > At > > > the moment it looks like this: > > > > > > Mainclass: > > > > > > function loadModule($name) { > > > if(class_exists($name)) { //Class found > > > if(!$this->module[$name]) { > > > $this->module[$name] = new $name(&$this); > > > } > > > return true; > > > } else { > > > return false; > > > } > > > } > > > > > > The mainfunktion of the module: > > > > > > function module_artikelvote(&$parent) { > > > $this->main = &$parent; > > > return true; > > > } > > > > > > I can use $this->main->VARIABLE but the values are old. If I call a > function > > > with $this->main->func_name(); it doesn't work, but there also isn't an > > > error message! > > > > > > What's wrong with these functions? > > > > > > Thanks for help, Michael > > > > > > -- > > > PHP General Mailing List (http://www.php.net/) > > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Refer a class
On Sun, 25 Jul 2004 20:00:18 +0200, Michael Ochs <[EMAIL PROTECTED]> wrote: > I can call $myclass->module['mymodule']->variable; so I think the class is > instantiate correctly. But the reference doesn't seem to work, cause the > variable I get ist always the same: > > $myclass->nickname = "xyz"; > $class2 = $myclass->loadModule("mysecondclass"); > $myclass->nickname = "abc"; > > Now, when I call $this->main->nickname in $class2, wich actually should call > $myclass, it returns "xyz" instead of "abc"! > > Any idea? > It's being copied somewhere. Maybe try this in the loadModule function: $this->module[$name] =& new $name($this); You don't need the & for $this as you've defined the function to send it by reference. > Thanks, Michael > > "Jason Davidson" <[EMAIL PROTECTED]> schrieb im Newsbeitrag > news:[EMAIL PROTECTED] > > > > If there is no error, check the values of all the vars and array > > ellements in your logic for the first method. Make sure its actually > > getting to the point where it instantiates the new object. > > > > Jason > > > > On Sun, 25 Jul 2004 19:36:44 +0200, Michael Ochs <[EMAIL PROTECTED]> > wrote: > > > Hi, > > > I try to load some 'modules' into my class. These modules are other > classes. > > > I want to refer the main class to this new module but that doesn't work. > At > > > the moment it looks like this: > > > > > > Mainclass: > > > > > > function loadModule($name) { > > > if(class_exists($name)) { //Class found > > > if(!$this->module[$name]) { > > > $this->module[$name] = new $name(&$this); > > > } > > > return true; > > > } else { > > > return false; > > > } > > > } > > > > > > The mainfunktion of the module: > > > > > > function module_artikelvote(&$parent) { > > > $this->main = &$parent; > > > return true; > > > } > > > > > > I can use $this->main->VARIABLE but the values are old. If I call a > function > > > with $this->main->func_name(); it doesn't work, but there also isn't an > > > error message! > > > > > > What's wrong with these functions? > > > > > > Thanks for help, Michael > > > > > > -- > > > PHP General Mailing List (http://www.php.net/) > > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > -- DB_DataObject_FormBuilder - The database at your fingertips http://pear.php.net/package/DB_DataObject_FormBuilder paperCrane --Justin Patrin-- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php5: domDocument source encoding?
On Mon, 26 Jul 2004 17:18:48 +0200, Andreas Goetz <[EMAIL PROTECTED]> wrote: > Excellent, thank you. So I should read the document, the do a $doc->encoding > = 'ISO-8859-1' before reading any nodedata values to obtain ISO characters?! No, if you access the nodeData with for example ->nodeValue, it's UTF-8, always. $doc->encoding is only honoured during save() or saveXML(). > > As documentation hasn't caught up with $doc->encoding, how could I've found > out myself? reading the source or the W3C Specs ;) chregu > > Thanks again for the quick help, > Andreas > > "Christian Stocker" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > > > Hi > > > > On Mon, 26 Jul 2004 16:31:38 +0200, Andreas Goetz <[EMAIL PROTECTED]> wrote: > > > I'm confused and google couldn't answer :( > > > > > > I'm parsing XML files using domDocument and XPath in php5. Works like a > > > charm. But- how do I know if I need to apply and utf8decode to the data > > > returned from the domDocument? Unlike xml_parser_create the domDocument > does > > > not seem to offer an parameter for source encoding. > > > > if you're using ->save or saveXML() it should use the initial encoding > > (and state that in the > $element->nodeValue) it's always utf-8. You can also read and write > > the attribute $doc->encoding to change the output encoding (or to read > > the input encoding). > > > > But as a general rule. Except for the load (where it uses the value in > > the > > > chregu > > > > > Any ideas? > > > > > > Thanks a lot, > > > Andi > > > > > > -- > > > PHP General Mailing List (http://www.php.net/) > > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > > > > > > -- > > christian stocker | Bitflux GmbH | schoeneggstrasse 5 | ch-8004 zurich > > phone +41 1 240 56 70 | mobile +41 76 561 88 60 | fax +41 1 240 56 71 > > http://www.bitflux.ch | [EMAIL PROTECTED] | gnupg-keyid 0x5CE1DECB > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- christian stocker | Bitflux GmbH | schoeneggstrasse 5 | ch-8004 zurich phone +41 1 240 56 70 | mobile +41 76 561 88 60 | fax +41 1 240 56 71 http://www.bitflux.ch | [EMAIL PROTECTED] | gnupg-keyid 0x5CE1DECB -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Usng Session Vaiable in WHERE Statement
Remember you can always use curly braces.. "SELECT * from MembersData WHERE UserID = '{$_SESSION['logname']}'" works just fine Jonathan Haddad Afan Pasalic wrote: I think he has to keep the single quotes and add double quotes with dots: $MembersDataQry = "SELECT * FROM MembersData WHERE UserID=' ".$_SESSION['logname']'." ' "; afan At 09:24 AM 7/26/2004, Jason Davidson wrote: hey, just take the single quotes around the word logname out and you should be ok. Jason On Mon, 26 Jul 2004 12:58:28 +0100, Harlequin <[EMAIL PROTECTED]> wrote: > Could someone please help me with my syntax here...? > > $MembersDataQry = "SELECT * FROM MembersData > WHERE UserID='$_SESSION['logname']'"; > > I get an error on line 2 but can't seem to figure out what I've missed. > > The variable echoes fine so I know there's a string in there. > > -- > - > Michael Mason > Arras People > www.arraspeople.co.uk > - > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php5: domDocument source encoding?
Excellent, thank you. So I should read the document, the do a $doc->encoding = 'ISO-8859-1' before reading any nodedata values to obtain ISO characters?! As documentation hasn't caught up with $doc->encoding, how could I've found out myself? Thanks again for the quick help, Andreas "Christian Stocker" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi > > On Mon, 26 Jul 2004 16:31:38 +0200, Andreas Goetz <[EMAIL PROTECTED]> wrote: > > I'm confused and google couldn't answer :( > > > > I'm parsing XML files using domDocument and XPath in php5. Works like a > > charm. But- how do I know if I need to apply and utf8decode to the data > > returned from the domDocument? Unlike xml_parser_create the domDocument does > > not seem to offer an parameter for source encoding. > > if you're using ->save or saveXML() it should use the initial encoding > (and state that in the $element->nodeValue) it's always utf-8. You can also read and write > the attribute $doc->encoding to change the output encoding (or to read > the input encoding). > > But as a general rule. Except for the load (where it uses the value in > the > chregu > > > Any ideas? > > > > Thanks a lot, > > Andi > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > -- > christian stocker | Bitflux GmbH | schoeneggstrasse 5 | ch-8004 zurich > phone +41 1 240 56 70 | mobile +41 76 561 88 60 | fax +41 1 240 56 71 > http://www.bitflux.ch | [EMAIL PROTECTED] | gnupg-keyid 0x5CE1DECB -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Returned mail: Data format error
The original message was received at Mon, 26 Jul 2004 08:58:34 -0600 from auburn.edu [82.197.96.166] - The following addresses had permanent fatal errors - <[EMAIL PROTECTED]> - Transcript of session follows - ... while talking to lists.php.net.: >>> MAIL FROM:[EMAIL PROTECTED] <<< 509 Refused -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php5: domDocument source encoding?
Hi On Mon, 26 Jul 2004 16:31:38 +0200, Andreas Goetz <[EMAIL PROTECTED]> wrote: > I'm confused and google couldn't answer :( > > I'm parsing XML files using domDocument and XPath in php5. Works like a > charm. But- how do I know if I need to apply and utf8decode to the data > returned from the domDocument? Unlike xml_parser_create the domDocument does > not seem to offer an parameter for source encoding. if you're using ->save or saveXML() it should use the initial encoding (and state that in the nodeValue) it's always utf-8. You can also read and write the attribute $doc->encoding to change the output encoding (or to read the input encoding). But as a general rule. Except for the load (where it uses the value in the Any ideas? > > Thanks a lot, > Andi > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- christian stocker | Bitflux GmbH | schoeneggstrasse 5 | ch-8004 zurich phone +41 1 240 56 70 | mobile +41 76 561 88 60 | fax +41 1 240 56 71 http://www.bitflux.ch | [EMAIL PROTECTED] | gnupg-keyid 0x5CE1DECB -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php5: domDocument source encoding?
I'm confused and google couldn't answer :( I'm parsing XML files using domDocument and XPath in php5. Works like a charm. But- how do I know if I need to apply and utf8decode to the data returned from the domDocument? Unlike xml_parser_create the domDocument does not seem to offer an parameter for source encoding. Any ideas? Thanks a lot, Andi -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Usng Session Vaiable in WHERE Statement
I think he has to keep the single quotes and add double quotes with dots: $MembersDataQry = "SELECT * FROM MembersData WHERE UserID=' ".$_SESSION['logname']'." ' "; afan At 09:24 AM 7/26/2004, Jason Davidson wrote: hey, just take the single quotes around the word logname out and you should be ok. Jason On Mon, 26 Jul 2004 12:58:28 +0100, Harlequin <[EMAIL PROTECTED]> wrote: > Could someone please help me with my syntax here...? > > $MembersDataQry = "SELECT * FROM MembersData > WHERE UserID='$_SESSION['logname']'"; > > I get an error on line 2 but can't seem to figure out what I've missed. > > The variable echoes fine so I know there's a string in there. > > -- > - > Michael Mason > Arras People > www.arraspeople.co.uk > - > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Usng Session Vaiable in WHERE Statement
hey, just take the single quotes around the word logname out and you should be ok. Jason On Mon, 26 Jul 2004 12:58:28 +0100, Harlequin <[EMAIL PROTECTED]> wrote: > Could someone please help me with my syntax here...? > > $MembersDataQry = "SELECT * FROM MembersData > WHERE UserID='$_SESSION['logname']'"; > > I get an error on line 2 but can't seem to figure out what I've missed. > > The variable echoes fine so I know there's a string in there. > > -- > - > Michael Mason > Arras People > www.arraspeople.co.uk > - > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Usng Session Vaiable in WHERE Statement
Don't argue with machines, just give it what it wants. Just put the session variable in it's own variable and pass that to the sql statement. $logon = $_SESSION['logname']; $MembersDataQry = "SELECT * FROM MembersData WHERE UserID='$logon'"; --- Daniel Kullik <[EMAIL PROTECTED]> wrote: > Hello again, Michael! > > You ought to read this: > http://de.php.net/manual/en/language.types.string.php#language.types.string.parsing > > > Daniel > > Harlequin wrote: > > Could someone please help me with my syntax > here...? > > > > $MembersDataQry = "SELECT * FROM MembersData > > WHERE UserID='$_SESSION['logname']'"; > > > > I get an error on line 2 but can't seem to figure > out what I've missed. > > > > The variable echoes fine so I know there's a > string in there. > > > > -- > WWE e-commerce IT GmbH > Eiffestrasse 462, D-20537 Hamburg > Tel.: +49-40-2530659-0, Fax: +49-40-2530659-50 > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > __ Do you Yahoo!? Y! Messenger - Communicate in real time. Download now. http://messenger.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Usng Session Vaiable in WHERE Statement
Hello again, Michael! You ought to read this: http://de.php.net/manual/en/language.types.string.php#language.types.string.parsing Daniel Harlequin wrote: Could someone please help me with my syntax here...? $MembersDataQry = "SELECT * FROM MembersData WHERE UserID='$_SESSION['logname']'"; I get an error on line 2 but can't seem to figure out what I've missed. The variable echoes fine so I know there's a string in there. -- WWE e-commerce IT GmbH Eiffestrasse 462, D-20537 Hamburg Tel.: +49-40-2530659-0, Fax: +49-40-2530659-50 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] [Newbie Guide] For the benefit of new members
=== Please feel free to add more points and send to the list. === 1. If you have any queries/problems about PHP try http://www.php.net/manual/en first. You can download a copy and use it offline also. Please also try http://www.php.net/manual/faq.php for answers to frequently answered questions about PHP (added by Christophe Chisogne). 2. Try http://www.google.com next. Searching for "php YOUR QUERY" may fetch you relevant information within the first 10 results. 3. There is a searchable archive of the mailing list discussion at http://phparch.com/mailinglists. Many of the common topics are discussed repeatedly, and you may get answer to your query from the earlier discussions. For example: One of the repeatedly discussed question in the list is "Best PHP editor". Everyone has his/her favourite editor. You can get all the opinions by going through the list archives. If you want a chosen list try this link : http://www.thelinuxconsultancy.co.uk/phpeditors/ (contributed by Christophe Chisogne). 4. Not sure if PHP is working or you want find out what extensions are available to you? Just put the following code into a file with a .php extension and access it through your webserver: If PHP is installed you will see a page with a lot of information on it. If PHP is not installed (or not working correctly) your browser will try to download the file. (contributed by Teren and reworded by Chris W Parker) 5. If you are stuck with a script and do not understand what is wrong, instead of posting the whole script, try doing some research yourself. One useful trick is to print the variable/sql query using print or echo command and check whether you get what you expected. After diagnosing the problem, send the details of your efforts (following steps 1, 2 & 3) and ask for help. 6. PHP is a server side scripting language. Whatever processing PHP does takes place BEFORE the output reaches the client. Therefore, it is not possible to access users' computer related information (OS, screen size etc) using PHP. Nor can you modify any the user side settings. You need to go for JavaScript and ask the question in a JavaScript list. On the other hand, you can access the information that is SENT by the user's browser when a client requests a page from your server. You can find details about browser, OS etc as reported by this request. - contributed by Wouter van Vliet and reworded by Chris W Parker. 7. Provide a clear descriptive subject line. Avoid general subjects like "Help!!", "A Question" etc. Especially avoid blank subjects. 8. When you want to start a new topic, open a new mail composer and enter the mailing list address [EMAIL PROTECTED] instead of replying to an existing thread and replacing the subject and body with your message. 9. It's always a good idea to post back to the list once you've solved your problem. People usually add [SOLVED] to the subject line of their email when posting solutions. By posting your solution you're helping the next person with the same question. [contribued by Chris W Parker] 10. Ask smart questions http://catb.org/~esr/faqs/smart-questions.html [contributed by Jay Blanchard) 11. Do not send your email to the list with attachments. If you don't have a place to upload your code, try the many pastebin websites (such as www.pastebin.com). [contributed by Burhan Khalid] Hope you have a good time programming with PHP. -- Integrated Management Tools for leather industry -- http://www.leatherlink.net Ma Siva Kumar, BSG LeatherLink (P) Ltd, Chennai - 600106 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Usng Session Vaiable in WHERE Statement
At 13:58 26-7-04, you wrote: Could someone please help me with my syntax here...? $MembersDataQry = "SELECT * FROM MembersData WHERE UserID='$_SESSION['logname']'"; I get an error on line 2 but can't seem to figure out what I've missed. 1. You have errors with the ' quote: you use it to wrap the entire array as well as for the index. That does not work. 2. Try not to put array names within double quotes. PHP has troubles recognizing where the array start and ends. Either wrap the array name and indexes in {} (for details check the manual) or rather jump out of the quotes. preferred: $MembersDataQry = 'SELECT * FROM MembersData WHERE UserID="'.$_SESSION['logname'].'";'; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Usng Session Vaiable in WHERE Statement
"Harlequin" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Could someone please help me with my syntax here...? > > $MembersDataQry = "SELECT * FROM MembersData > WHERE UserID='$_SESSION['logname']'"; > > I get an error on line 2 but can't seem to figure out what I've missed. > > The variable echoes fine so I know there's a string in there. > To use array values within double quotes you have to put curly braces around them: $MembersDataQry = "SELECT * FROM MembersData WHERE UserID='{$_SESSION['logname']}'"; Or concatenate the string: $MembersDataQry = "SELECT * FROM MembersData WHERE UserID='" . $_SESSION['logname'] . "'"; Remember to apply mysql_real_escape_string() on any values used within a query. Regards, Torsten Roehr -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Creation of MySQL Database Using PHP
Marek thanks very much. -- - Michael Mason Arras People www.arraspeople.co.uk - "Marek Kilimajer" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Harlequin wrote: > > Hello. > > > > I have a friend who knows less than me about PHP and MySQL (which I know is > > hard to believe) but she needs a login facility for her site. > > > > I've passed over some script I use but she doesn't know how to create the > > database. I can write some commands that create the tables OK - but can I do > > the same for the database or does that have to be done through the UI...? > > > > Do you know phpMyAdmin? > > http://www.phpmyadmin.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Usng Session Vaiable in WHERE Statement
Could someone please help me with my syntax here...? $MembersDataQry = "SELECT * FROM MembersData WHERE UserID='$_SESSION['logname']'"; I get an error on line 2 but can't seem to figure out what I've missed. The variable echoes fine so I know there's a string in there. -- - Michael Mason Arras People www.arraspeople.co.uk - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Regex (Phone Number)
Albert Padley wrote: I have been struggling with a javascript regex validation for U.S. phone This is a PHP list. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: If...Or...Else
"Skippy" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I just wanted to make things clear, because the way you said it above may > lead to misinterpretations, such as believing that || makes all the elements > in a condition evaluate even if not necessary, which is not true. > > So OR simply has lower precedence than ||, but no other hidden properties. > > Any idea why the need to have two logical operators with the same meaning BUT > different precedences? I dig the need to put in OR as an alias, but why > confuse people with the precedence issue? One would tend to think || and OR > are perfectly interchangeable. with OR you can write (and even get desirable result ;) : $resultSet = mysql_query( abla dabla ) OR die("something"); since it OR has lower precedence than assignment operator = rush -- http://www.templatetamer.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Sticky session after session_destroy...
Since you're using cookies, are you remembering to destroy the cookie as well? Check your web browser to see if the cookie is still there - then do your logout script - and then immediately check to see if the cookie is still there. Firefox makes this easy... just another reason why I love that browser. BTW: your english is fine, and the information you provided for your problem was excellent :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: Embedding JavaScript into a PHP generated web page
On 26 July 2004 01:13, Robert Frame wrote: > OK, now I am bewildered again. > > Sample Code > > > echo '';