Search found 10 matches
- Mon Jun 20, 2005 12:24 pm
- Forum: PHP - Code
- Topic: [SOLVED]PHp/MySQL Question
- Replies: 6
- Views: 367
- Mon Jun 20, 2005 11:59 am
- Forum: PHP - Code
- Topic: [SOLVED]PHp/MySQL Question
- Replies: 6
- Views: 367
I did that, but its giving me this erro:patrikG wrote:Code: Select all
$query = mysql_query("SELECT name,title,story,time FROM tblstory ORDER BY col_name DESC",$link);
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/rlzcjewc/public_html/stories.php on line 80
- Mon Jun 20, 2005 9:53 am
- Forum: PHP - Code
- Topic: [SOLVED]PHp/MySQL Question
- Replies: 6
- Views: 367
so the line should look like this?phpScott wrote:should do the trickCode: Select all
blah ORDER BY col_name DESC
use ASC for ascending and DESC for descending.
Code: Select all
$query = mysql_query("SELECT name,title,story,time FROM tblstory WHERE ORDER BY col_name DESC>0",$link);- Mon Jun 20, 2005 9:18 am
- Forum: PHP - Code
- Topic: [SOLVED]PHp/MySQL Question
- Replies: 6
- Views: 367
[SOLVED]PHp/MySQL Question
On a form, how can I get the results to be echoed out with the newest being first instead of the oldest first? I went to MySQL.org to see if I could figure out Order By function, but I couldn't get it to work. Here is what I have: CREATE TABLE `tblstory` ( `id` int(11) NOT NULL auto_increment, `name...
- Sun Jun 19, 2005 11:09 pm
- Forum: PHP - Code
- Topic: A Few Quick Questions
- Replies: 14
- Views: 958
- Sun Jun 19, 2005 6:42 pm
- Forum: PHP - Code
- Topic: A Few Quick Questions
- Replies: 14
- Views: 958
What do your time fields look like? Are they being inputted correctly? my time fields? I only have one. It just is suppose to show Month/Day/Year The form works it just keeps echoing wrong. This may help you out: My table: CREATE TABLE `tblstory` ( `id` int(11) NOT NULL auto_increment, `name` text ...
- Sun Jun 19, 2005 5:21 pm
- Forum: PHP - Code
- Topic: A Few Quick Questions
- Replies: 14
- Views: 958
does table have timestamp column (datetime)? If not, it won't work. See my first post. Table is set up like this: CREATE TABLE `tblstory` ( `id` int(11) NOT NULL auto_increment, `name` text NOT NULL, `title` text NOT NULL, `story` text NOT NULL, `time` int(11) NOT NULL default '0', PRIMARY KEY (`id...
- Sun Jun 19, 2005 4:58 pm
- Forum: PHP - Code
- Topic: A Few Quick Questions
- Replies: 14
- Views: 958
- Sun Jun 19, 2005 2:08 pm
- Forum: PHP - Code
- Topic: A Few Quick Questions
- Replies: 14
- Views: 958
the message being newest first: you need a larger description on how the thing runs at the moment, are each of the stories in individual txt files or are they in the same txt file. If they are in the same file you can explode() the file after reverse_array() the order. If that is no help you may ne...
- Sun Jun 19, 2005 1:22 pm
- Forum: PHP - Code
- Topic: A Few Quick Questions
- Replies: 14
- Views: 958
A Few Quick Questions
hello: I am very new to PHP. I know some coding, but a few I am not aware of. On the page danaplatoforever.com/stories.php what code can I use to get the stories to be posted with the newest coming up first? Secondly on danaplatoforever.com/mmesages.php it keeps showing the date 12/31/1969. WHat am ...