Re: [PHP-DB] Quick Question: Line Breaks

2004-01-08 Thread Micah Stevens
\n is not converted to a newline unless you use double quotes around the string. See: http://us3.php.net/manual/en/language.types.string.php -Micah On Thu January 08 2004 7:58 pm, Jacob Hackamack wrote: > Hello, > > I have a couple of quick questions. When I execute this code on my php > pa

[PHP-DB] Quick Question: Line Breaks

2004-01-08 Thread Jacob Hackamack
Hello, I have a couple of quick questions. When I execute this code on my php page (I know that the .PSD image isnĀ¹t web ready, but Safari does what I need it to do :) ) it displays the entire source as one line. Is there anyway to have it be broken. I have read places (internet sites) that say

[PHP-DB] Re: Need help retreiving one record

2004-01-08 Thread Jeroen Wasteels
Thanks a lot, I'll give it a try "Bossek" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > $sql = "SELECT * FROM users WHERE user = 'foo'"; > $data = mysql_query($sql,$povezava) or die(mysql_error() ); > while ($row_data = mysql_fetch_assoc($data) ) > { > print "$row_data['nick']";

[PHP-DB] Re: Need help retreiving one record

2004-01-08 Thread Bossek
$sql = "SELECT * FROM users WHERE user = 'foo'"; $data = mysql_query($sql,$povezava) or die(mysql_error() ); while ($row_data = mysql_fetch_assoc($data) ) { print "$row_data['nick']"; print "$row_data['text']"; } "Jeroen Wasteels" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]

Re: [PHP-DB] get a total comment listing

2004-01-08 Thread Tristan . Pretty
"i want to be able to tally up how many comments there are for each particular article on a page" SELECT COUNT(row_name) from your_table "so that you can tell which ones have had new comments and which havent" $today = date("Y-d-m"); SELECT COUNT(row_name) from your_table WHERE date >= '$today'

[PHP-DB] get a total comment listing

2004-01-08 Thread js
im making a website where visitors can comment on essays that they read. i have a table that contains every comment written and each comment has its own ID for primary key and articleid column for which essay it is written for. now, i want to be able to tally up how many comments there are for e