[PHP-DB] Re: retrieve enum values

2005-04-15 Thread Nadim Attari
$descRS = mysql('describe theTableName theEnumColumn'); list($fld_name, $fld_type, $fld_null, $fld_key, $fld_default, fld_extra) = mysql_fetch_row($descRS); mysql_free_result($descRS); // Values you will be interested: $fld_type (and $fld_default perhaps) // $fld_type will be equal to = enum('1',

[PHP-DB] Counting HTML Lines

2005-04-15 Thread Ng Hwee Hwee
Hi all, is there a way to count how many lines of screen output has HTML render? below is a sample of what i'm trying to do.. i'm trying to generate a table with the Remarks column containing data type TEXT which may have a few lines. therefore, i cannot just count how many rows of records i

Re: [PHP-DB] Counting HTML Lines

2005-04-15 Thread Petar Nedyalkov
On Friday 15 April 2005 11:46, Ng Hwee Hwee wrote: Hi all, is there a way to count how many lines of screen output has HTML render? below is a sample of what i'm trying to do.. i'm trying to generate a table with the Remarks column containing data type TEXT which may have a few lines.

Re: [PHP-DB] Counting HTML Lines

2005-04-15 Thread Ng Hwee Hwee
hi! thanx for your reply. i cannot count the number of \n because sometimes the inputted text is very long without any \n, but because it is inside a cell that has a linited width, HTML will automatically push it to the next line, right? in this case, there won't be a count for \n. hwee -

Re: [PHP-DB] Counting HTML Lines

2005-04-15 Thread Jyrki Laurila
Firstly, you are printing the output directly, so in case you don't mark the lines you are printing out after each section, there is no way to count the lines. Secondly, HTML doesn't push the text automatically to anywhere, it is your text-editor. HTML is presented as it's written on the file. So

Re: [PHP-DB] Counting HTML Lines

2005-04-15 Thread Jeffrey
HTML doesn't do anything with long lines of text. But browsers will wrap the lines to fit within the confines of the page or table cell. You can use the wordwrap function to break the string into lines (broken by \n) of a set number of characters. And then use ereg_replace to replace the \n's

Re: [PHP-DB] Counting HTML Lines

2005-04-15 Thread Petar Nedyalkov
On Friday 15 April 2005 12:09, Ng Hwee Hwee wrote: hi! thanx for your reply. i cannot count the number of \n because sometimes the inputted text is very long without any \n, but because it is inside a cell that has a linited width, HTML will automatically push it to the next line, right? in

Re: [PHP-DB] Counting HTML Lines

2005-04-15 Thread Ng Hwee Hwee
Hi! thank you so much for your help!! do you mean to do ob_get_contents() before i do a ob_end_flush()? but even if i'm successful in counting the number of \ns, HTML tags like html,head,script will also give me a count for \ns but in actual fact, they do not contribute to the screen output. how

Re: [PHP-DB] Counting HTML Lines

2005-04-15 Thread mel list_php
what about a file()? this will return the file in an array:each element of the array is a line of the file. then you can do a count to have the numer of elements in the array. you can get rid of the html tags with a strip_tags. hth, melanie From: Ng Hwee Hwee [EMAIL PROTECTED] To:

Re: [PHP-DB] Counting HTML Lines

2005-04-15 Thread Martin Norland
Ng Hwee Hwee wrote: is there a way to count how many lines of screen output has HTML render? below is a sample of what i'm trying to do.. i'm trying to generate a table with the Remarks column containing data type TEXT which may have a few lines. therefore, i cannot just count how many rows of

[PHP-DB] Re newbie question

2005-04-15 Thread Balwant Singh
i am doing the following for inserting values in MYSQL DB through PHP. $a = hello; $b = 1; $query = INSERT INTO tablename (a, b) VALUES ('$a', '$b'); try this with best wishes balwant - Original Message - From: Kenn Murrah [EMAIL PROTECTED] To: php-db@lists.php.net Sent: Wednesday,