Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
Register FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 05-24-2003, 09:25 PM
Serge's Avatar
Serge Serge is offline
 
Join Date: Jan 2002
Location: The Matrix
Posts: 115
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default MySQL data

Ok if I run a query like so

PHP Code:
$result = mysql_query("SELECT sectionid, sectionname, sectiondes, artnumber FROM section") or
        die (mysql_error()); 
And then said something like...

PHP Code:
$sectionid=$section 
Could I then echo out section whereever I wanted.

The only way I really know how to echo out something is to use an while statement
Reply With Quote
  #2  
Old 05-24-2003, 09:35 PM
filburt1 filburt1 is offline
 
Join Date: Feb 2002
Location: Maryland, US
Posts: 6,144
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

PHP Code:
$result = mysql_query("SELECT sectionid, sectionname, sectiondes, artnumber FROM section");
if (!$result) die(mysql_error());

while ($section = mysql_fetch_array($result))
{
    echo "<pre>";
    print_r($section);
    echo "</pre>";
}
mysql_free_result($result); 
Reply With Quote
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. The time now is 12:01 AM.


Powered by vBulletin® Version 3.9.0
Copyright ©2000 - 2017, vBulletin Solutions Inc.