FutureQuest, Inc. FutureQuest, Inc. FutureQuest, Inc.

FutureQuest, Inc.
Go Back   FutureQuest Community > General Site Owner Support (All may read/respond) > PHP, Perl, Python and/or MySQL
User Name
Password  Lost PW

Reply
 
Thread Tools Search this Thread Display Modes
Old 09-02-1999, 11:45 PM   Postid: 43117
heath
Registered User

Forum Notability:
0 pts: Even-handed
[Post Feedback]
 
Join Date: Aug 1999
Posts: 233
mySQL questions

How do you use the mysql function DATE FORMAT() to reformat the date out of mysql goofy date structure?

Also - is there a mySQL or PHP function that will return the number of records selected from a query or do I need to count this manually?

This doesn't work:

print $mysql_numfields($result);


Nor does this:

 $res = mysql_db_query($db,"select count(answers_id) from answers"
    $row_count = mysql_result($res,0,"count(answers_id)"
print $row_count;

Now what?
thanks
[This message has been edited by heath (edited 09-03-99)]
heath is offline   Reply With Quote
Old 09-03-1999, 04:17 AM   Postid: 43118
Justin
Visitor
 
Justin's Avatar

Forum Notability:
0 pts:
[Post Feedback]
 
Join Date: Jan 1999
Location: Kissimmee, FL
Posts: 3,672
Don't know about the first question (yet), but the second one is simple:

$total = mysql_numrows ($result);
print "$total results found.";

You should always check the number of rows returned before attempting to extract any results, otherwise if none are returned you'll get an error.

PS - see http://www.php.net/manual/ref.mysql.php3 for all of PHP's mySQL functions

HTH

------------------
Justin Nelson
FutureQuest Support

[This message has been edited by Justin (edited 09-03-99)]
Justin is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 visitors)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Forum Jump


All times are GMT -4. The time now is 06:44 AM.


Running on vBulletin®
Copyright © 2000 - 2013, Jelsoft Enterprises Ltd.
Hosted & Administrated by FutureQuest, Inc.
Images & content copyright © 1998-2013 FutureQuest, Inc.
FutureQuest, Inc.