Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Array from a Database
Old 02-26-2009, 10:22 PM Array from a Database
Average Talker

Posts: 15
Trades: 0
How do I take the results from 1 particular field in my database (in this case vin) and turn it into an array. Here is what I have so far.
PHP Code:
do {
$myVIN .= $row_Recordset1['vin'];
} while (
$row_Recordset1 mysql_fetch_assoc($Recordset1)); 
macbaby is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 02-26-2009, 10:35 PM Re: Array from a Database
anderswc's Avatar
Super Talker

Posts: 132
Name: Will Anderson
Location: Terre Haute, IN
Trades: 0
PHP Code:
$values = array();
do {
$values[] = $row_Recordset1['vin'];
} while (
$row_Recordset1 mysql_fetch_assoc($Recordset1)); 
When the loop is done, $values will contain all the values from the 'vin' column.
__________________
Will Anderson

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
anderswc is offline
Reply With Quote
View Public Profile Visit anderswc's homepage!
 
Old 02-26-2009, 11:37 PM Re: Array from a Database
Average Talker

Posts: 15
Trades: 0
Thank you. That worked out great. I've been looking at this whole project way to long and was having a blank moment... Thanks again.
macbaby is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Array from a Database
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.11235 seconds with 12 queries