- Upvotes Received
- 1
- Posts with Upvotes
- 1
- Upvoting Members
- 1
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
I have a couple of sites (on different servers) that I want to see if some critical urls are up and running and this is what I've tried: $handle = curl_init($url); curl_setopt($handle, CURLOPT_RETURNTRANSFER, TRUE); /* Get the HTML or whatever is linked in $url. */ $response = curl_exec($handle); /* Check … |
|
Hi, I have a string that can look a little different from time to time. String Example 1: ((823584X80X998.NAOK == "1")) String Example 2: ((823584X80X1001.NAOK == "1" or 823584X80X1001.NAOK == "2" or 823584X80X1001.NAOK == "3")) And I have this array with matching key (i've shortened the array for readability) ( … |
|
I need to get the earliest date and the latest date in the below query. Not sure if the while loop is necessary to achieve this though? I don't need min/max for every tbl_type but the lowest of them all and the highest of them all. // get min and … |
|
Hi, I have the below array (or is it called string?) with javascript date and a value. I need to sord the elements by the date but i dont know how to do this?! [1366754400000, 8], [1366840800000, 3], [1366927200000, 1], [1368482400000, 1], [1384383600000, 1], [1369951200000, 1], [1377554400000, 1], [1377813600000, 8], … |
|
Hi, I'm getting an url variable from this `test.php?ids=1,2,3` and need to transform it to Array ( [0] => 1 [1] => 8 [2] => 9 ) What I've tried is : `$ids = explode(', ', $_GET["ids"]);` but that gives me an array like this: Array ( [0] => 1,8,9 … |
|
Hi, I have en stdClass object array that looks like this Array ( [10] => stdClass Object ( [inlast] => 2013-02-15 00:00:00 ... etc Where the first number (10) is the uniqe identifier for that row, and the array contains all the rows in the table. So my question is … |
|
Hi, I would like to loop the data-attribute to contain all column names and values from a mysql table. This is what it looks like today: while ($row = $result->fetch()) { echo "<div id='{$row['namn']}' data-column1='{$row['column1']}' data-column2='{$row['column2']}'... So some kind of magic :) loop inside there so I don't have to … |
|
I need to create an dynamic array which will be sent via `$("#ratings").load("ratingscalculator.php?Myarray="+myarray)` and then used in a select query $result = $database->connection->prepare("SELECT *, (SELECT COUNT(*)+1 FROM TABLE WHERE kampanj > t.kampanj and (kampanjnamn = 'Kampanjnamn_1' or kampanjnamn = 'Kampanjnamn_7' or kampanjnamn = 'Kampanjnamn_3' or kampanjnamn = 'Kampanjnamn_4' )) as … |
|
Hi, I have a table and I want to create a field to show whether it's the first occurrence (has the oldest date) of the id in that table. the table looks something like this and it's the last field I need help with creating a update code for. ----id----date_of_trans------custom_id--------cust_type----- … |
|
Two questions, How do I create a unix timestamp from a date variable derived like this: `var myDate = $(this).data('date');` the format is like this: 2013-01-01 and how do i then create a new unix timestamp for 90 days later than myDate? Thanks |
|
The code below is to select and then echo stuff from my db grouped by either weeks or months. I have a couple of more of these and then use offset to get the second week etc. FROM my_db WHERE DATE >= CURDATE() - INTERVAL 10 ".$grouping1." GROUP BY ".$grouping."(DATE) … |
|
Hi, everyday I get a xml file that looks something like this: <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <account-information report-date="2012-12-31T23:59:59.000+01:00" xmlns="http://www.XXX.SE/XXX"> <account> <account-number>00000001</account-number> <status>Open</status> <application-array> <application-type>NEW</application-type> <application-date>2013-01-11</application-date> </application-array> <application-array> <application-type>TOP</application-type> <application-date>2013-04-18</application-date> </application-array> <account-information-type> <first-name-main>John</first-name-main> </account-information-type> </account> </account-information> Today I import each account to our db with only the latest application-array (application-date). The … |
|
Hi, I'm having trouble getting the information I need from my mysql db. I need to write a query that gets me: 1. A list of all combinations of answers from 8 columns and the frequency of them. Every row contains answers from 1 person from a survey and I … |
|
Hi, So far in me slowly learning webdevelopement (mostly thanks to all of you guys) I've used php to query the mysql database to calculate mean/mode/range/median values and to create arrays to visualize with highgraph. Now I've come to a point where I really need if possible, to skip the … |
|
I have a answer table and a attribute table. Answers table: -----token-------question1a1-------question1a2-------question2------........ --aaaBBB324Cc---------Y----------------NULL--------------Y-----........ attribute table: --------token---------attribute_1------.... ------aaaBBB324Cc-----2012-08-13-------..... With higcharts I am trying to display a graph with the total count for each question1(a1-a7) from a month back, with dates from the attribute table (namely the attribute_1 column) this is not … |
|
Hi, I have a 'persons' table, an 'answer' table and a 'token' table. The token table contains matching unique identifiers from the persons table and the answers table. In my query I want to join the persons table with the answers but I don't know how to proceed since they … |
|
Hi, I'm transferring data from one table to another and one of the fields is an email field. I would like to check if the emailfield is empty or otherwise faulty and skip that record if it is. This is how it looks at the moment but it's problamatic since … |
|
Hi, I use this script to extract and insert the desired variables to mysql.It does the job. $xml = new SimpleXMLElement('file.xml'); foreach($xml->loanaccount as $mess){ $account_number= mysql_real_escape_string($mess->account_number); $main= mysql_real_escape_string($mess->main); $type= mysql_real_escape_string($mess->{'application-array'}->{'application-type'}), $date= mysql_real_escape_string($mess->{'application-array'}->{'application-date'}), //insert into databse mysql_query("INSERT INTO account (account_number, main) VALUES ('$account_number', '$main')") or die(mysql_error()); echo "inserted into mysql<br /><br … |
|
I'm trying to get an xml file from an ftp and then insert select data into mysql db. I'm shooting in the dark but from googling this is what i've tried so far: $curl = curl_init(); $file = fopen("import.xml", 'w'); curl_setopt($curl, CURLOPT_URL, "ftp://company@company.company.se/company/import.xml"); #input curl_setopt($curl, CURLOPT_FILE, $file); #output curl_setopt($curl, CURLOPT_USERPWD, … |
|
Hi, I, getting a new xml file everyday to one of our external ftp servers. I want to get that file and then insert select data into my mysql. What I'm thinking is that I would use curl to get the file, then simplexml and then insert into database. But … |
|
Hi, I have two diagrams and one unordered list( http://hardis.synology.me/portalen/filter.png ) that rely on select statements and I'm wondering what the best way to filter those. (one filter for all of them!) $result = mysql_query("SELECT * FROM TABLE WHERE filterArray ORDER BY Datum_formatning ASC"); I have 5 fields that will … |
|
Hi, I've been searching now for the better part of the weekend but I can't get this to work :-/ I want to use Highcharts pie chart to display data from my mysql table. I want to count the column 'Types' occurences of the different Types in that column. Each … |
|
Hi, I have a json_encoded array that comes out like this `{"y":33,"customTooltip":"BOK"},{"y":61,"customTooltip":"DRFlytt"},`... I need it to come out without the quotes surrounding the y and the customTooltip and singlequotes around the last value like this `{y:33,customTooltip:'BOK'},{y:61,customTooltip:'DR'},` Is this possible or should I find another approach? I derive the array like … |
|
Hi, I'm trying to format an array like this: `[['Apr,2012', 5],['May,2012',10],['Jun,2012',20],['Jul,2012', 13]]` from this: while ($row = mysql_fetch_assoc($result)) { $dates[] = date("M,Y", strtotime($row["Datum"])); $data[] = $row["forsta"]; } But I don't know how to combine them in the right format?! Any hints on how to accomplish this? /Adam |
|
Hi, I have this fiddle that works but on my website it does nothing. http://jsfiddle.net/adishardis/r3eyD/17/ What is the best way to troubleshoot why this is? |
|
Hi, I'm wondering what type of mysqlfield would be advantageous for outputting the containing text as a bullit list in php and if the text should be formatted a certain way. I would be supergrateful for an example! :p Take care Adam |
|
Hi when I click the "hide" div I want the three divs to the right to dissapear and the two to the left stay as they were. Her's what I have now: http://jsfiddle.net/adishardis/r3eyD/15/ And then I might want a sliding action of the hiding... but that's probably for another forum … |
|
horizontal scroll from while loop Hmmmm, I accidently posted this in the wrong forum. Is there a way to move it? Hey, ive been trying for several hours now to get the list horizontal with scroll instead of vertical. the divs stacks up to the right but wraps at the … |
|
Hi, I'm working on a site and but have come to an halt. http://adam.synology.me/help1.png today I have a dropdown list (circled in red) which lets the user choose a row of data from my database to visualize in the area to the right in various graphs and such. I would … |
|
I'm trying to use limesurvey but cannot get the slider as i would like it. Here is a link to the surveyquestion: http://adam.synology.me/limesurvey/index.php/survey/index/sid/164171/newtest/Y/lang/sv I want the images to change according to the value of the sliders. With a regular html form i had this to take care of it: <script … |