[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

[PHP-DB] CREATE TABLE problem

2004-01-21 Thread js
ok im making this page and every single time i try to execute it, it tells me it was not successful. the database name, user,pw,and local host are all correct. i have no idea what do do, and i have 2 more tables besides this one i wanted to create but this was kind of my template for it and i

[PHP-DB] CREATE TABLE problem redefined

2004-01-21 Thread js
ok i did the mysql_error DIE thing, and now it tells me this: You have an error in your SQL syntax near 'UNSIGNED, name VARCHAR(255) NOT NULL, login VARCHAR(10) NOT NULL, password' at line 2 i have no idea what it means. i dont think any of those are taken or reserved by PHP or mySQL. any

[PHP-DB] counting a value

2004-01-30 Thread js
i want to know what i can use to count the number of times a value appears in a column listing where different values are listed. for example, say in the column of Favorite Number we have 100 students, and for each student his or her own row. and each student can pick a number from 1-10. So, we

[PHP-DB] counting a value REVISED pt2

2004-01-30 Thread js
p.s.- im using PHP with MySQL... if that helps any. thanks i want to know what i can use to count the number of times a value appears in a column listing where different values are listed. for example, say in the column of Favorite Number we have 100 students, and for each student his or her own

[PHP-DB] mysql date/time question

2004-01-31 Thread js
ok, 2 questions. first, how do i do a mysql query that orders by date? like, say i want to have 5 newest members who have signed up? i want it to display only 5 also. how do i do that? like this? $newestquery = SELECT artid,title,artdate,artauthor FROM article WHERE artdate = $today ORDER BY

[PHP-DB] page hit tracking

2004-02-06 Thread js
i am using php MySQL and i want to know how i can make a hidden value for certain entries in a table and how many times they are called. for instance, say i have a table of vegetables people can look at. the page displays all of the vegetables, and then it generates links to each one and if the

[PHP-DB] mktime question

2004-02-07 Thread js
i have a page that displays an essay someone has written. and people who come to the site can submit comments. the comments are taken quickly in a form and posted. everything is posting perfect except for the time to get the time i dont know what to use? time() or date() or mktime() ??? im

[PHP-DB] MySQL query question

2004-02-13 Thread js
i want to search the table called comments, and i want to count the number of times artid appears. then i want to group them all together, but then i want to order them by most appearances to fewest. so if artid 1 appeared 40 times and it was the most, i want that to be retrieved first. if

[PHP-DB] Query Object in PHP?

2007-02-24 Thread js
Hi list, Is there any implementation of Query Object [1] written in PHP? I spent some time searching on the net but no clues're found. Thank you in advance. [1] http://www.martinfowler.com/eaaCatalog/queryObject.html -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP-DB] Re: Query Object in PHP?

2007-03-03 Thread js
Ansering myself. DB_DataObject http://pear.php.net/package/DB_DataObject/ On 2/25/07, js [EMAIL PROTECTED] wrote: Hi list, Is there any implementation of Query Object [1] written in PHP? I spent some time searching on the net but no clues're found. Thank you in advance. [1] http

Re: [PHP-DB] About mysql_connect()

2008-02-06 Thread js
Use PDO and try/catch. I think it's much easier. On Feb 6, 2008 7:07 PM, Prabath Kumarasinghe [EMAIL PROTECTED] wrote: Hi All When I stop mysql database whole application will break in mysql_connect() function even without giving any error message.Is there are any way to put exception