Tutorials
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOtherTutorials

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
You eat, breathe and sleep innovation. Build your mobile intelligence with BlackBerry® experts this July. Register Today!
  #1  
Old May 8th, 2005, 07:53 PM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
Help with "News with Comments by Matt Wade"

Hi!

I'm using this script and it's great but I have a question: how can I display postdate when I'm displaying only one news?

Reply With Quote
  #2  
Old May 11th, 2005, 12:05 PM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
RE: Help with "News with Comments by Matt Wade"

Doesn't anyone know or you just don't want to help?

Reply With Quote
  #3  
Old May 11th, 2005, 06:52 PM
Matt Matt is offline
Moderator
Codewalkers Specialist (4000 - 4499 posts)
 
Join Date: Apr 2007
Location: Florida
Posts: 4,158 Matt User rank is Private First Class (20 - 50 Reputation Level)Matt User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 h 10 m 20 sec
Reputation Power: 6
RE: Help with "News with Comments by Matt Wade"

I don't understand the question. All you have to do is display it.

Reply With Quote
  #4  
Old May 12th, 2005, 06:29 PM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
RE: Help with "News with Comments by Matt Wade"

ok it's like this:

With this query we display all news in the database:
php Code:
Original - php Code
  1.  
  2. $query = "SELECT id,title,newstext," .
  3.                  "DATE_FORMAT(postdate, '%Y-%m-%d') as date " .
  4.                  "FROM news ORDER BY postdate DESC";


this is working fine and it displays the date, when the news was posted.

php Code:
Original - php Code
  1.  
  2. $query = "SELECT * FROM news WHERE id=$id";
  3.     $result = mysql_query ($query);


this query displays only one news BUT WITHOUT the date!
I've tried this:
php Code:
Original - php Code
  1.  
  2. $query = "SELECT * FROM news WHERE id=$id".
  3.          "DATE_FORMAT(postdate, '%Y-%m-%d') as date ";
  4.     $result = mysql_query ($query);


but it's not working

So what do I have to do?

Reply With Quote
  #5  
Old May 12th, 2005, 06:35 PM
Matt Matt is offline
Moderator
Codewalkers Specialist (4000 - 4499 posts)
 
Join Date: Apr 2007
Location: Florida
Posts: 4,158 Matt User rank is Private First Class (20 - 50 Reputation Level)Matt User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 h 10 m 20 sec
Reputation Power: 6
RE: Help with "News with Comments by Matt Wade"

$query = "SELECT *, DATE_FORMAT(postdate, '%Y-%m-%d') as date FROM news WHERE id=$id";
$result = mysql_query ($query);

Reply With Quote
  #6  
Old May 13th, 2005, 12:02 AM
notepad notepad is offline
Codewalkers Loyal (3000 - 3499 posts)
 
Join Date: Apr 2007
Location: Central, IL USA
Posts: 3,214 notepad User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
Send a message via AIM to notepad
RE: Help with "News with Comments by Matt Wade"

hey matt.. what do the forum rules (that you wrote) say about using the proper php/code tags?

Reply With Quote
  #7  
Old May 13th, 2005, 12:04 AM
bluephoenix's Avatar
bluephoenix bluephoenix is offline
Levelheaded Curmudgeon
Codewalkers Novice (500 - 999 posts)
 
Join Date: Apr 2007
Location: Syracuse, NY
Posts: 507 bluephoenix User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 h 13 m 2 sec
Reputation Power: 2
Send a message via AIM to bluephoenix
RE: Help with "News with Comments by Matt Wade"


here they are! I stole them!!

Reply With Quote
  #8  
Old May 13th, 2005, 12:11 AM
Matt Matt is offline
Moderator
Codewalkers Specialist (4000 - 4499 posts)
 
Join Date: Apr 2007
Location: Florida
Posts: 4,158 Matt User rank is Private First Class (20 - 50 Reputation Level)Matt User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 h 10 m 20 sec
Reputation Power: 6
RE: RE: Help with "News with Comments by Matt Wade"


Quote:
hey matt.. what do the forum rules (that you wrote) say about using the proper php/code tags?


You need to reread the rules.

Reply With Quote
  #9  
Old May 13th, 2005, 02:15 PM
notepad notepad is offline
Codewalkers Loyal (3000 - 3499 posts)
 
Join Date: Apr 2007
Location: Central, IL USA
Posts: 3,214 notepad User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
Send a message via AIM to notepad
RE: Help with "News with Comments by Matt Wade"

you're right, i missed the first one..

Reply With Quote
  #10  
Old May 26th, 2005, 11:24 PM
bluephoenix's Avatar
bluephoenix bluephoenix is offline
Levelheaded Curmudgeon
Codewalkers Novice (500 - 999 posts)
 
Join Date: Apr 2007
Location: Syracuse, NY
Posts: 507 bluephoenix User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 h 13 m 2 sec
Reputation Power: 2
Send a message via AIM to bluephoenix
RE: Help with "News with Comments by Matt Wade"

Hrm, If they're not Matt's tags, then whose did I steal?!

Reply With Quote
Reply

Viewing: Codewalkers ForumsOtherTutorials > Help with "News with Comments by Matt Wade"


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway