Forum Replies Created
- AuthorPosts
lawrencepepper
ParticipantYes that worked.
I tested this code on another page on the site and it works fine:
mysql_connect('localhost', 'xxx', 'xxx');
mysql_select_db('qa');
$query = "SELECT * FROM qa_vendors";$result = mysql_query($query) or die(mysql_error());
while($row = mysql_fetch_array($result)){
echo $row['company'];
echo "<br />";
}It returns the list of companies from the table.
How can I get this code to work.
Thanks for the patience, I am new to PHP and am just learning. I have a strong background in CFM so I understand the queries, just not the PHP syntax to well yet.
L
lawrencepepper
ParticipantI placed the code into my functions.php file and the Bulk Option does not show but it is not populating with the query. It is just blank.
L
lawrencepepper
ParticipantLooking to do this but want my array to be populated with data from my database.
Here is what I have so far for creating the array.
<?php
mysql_connect('localhost', 'xxxx', 'xxxx');
mysql_select_db('qa');$query = mysql_query('SELECT company FROM qa_vendors ORDER BY company ASC');
$result = mysql_query($query);
$companies = array();
while ($row = mysql_fetch_assoc($result)){
$companies = $row['company'];
}
?>How can I then get this array to be listed as a bulk option?
Any help would be appreciated.
lawrencepepper
ParticipantForget it.
Figures, just went back and it verified.
L
- AuthorPosts