Raised This Month: $32 Target: $400
 8% 

Need help with PHP


Post New Thread Reply   
 
Thread Tools Display Modes
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 01-10-2008 , 21:56   Re: Need help with PHP
Reply With Quote #11

PHP Code:
$result mysql_query("SELECT * FROM accounts ORDER BY account DESC");
$accountid mysql_result($result0'account'); 
For more info about the mysql_result function, visit here
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
Jheshka
Senior Member
Join Date: Dec 2005
Old 01-10-2008 , 22:13   Re: Need help with PHP
Reply With Quote #12

Heh, I got it right before you answered...

PHP Code:
$result mysql_query("SELECT * FROM accounts ORDER BY account DESC");
$row mysql_fetch_array($result);
$highest $row['account'];
//    echo $highest; 

One last(I hope) question..

When outputting a string (include various queries) is it possible to indent the strings to make it easier to read?


I have it outputting as
PHP Code:
    $result mysql_query("SELECT * FROM `accounts`");

    while(
$row mysql_fetch_array($result))
     {
     echo 
$row['fname'] . ", " $row['lname'] . ", "  $row['addr'] . ", " .  $row['email'] .  ", #" $row['account'] . ", $" $row['balance'];
     echo 
"<br />";
     } 
__________________
James

Last edited by Jheshka; 05-13-2010 at 19:45.
Jheshka is offline
Lee
AlliedModders Donor
Join Date: Feb 2006
Old 01-11-2008 , 22:23   Re: Need help with PHP
Reply With Quote #13

Amusing.

I'm not sure whether YamiKaitou is to blame (i.e. whether he read the applicable sentence), but in future you should describe the problem - and not the problem you're having with what you believe to be the solution.

If you were to use this convoluted method, your first inkling was the correct query.

Multiple spaces: http://www.w3schools.com/html/html_entities.asp
Tabs: <table>

I hope you're not putting this script on a web-accessible server.

Last edited by Lee; 01-11-2008 at 23:22.
Lee is offline
Reply



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

BB 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 18:42.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode