Re: [PHP-DB] Help with formating text from PHP

2003-08-14 Thread Andrew D. Luebke
How are the paragraph breaks represented in the original text? You have have to detect the paragraph breaks and change to a /r/n. Andrew. At 11:40 PM 8/9/2003, Budelak wrote: Hello, Can someone help with this problem I've been trying to solve but don't how to. I have a field of type longtext t

RE: [PHP-DB] % operator

2003-08-14 Thread Andrew D. Luebke
Although now that I look at: http://us4.php.net/manual/en/language.operators.arithmetic.php You'll see that $a % $b resturns the modulus so that is probably the easiest. Andrew, At 11:43 AM 8/12/2003, you wrote: There's probably a better way to do this, but to retrieve only the 0.8 from 24/5 t

RE: [PHP-DB] % operator

2003-08-14 Thread Andrew D. Luebke
The easiest way would probably be to use the fmod function. http://us3.php.net/manual/en/function.fmod.php Andrew. At 11:43 AM 8/12/2003, Matthew Moldvan wrote: There's probably a better way to do this, but to retrieve only the 0.8 from 24/5 try this: ($a/$b)-floor($a/$b) Regards, Matt. -O

Re: [PHP-DB] Help with formating text from PHP

2003-08-14 Thread Andrew D. Luebke
es the database that is later called up for display. Bunmi Andrew D. Luebke wrote: How are the paragraph breaks represented in the original text? You have have to detect the paragraph breaks and change to a /r/n. Andrew. At 11:40 PM 8/9/2003, Budelak wrote: Hello, Can someone help with this pr

Re: [PHP-DB] MySQL Date insert

2003-07-28 Thread Andrew D. Luebke
John, thanks, now I feel stupid, it's always the silly little things that get you. You were right, when I added the date to the existing insert I forgot to put the ending parentheses back in. Thanks for the help. Andrew. At 11:26 AM 7/28/2003, CPT John W. Holmes wrote: From: &quo

RE: [PHP-DB] MySQL Date insert

2003-07-28 Thread Andrew D. Luebke
you have named your table column DATE which is a reserved keyword in MySQL. Try naming that something different and see if you still get the error. > -Original Message- > From: Andrew D. Luebke [mailto:[EMAIL PROTECTED] > Sent: Monday, July 28, 2003 2:17 PM > To: [EMAIL PROT

[PHP-DB] MySQL Date insert

2003-07-28 Thread Andrew D. Luebke
Hello, I have the following PHP code: $date = date("Y-m-d H:i:s"); $result = mysql_query("INSERT INTO Boats (Make, Model, Serial, Stock, Extension, Cust_Name, Store, Date) VALUES ('$make', '$model', '$serial', '$stock', '$extension', '$name', '$store', '$date'")

Re: [PHP-DB] Query loop issues.

2003-05-30 Thread Andrew D. Luebke
rick - Original Message - From: "Andrew D. Luebke" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, May 29, 2003 11:48 AM Subject: [PHP-DB] Query loop issues. > I'm having a problem with looping a query here is the skeleton of the code: > > $query_

[PHP-DB] Query loop issues.

2003-05-30 Thread Andrew D. Luebke
I'm having a problem with looping a query here is the skeleton of the code: $query_result = mysql_query("SELECT * FROM Boats WHERE Serial='$serial' OR Make='$make'") if(mysql_num_rows($query_result) > 1) { while($row = mysql_fetch_array($query_result, MYSQL_NUM)) { } } else