Re: [PHP-DB] retaining and displaying line returns in a text field

2006-01-06 Thread Jordan Miller
The function you need is called nl2br: http://us2.php.net/nl2br -Jordan On Jan 6, 2006, at 5:34 AM, swoll2 wrote: Good morning - I'm trying to get a text field with line returns in it to be stored, retrieved, and displayed the way it gets entered. Specifically, my users use a form field (h

Re: [PHP-DB] var_dump and sizeof database entry?

2006-01-05 Thread Jordan Miller
whoa, that was EXACTLY what I needed. Thanks!! Jordan On Jan 5, 2006, at 6:14 PM, Bastien Koert wrote: select *, (length(image_fiedl)/1024) as Kb from table [where clause] to get the size Bastien -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net

[PHP-DB] var_dump and sizeof database entry?

2006-01-05 Thread Jordan Miller
Hello, This is stumping me something awful. I have searched the archive of this mailing list and google and the php and mysql websites with everything i can think of. I have a simple mysql table with some basic columns and a blob column that holds an image file. What I need to get is the

Re: [PHP-DB] Getting Started..

2005-09-19 Thread Jordan Miller
Man, he was just asking a simple question, no need to criticize every little aspect of etiquette. Please allow me to be a hypocrite and critique your criticism: 1) If his question gets buried in Yui's thread, no big deal, no one will answer and he will ask it again in a few days. If someone

Re: [PHP-DB] Question on CURDATE()

2005-09-13 Thread Jordan Miller
un into this same thing? Jordan On Sep 13, 2005, at 10:36 PM, Micah Stevens wrote: You can't do that in SQL, that would give you a big fat syntax error. On Tuesday 13 September 2005 7:45 pm, Jordan Miller wrote: Rich, Did you try putting "WHERE" twice? try: SELECT * FR

Re: [PHP-DB] Question on CURDATE()

2005-09-13 Thread Jordan Miller
Rich, Did you try putting "WHERE" twice? try: SELECT * FROM WEEKS WHERE BEGIN >= CURDATE() and WHERE END <= CURDATE; Jordan On Sep 13, 2005, at 9:08 PM, reclmaples wrote: I am trying to write a statement that will basically do this: SELECT * FROM WEEKS WHERE BEGIN >= CURDATE() and END <=

Re: [PHP-DB] DATE(r)

2005-09-09 Thread Jordan Miller
You need to use: date('Y-m-d H:i:s'); It's in the comments at: http://www.php.net/date Jordan On Sep 9, 2005, at 12:52 PM, Ron Piggott wrote: Question: I am trying to for the first time create a table with a column that is defined as datetime I wanted to populate that column with the dat

[PHP-DB] Re: [PHP] Help: Get the value of pi up to 200+ digits?

2005-09-01 Thread Jordan Miller
AM, Wong HoWang wrote: Dear Jordan, I know what you mean. But you may try this one and you will know: the result is the same as 16!!! So that's why I ask this question! I am not stupid like that! Please help, thx! "Jordan Miller" <[EMAIL PROTECTED]> wrote:[EMAIL PR

Re: [PHP-DB] Storing an array on a table?

2005-09-01 Thread Jordan Miller
Yes, this has been mentioned in this thread. But with serialize/ unserialize, you can run into other problems that may be more confusing/difficult to troubleshoot. e.g.: http://www.php.net/serialize >As you can see, the original array : >$arr["20041001103319"] = "test" > >after serialize/uns

Re: [PHP-DB] Storing an array on a table?

2005-09-01 Thread Jordan Miller
if you just have a simple array with automatic numeric keys and text you could just implode the data to a string with a separator not found in your data: $dataArray = array("hello", "goodbye", "etc."); $storable = implode("", $dataArray); // $storable becomes "hellogoodbyeetc." //

Re: [PHP-DB] Brain not working, help needed :-)

2005-08-29 Thread Jordan Miller
you can also do this to save room without having to create $varname: ${"id".$num} = "some text"; Jordan On Aug 29, 2005, at 12:10 AM, Micah Stevens wrote: Hi Chris, You can use variable variables.. like this: $num = 2 $varname = "id".$num; $$varname = "id2 is stored here!"; It's in the

Re: [PHP-DB] Re: maximum number of records in a db?

2005-08-26 Thread Jordan Miller
Dan, Wow, thank you very much for an actual answer. It is much appreciated. I am sorry that people like to ridicule noobs on this list. It was a simple question with a simple answer. Thank you!! Jordan On Aug 26, 2005, at 10:45 AM, Dan Baker wrote: "Jordan Miller" <[EM

Re: [PHP-DB] maximum number of records in a db?

2005-08-26 Thread Jordan Miller
/2005, Jordan Miller wrote: I was just wondering what is the maximum number of records that can be successfully handled with a db. any db will do. it doesn't have to be the fastest or best, just one that can hold the maximum number of records and still be able to interact well with php. any idea

[PHP-DB] maximum number of records in a db?

2005-08-26 Thread Jordan Miller
I was just wondering what is the maximum number of records that can be successfully handled with a db. any db will do. it doesn't have to be the fastest or best, just one that can hold the maximum number of records and still be able to interact well with php. any ideas? thanks, Jordan -- P

Re: [PHP-DB] SQL Injection attack

2005-08-25 Thread Jordan Miller
NOTE: http://www.php.net/mysql_escape_string "Version: 4.3.0 Description: This function became deprecated, do not use this function. Instead, use mysql_real_escape_string()." Jordan On Aug 25, 2005, at 2:15 PM, <[EMAIL PROTECTED]> [EMAIL PROTECTED]> wrote: Using mysql_escape_string shoul