Re: [PHP-DB] EOQ what does it mean??
Darren, Small confusion in the typing of the original (accurate) submission. It is all one word heredoc and can be found in the manual (using Paul's recommended location) check out http://uk.php.net/manual/en/language.types.string.php#language.types.string.syntax.heredoc. Think of the something ... something (margin position second something is v.important) as equivalent to '...' or ... (opening and closing marks to delimit a string) and you'll be away. =dn - Original Message - From: p.whiter [EMAIL PROTECTED] To: PHP-DB List [EMAIL PROTECTED]; Darren [EMAIL PROTECTED] Sent: 04 November 2001 02:07 Subject: Re: [PHP-DB] EOQ what does it mean?? If you are running windows, I suggest you download the .chm version of the php manual, great for easy searching and bookmarking pages etc. http://uk2.php.net/distributions/manual/manual-en.chm To answer your question, the first piece of code will be, replace: $output = EOQ /form EOQ; with $output = print(/form); and the next replace: $output = EOQ input type=text name=$name value=$value size=$size $maxatt EOQ; with $output =print(input type=\text\ name=\$name\ value=\$value\ size=\$size\ $maxatt); When using the print statement you must remember to escape all within the parenthesis with \ Paul - Original Message - From: Darren [EMAIL PROTECTED] : You are exactly right from what I can tell. I did you you suggested : and it worked! There are several of those in the document. Looked : it up in the book and have a limited idea on what it is, and also : learning from your example I have a better Idea. But I did a search : for here docs, on the PHP site and couldn't find anything. I think : I can probably figure out the other 6 or 7 in the document but I : can't figure this on out. : : : here tis : : // This function returns an HTML /form tag. : : function end_form () : { : $output = EOQ : /form : EOQ; : : return $output; : } : : *** : I know this must be simple but I just can't get it yet. I tried : experimenting and putting other code in there to replace it but : nothing has worked... yet. : : Thanks again for the help : : Darren : : PS here is the next one in case you felt like looking at it : : // This function returns an HTML text input field. The default size : // of the field is 10. A value and maximum data length for the field : // may be supplied. : : function text_field ($name=, $value=, $size=10, $maxlen=) : { : $maxatt = empty($maxlen) ? : maxlength=\$maxlen\; : $output = EOQ : input type=text name=$name value=$value size=$size $maxatt : EOQ; : return $output; : } : -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] Function Prolem parse error
Paul if your there I have another issue similar to the past. It is probably a PHP3 to PHP4 problem. Here tis function hidden_field ($name=, $value=) * I have no clue what could be wrong. Darren, Check out http://uk.php.net/manual/en/functions.php and from there look up Default Argument Values. =dn -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] How can set a option in mysql
Hi All I have MySQL 3.23 in W2K , I must set oprion lower_case_table_names to 0. How set it? Thanks for answer Mad Nas -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] php + interbase
FoxServ, php ver. 4.0.6 ( I tried also 4.0.4 ), win 98. interbase local from Delphi 5. I think that local interbase installed with delphi is pre version 6.0, and the dll you're using is compiled against version Meir Kriheli thanks a lot, that was the reason. Jacek Krywult -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] Function Prolem parse error
Dl, Thanks for the input an the link to the manuels, there are very helpful. I have looked at them but I don't understand what default variables has to do with the listed code. To give you a better idea (if you need it you may not) I'll put a little more of code in for context purposes. // string hidden_field ([string name [, string value]]) // This function returns an HTML hidden field. A value may be supplied. function hidden_field ($name=, $value=) { $output = print(input type=\hidden\ name=\$name\ value=\$value); return $output; } I still don't understand what the fix should be or what is wrong. Thanks for the help Darren Dl Neil wrote: Paul if your there I have another issue similar to the past. It is probably a PHP3 to PHP4 problem. Here tis function hidden_field ($name=, $value=) * I have no clue what could be wrong. Darren, Check out http://uk.php.net/manual/en/functions.php and from there look up Default Argument Values. =dn -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] Nothing returned
On Saturday 03 November 2001 17:29, Martin wrote: Why am I not getting anything returned from this function? I have code doing a if user exists and b if user doesn't exist. I'm not getting any numRows result apparently. The query is OK and returns 1 user for $name=admin. I'm not getting any errors from isError. Martin function exists($name) { $sql = SELECT * FROM users WHERE (name='$name'); $res = $db-query($sql); if (DB::isError($res)) { die ($res-getMessage()); } ---if($res) { $Rows = $res-numRows(); if($Rows 0) { return(TRUE); } else { return(FALSE); } } } If you're not getting any errors it's either a logic error or your sql statement is messed up. 1. Is the line I marked above always testing false? Put some prints or echos inside the if conditions and test your logic. 2. Log in to the mysql server and run your query directly with the value you expect. Do you get the results you're looking for? 3. Test the variable in the SQL statement with a print or echo. Are you actually passing what you think to $sql? HTH, Jesse -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] Re: Nothing returned
Martin wrote: Why am I not getting anything returned from this function? I have code doing a if user exists and b if user doesn't exist. I'm not getting any numRows result apparently. The query is OK and returns 1 user for $name=admin. I'm not getting any errors from isError. Martin function exists($name) { Thanks to everyone. Problem was that $db wasn't known to the function. Solved by global $db; Martin S. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP-DB] TREE in a database
Thanks, that is exactly what I needed and it doesn't look so complicated. -Original Message- From: John Lim [mailto:[EMAIL PROTECTED]] Sent: 31. oktobar 2001. 16:44 To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] TREE in a database Actually relational databases are set-based. The answer to your tree structures question is that it is possible. It is quite complicated though, so have a look at this phphoo tutorial: http://www.webreference.com/perl/xhoo/php1/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] Function Prolem parse error
On Monday 05 November 2001 04:45, Darren wrote: [snip] // string hidden_field ([string name [, string value]]) // This function returns an HTML hidden field. A value may be supplied. function hidden_field ($name=, $value=) { $output = print(input type=\hidden\ name=\$name\ value=\$value); return $output; } I still don't understand what the fix should be or what is wrong. You can just define that function as: function hidden_field($name, $value) { blah... blah... } hth -- Jason Wong Gremlins Associates www.gremlins.com.hk -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP-DB] TREE in a database
True, but isn't this script a bit database intensive? You shouldn't have to hit the database so many times, or doesn't this query as much as I think? But thank you for the article, It is perfect for my problem too. olinux --- Robert Vukovic [EMAIL PROTECTED] wrote: Thanks, that is exactly what I needed and it doesn't look so complicated. -Original Message- From: John Lim [mailto:[EMAIL PROTECTED]] Sent: 31. oktobar 2001. 16:44 To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] TREE in a database Actually relational databases are set-based. The answer to your tree structures question is that it is possible. It is quite complicated though, so have a look at this phphoo tutorial: http://www.webreference.com/perl/xhoo/php1/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] __ Do You Yahoo!? Find a job, post your resume. http://careers.yahoo.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] Function Prolem parse error
Jason, Thanks alot! now the next line gets an error. The original code was as follows $output = EOQ input type=hidden name=$name value=$value EOQ; return $output; Then I changed it to $output = print(input type=\hidden\ name=\$name\ value=\$value); return $output; I did this so the code would be compatible with php3 instead of php4 (what the code was originaly written for. Thanks for the help, Jason, Dl, and Paul, and anybody else that is keeping up with the thread. Darren Jason Wong wrote: On Monday 05 November 2001 04:45, Darren wrote: [snip] // string hidden_field ([string name [, string value]]) // This function returns an HTML hidden field. A value may be supplied. function hidden_field ($name=, $value=) { $output = print(input type=\hidden\ name=\$name\ value=\$value); return $output; } I still don't understand what the fix should be or what is wrong. You can just define that function as: function hidden_field($name, $value) { blah... blah... } hth -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] ughfuih
GJUKDFKGA' - This message was sent using Endymion MailMan. http://www.endymion.com/products/mailman/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] Function Prolem parse error
Darren, We're not really set up to do line-by-line debugging. You may need to spend a bit (more) time learning PHP to avoid these sorts of frustrations. When the code is executed it gives a parse error on the line containing value=\$value. It would have been helpful to have pointed us at that line and told us the error msg (cf now the next line gets an error). The problem is that the last set of (internal) double-quotes are not 'escaped' and consequently PHP thinks they terminate the string to be printed. Otherwise everything seems to be fine. Regards, =dn - Original Message - From: Darren [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: 04 November 2001 22:24 Subject: Re: [PHP-DB] Function Prolem parse error Jason, Thanks alot! now the next line gets an error. The original code was as follows $output = EOQ input type=hidden name=$name value=$value EOQ; return $output; Then I changed it to $output = print(input type=\hidden\ name=\$name\ value=\$value); return $output; I did this so the code would be compatible with php3 instead of php4 (what the code was originaly written for. Thanks for the help, Jason, Dl, and Paul, and anybody else that is keeping up with the thread. Darren Jason Wong wrote: On Monday 05 November 2001 04:45, Darren wrote: [snip] // string hidden_field ([string name [, string value]]) // This function returns an HTML hidden field. A value may be supplied. function hidden_field ($name=, $value=) { $output = print(input type=\hidden\ name=\$name\ value=\$value); return $output; } I still don't understand what the fix should be or what is wrong. You can just define that function as: function hidden_field($name, $value) { blah... blah... } hth -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] Getting Server Date
I am trying to get the server date using PHP. So far, every function I have check return the local system date. Does anyone know how to get the server date? Thanks. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] Function Prolem parse error
Dl and everybody else, Thank you all for your help and patience. Dl Neil wrote: Darren, We're not really set up to do line-by-line debugging. You may need to spend a bit (more) time learning PHP to avoid these sorts of frustrations. O.K. Meanwhile .. Dl Neil wrote: Darren, When the code is executed it gives a parse error on the line containing value=\$value. It would have been helpful to have pointed us at that line and told us the error msg (cf now the next line gets an error). I'll do my best to inform everybody of the error. In this case it was the same parse error as the other. The problem is that the last set of (internal) double-quotes are not 'escaped' and consequently PHP thinks they terminate the string to be printed. Otherwise everything seems to be fine. I was comparing a similar line earlier in the code and it looked fine to me. But I'm still learning I tryed it and I got the same error The code I used $output = print(input type=\hidden\ name=\$name\ value=\$value\); return $output; Thanks Darren -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] Re: Getting Server Date
Found my answer.. Thanks.. Kevin Keller [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I am trying to get the server date using PHP. So far, every function I have check return the local system date. Does anyone know how to get the server date? Thanks. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] driver initialization failed in ...
Anyone out there sucessfully using Berkeley DB / sleepycat database with PHP4? I'm getting the above error using dba_open Thanks Greg -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]