-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnew_stocks_option.php
43 lines (21 loc) · 979 Bytes
/
new_stocks_option.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
require_once './include/common.php';
$query = "SELECT DISTINCT name FROM stockOption";
$result = mysqli_query($GLOBALS['mysqlConnect'],$query);
$records = mysqli_fetch_all($result);
foreach ($records as $record) {
$company = $record[0];
//$symbol = urlencode($symbol);
echo $query = "UPDATE `stocklistbackup` SET `ntype`='option' WHERE `cSymbol` = '$company'";
$result = mysqli_query($GLOBALS['mysqlConnect'],$query);
/*
$company = mysqli_real_escape_string($GLOBALS['mysqlConnect'],$company);
$money_control = "https://www.google.com/search?q=".$company."+moneycontrol";
$charink = "https://chartink.com/stocks/$company.html";
echo $query = "INSERT INTO stocklistbackup(sName, cSymbol, mcurl, murl, curl, tickertape, industry, ntype) VALUES ('$company','$company','$money_control','','$charink','','','option')";
$result = mysqli_query($GLOBALS['mysqlConnect'],$query);
sleep(1);
*/
echo "\n";
}
?>