Note that there are some explanatory texts on larger screens.

plurals
  1. POGrabbing All of MYSQL Rows Using Array
    primarykey
    data
    text
    <p>Hi I'm trying to output all of the rows and information from my table :</p> <p>id,Symbol,entry,<code>exit</code>,openclosed,entrydate,longshort,target_one,target_two,target_three,notes</p> <p>This is through this script I'm working on to get this functionality. Right now I'm only outputting one of the database entries. This entry of course being the last one. For reference the last entry symbol is GLD. I'd like it to continue with the next symbols, but can't seem to get it to output. The outputted data for quote_0,quote_1 ect. come from yahoo as an array. </p> <pre><code>&lt;?php error_reporting(E_ALL ^ E_NOTICE); ini_set("display_errors", 1); //begin include "storescripts/connect_to_mysql.php"; $sql = mysql_query("SELECT * FROM stockpicks ORDER BY id LIMIT 100"); $productCount = mysql_num_rows($sql); // count the output amount if ($productCount &gt; 0) { // get all the product details while($row = mysql_fetch_array($sql)){ $id = $row["id"]; $symbol = $row["symbol"]; } } mysql_close(); //end if(empty($symbol)) { echo nothing; } else { $open = fopen("http://quote.yahoo.com/d/quotes.csv?s=$symbol&amp;f=sl1d1t1c1ohgv&amp;e=.csv", "r"); $quote = fread($open, 1000); fclose($open); $quote = str_replace("\"", "", $quote); $quote = explode(",", $quote); $quote_0 = ($quote[0]); $quote_1 = ($quote[1]); $quote_2 = ($quote[2]); $quote_3 = ($quote[3]); $quote_4 = ($quote[4]); $quote_5 = ($quote[5]); $quote_6 = ($quote[6]); $quote_7 = ($quote[7]); $quote_8 = ($quote[8]); echo "&lt;div class='symbol'&gt;&lt;div class='quote'&gt;Company: $quote_0&lt;/div&gt;&lt;/div&gt;"; echo "&lt;div class='leftofStocks'&gt;&lt;div class='row'&gt;&lt;div class='quote'&gt;Last trade: $$quote_1&lt;/div&gt;"; echo "&lt;div class='quote'&gt;Date: $quote_2&lt;/div&gt;"; echo "&lt;div class='quote'&gt;Time: $quote_3&lt;/div&gt;"; echo "&lt;div class='quote'&gt;From Previous: $$quote_4&lt;/div&gt;&lt;/div&gt;"; echo "&lt;div class='row'&gt;&lt;div class='quote'&gt;Open: $$quote_5&lt;/div&gt;"; echo "&lt;div class='quote'&gt;High: $$quote_6&lt;/div&gt;"; echo "&lt;div class='quote'&gt;Low: $$quote_7&lt;/div&gt;"; echo "&lt;div class='quote'&gt;Volume: $quote_8&lt;/div&gt;&lt;/div&gt;"; } ?&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload