Menu
  • HOME
  • TAGS

Notice: Array to string conversion in pathname on line 33 Array

php,arrays,json,dynamic,fetch

Get rid of echo. $r is an array not a string and can't be used with echo: //echo $rows["network"][] = $r; $rows["network"][] = $r; And why do you build $rows but json_encode $rows3?...

Perl File::Fetch Failed HTTP response: 500 Internal Server Error

perl,fetch

Could not open socket to 'www.londonstockexchange.com', 'Connection refused Any ideas how i can get past this? Direct connection to this site is blocked somewhere. If you are inside a company there is probably a firewall and some proxy you are required to use. Ask your system administrator....

Call to a member function fetch() on a non-object

php,pdo,fetch

$host="mysql:host=".$host_name.";dbname=".$dbname; $ques_code=1; $dbh = new PDO($host, $dbuser, $dbpass); $dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $S=$dbh->prepare("SELECT q_code FROM question_code_submission WHERE q_num = :id"); $S->bindParam(':id', $ques_code); $success = $S->execute(); if(!$success){ echo "Query failed !!"; }else{ $result=$S->fetch(PDO::FETCH_ASSOC); $code_name = $result['q_code']; echo $code_name; } ...

PHP loop Foreach + While

php,loops,foreach,while-loop,fetch

Since your 2 foreach loops of $dom->find are being located in a single while loop you're basically iterating over all the DOM elements that answers your criteria (td[...]). Those loops have no dependency in the while's loop so I would say it's not efficient. Moreover, you're using constant keys for...

What is the benefit of using PDO::FETCH_CLASS and when to use it [closed]

php,pdo,fetch

It depends on what you like or need. PDO::FETCH_ASSOC makes fetch return an associative array. PDO::FETCH_OBJ is similar, but return an 'anonymous object' with properties. Note that actually 'anonymous object' is the wrong term, but the PHP documentation also uses it. It refers to an object that inherites from StdClass....

Core Data: How to get data of entity in relationship?

ios,core-data,fetch

Just fetch the Person. Fetching the attributes will be done for you in an optimized fashion once you need the attributes. You simply access the attributes (assume they are already there). NSString *message = [NSString stringWithFormat:@"Hello, %@.", person.first]; If you need the addresses, you get them with NSSet *addresses =...

Java resultset displayed in reverse order

java,fetch,reverse,resultset

Add ORDER BY id ASC to sql_qrp....

mysql column data display, fetching all fields of a column and displaying it as a link

php,mysql,fetch

Do this - <?php $mysqli = new mysqli('host', 'username', 'password', 'db'); $SQL = "SELECT * FROM users"; $result = mysqli_query($mysqli, $SQL); while ( $db_field = mysqli_fetch_assoc($result)) { ?> <a href="/<?php echo $db_field['username'];?>"><?php echo $db_field['username'];?></a><br/> <?php } mysql is deprecated. Use mysqli or PDO instead....

PLSQL invalid number error after fetch

plsql,numbers,fetch

I'm not sure what is the data type of LAT and LON in your table POSTCODE. But whatever variables you define to fetch data into, they must match these types. For examples, assuming that LAT and LON are of the type NVARCHAR2, then I would rewrite your declaration section as...

How to figure out the optimal fetch size for the select query

oracle,memory,jdbc,fetch

As with (almost) anything, the way to find the optimal size for a particular parameter is to benchmark the workload you're trying to optimize with different values of the parameter. In this case, you'd need to run your code with different fetch size settings, evaluate the results, and pick the...

how to data store in mysql using form in php

php,mysql,fetch,sql-insert

<input type="submit" value="Save"></input> you missed name attribute here changed it to <input type="submit" name="submit" value="Save"></input> ...

Pythons imaplib: fetch command, with or without parentheses, 'Invalid Fetch attribute' error for ALL item

python,imap,fetch,imaplib,imapclient

ALL isn't a fetch item, it's a macro. A bit a special case in the syntax. There are two others, FAST and FULL. They're like fetch items but with some extra restrictions, one of which you've run into. I suggest that you just use the equivalent fetch items and you'll...

NHibernate many-to-one with lazy false ever executes N queries

nhibernate,fetch

HQL does not respect fetch="join" (in the mapping). I explicit it adding fetch in the join: select pc from Purchase as pc inner join **fetch** pc.Product as p left outer join **fetch** p.Brand as b ... and it works: only one query is executed....

Fetch part of url to make subject of mail

php,fetch,subject,mail-form

Your solution is not working yet. I tried to copy the $vacancies into the subject define field, but then the subject of the mail is empty. I have two files, one mailform and one form.lib. In the mailform I have this code: <input type="hidden"style="font-weight:bold" formmethod="POST" name="field_5" id="field_5" value=" <php str="http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];...

how to edit XML files in batch / python

python,xml,batch-file,vbscript,fetch

Let's utilize python! it's extremely easy to do that in python. and since you said it's ok to make a solution in python, check the script below. here's how you can iterate over a directory contains xml files and process them as requested in python while saving the file changes....

Related nodes are not fetched in Spring Data Neo4j 4.0.0

neo4j,nodes,fetch,spring-data-neo4j,spring-data-neo4j-4

This issue has been fixed post 4.0.0M1, please use the latest build snapshot, thanks.

Fetch relational entity from core data using magical record

core-data,entity,relationship,fetch,record

Finally I got the solution. This can be done as simple as following: NSPredicate *peopleFilter = [NSPredicate predicateWithFormat:@"ANY events.eventType contains %@",@"love"]; NSArray *people = [Person MR_findAllWithPredicate:peopleFilter]; return people; (A person has an array of events)...

while ($stmt->fetch()) not fetching all rows

php,sql,loops,fetch

As you say, when you do this: if($stmt->fetch()==null) the code fetches the first row. If it doesn't exist, the condition triggers. Otherwise, it goes on, and when you start fetching rows "for real", the first one has already been fetched. What you could do instead is checking the number of...

How to use OFFSET and Fetch without Order by in SQL Server

sql-server,sql-server-2012,sql-order-by,fetch,offset

By adding an identity column to the temp table variable declare @TempTable table([some columns], rownr int identity(1,1) ) INSERT INTO @TempTable [some columns] select [some columns] from table1 order by col1 INSERT INTO @TempTable [same columns] select [some columns] from table2 order by col2 An automatic incrementing number is added...

Hibernate join fetch does an N+1, how to fix it?

hibernate,join,left-join,fetch

Adding the other associated collection as 'join fetches' in the query fixed it, and the whole thing ran in 1 query. I think using a query overrides the default fetch strategy, but the fact that there were other relations in there not being join fetched meant that Hibernate treated them...

Fetch rss with php - Conditional for Enclosured image and not Enclosured

php,xml,rss,fetch

Is there a way i can create a conditional to use the correct code and always shows the thumbnail? Sure there is. You've not said in your question what blocks you so I have to assume the reason, but I can imagine multiple. Is the reason a decisions with...

php mysql fetch two table [closed]

php,mysql,while-loop,fetch

Well you can first fetch the photos and the videos as you did, but before writting the HTML. For example you can put your results into a $photos and $videos arrays. then you can check if both variables has results, and if it is the case write only the HTML...

How to fetch body from imap server in Go

go,imap,fetch

I figured out how to get the body text now. cmd, _ = c.UIDFetch(set, "RFC822.HEADER", "RFC822.TEXT") // Process responses while the command is running fmt.Println("\nMost recent messages:") for cmd.InProgress() { // Wait for the next response (no timeout) c.Recv(-1) // Process command data for _, rsp = range cmd.Data {...

SELECT * FROM WHERE Query isn't retrieving any results

mysql,select,mysqli,fetch

Forgot to post this, redid the code with prepared statements and it works, not sure what exactly I changed but here it is anyhow: $jobnumber = $_GET['jref']; $stmt = $conn->prepare( "SELECT `Job Name`, `Address`, `phone`, `description`, `materials` FROM po_10152796 WHERE po = ?"); $stmt->bind_param("i", $jobnumber); if($stmt->execute()){ $stmt->bind_result($jobname, $address, $phone, $description,...

How to Correctly Fetch Data From Query Generated Array

php,arrays,pdo,fetch

using ->fetch(PDO::FETCH_ASSOC) $search->execute(); while($row = $search->fetch(PDO::FETCH_ASSOC)){ echo "Title: " . $row['comicTitle']."<BR>"; echo "Issue: " . $row['comicIssue']."<BR>"; echo "Release: " . $row['releaseDate']."<BR>"; } using ->fetchAll(PDO::FETCH_ASSOC) $search->execute(); $result = $search->fetchAll(PDO::FETCH_ASSOC); foreach($result as $row) { echo "Title: " . $row['comicTitle']."<BR>"; echo "Issue: " . $row['comicIssue']."<BR>"; echo "Release: " ....

Why this code does not fetch query as I expect?

php,mysql,mysqli,sum,fetch

As the error says, fetch_assoc returns an array, so do print_r($total_quests->getch_assoc()) and see the structure of the array. You propably will have to pick up the first one result, but I suggest you to do it using foreach loop.

It takes long time to fetch images (Objective-C)

objective-c,image,core-data,fetch,photo

Images are stored in Core Data as raw blocks of data. The data is the same as when you convert UIImages to NSDatas. This can result very quickly in a LOT of data being stored in your database, which has to be fetched and de-serialised, hence why it can be...

Git fetch adds random text to my code

git,github,fetch,pull

This is git merge conflict. The remote and local versions of the source files, both have changed the same file. Git marks the change from your local head first <<<<<< HEAD your changes ======= remote changes >>>> You have to edit this file manually and resolve the conflict. See this...

Backbone.js collection fetch not setting response objects as models

backbone.js,collections,fetch

The response must be an array. Each item in the array is turned into a model. Your response is an object. Update your parse method to pull out the values (as an array) from the response into an array and it'll work. MyApp.ItemCollection = Backbone.Collection.extend({ model: MyApp.Item, url: '/api/v1/item/', parse...

My PDO fetch returns “array” instead of number of points

php,mysql,pdo,fetch

If you just want a single value out of the query, then don't use fetchAll() to get an array/list. $pointsfetched = $fetchpoints->fetchObject()->points; Is often the most concise option. (fetch and fetchObject just pull a single row from the result set.)...

Array Fetching time one row value is skipping by code

php,mysql,fetch

Your code is correct.The only thing to do is just remove the first assignment of mysql_fetch_array($result). $row=mysql_fetch_array($result) Just remove this assignment and then run your code.It will work fine....

Get Data From Wordpress user meta table

php,mysql,database,wordpress,fetch

Have you tried to use Wordpress get_user_meta() function ?

$GET query to directory?

php,parameters,get,fetch

Have a look at $_SERVER[REQUEST_URI] This will return you the current url. Then process it using simple string or array functions to get the params, like $current_url = $_SERVER['REQUEST_URI']; $url_arr = explode("/", $current_url); Then access the parameters using the array indexes like $page = $url_arr[0];...

Does not generate data in bootstrap thumbnail

php,html,mysql,twitter-bootstrap,fetch

Your select query is not correct. You should use JOIN of mysql. I don't know your database structure. If you show your database structure then I could help you. Please try below query and share the results $sql = "SELECT advertentie.* FROM advertentie LEFT OUTER JOIN categorie on advertentie.categorie_id =...

Fetchxml to get contacts with active opportunities having the current user as owner CRM 2013

dynamics-crm-2011,dynamics-crm,fetch,dynamics-crm-2013,fetchxml

I'm not an expert of FetchXML, but I think this query is not possible. This is the CRM explanation: related entity conditions or groups cannot be grouped with the parent entity conditions or group ...

Hibernate is doing multiple select request instead one (using join fetch)

java,hibernate,jpa,hql,fetch

You are experiencing a well known problem, a.k.a. the "N+1 selects". In short, the "N+1 selects" problem occurs when you select a parent entity and hibernate will make additional select for a child related to the parent with OneToOne. So if you have "N" parent-child records in the database, hibernate...

How to avoid someone to fetch my database? [closed]

php,video,fetch

If all your pages are public, i.e. anyone can go to any site at any time, there's only one thing you can do against a bot automatically scraping your site: detect scraping behaviour and throttle it. That means you need to track every visitor by IP address and/or other characteristics...

Fetch array after SELECT statement

python,mysql,arrays,fetch

The type of two variables is different. Try to print type(attivo) to figure out what is the type of two variables. The function fetchall() return a tuple of tuples. So you need to compare the value inside it to 1, not the tuple itself. if attivo[0][0] == 1: print "1"...

How do I cancel an HTTP fetch() request?

javascript,ajax,fetch

I don't believe there is a way to cancel a request with the existing fetch API. There is ongoing discussion about it at https://github.com/whatwg/fetch/issues/27

How can I get all id's from a database column into one single array?

php,mysql,pdo,fetch

You are mixing mysql_* and PDO, which is obviously not going to work. Just fetchAll() your results and then just merge all rows into one array by simply looping through all rows with array_map() and returning the id, e.g. $stmt = $DBH->query("SELECT Tid from Playlist"); $result = $stmt->fetchAll(PDO::FETCH_OBJ); $ids =...

How can I combine multiple IMAP fetch commands?

java,javamail,imap,fetch,javax.mail

You have to retrieve the same bodyparts for each message. That is, if you want part 1 for messages 2 and 4 and part 2 for message 3, you cannot send fewer than two commands: a uid fetch 2,4 (body[1]) b uid fetch 3 (body[3]) The good news is that...

GitHub Forked Repository doesn't update after pull (or fetch and merge)

github,fork,fetch

It won't update because you already have every commit from upstream in your hostory. If you deleted some files and commited the changes that means you are ahead.

Ruby 2.1.3 options hash cannot be assigned with fetch

ruby,hash,fetch,options

You actually have the correct structure down, however the final puts in your method is causing the return value to be nil. Ruby utilizes an implicit return, so unless specified, it will return the last value of a method. remove the puts aspect_ratio from the method, or ensure the last...

fetch_array() - cannot add multiple array fields to new array

php,arrays,json,mysqli,fetch

Are you sure the array is properly populated to begin with? print_r($resultArray) and see what you have there with = $row (which is correct).

Fetch data from website real time

c++,visual-studio-2010,visual-c++,curl,fetch

HTTP requests are stateless. You make a request, you get a result, then you make another completely independent request, you get another result, and so on. If the resource you are trying to access is changing over time, you need to make multiple requests, where each time you will get...

Unable to implement Load More in Listview using AsyncTask android

android,android-listview,android-asynctask,fetch

Create a new instance of your AsyncTask private void loadSomeData() { MyTask task = new MyTask(); task.execute(); } privat void loadMore() { MyTask task = new MyTask(); task.execute(); } Obviously, there are different ways to do it but that's to give you the idea. What you can't do is create...

fetch/merge my local branch with a certain remote branch

git,merge,branch,fetch

Shouldn't you be merging with your local core15 branch? Normally, your local master branch should track the remote master branch. But I guess people have different git workflows. This is what I would normally advise: git fetch git checkout core15 git merge origin/core15 Your essentially sync merging your core15. Then...

CUDA tex1Dfetch() wrong behaviour

c++,c,cuda,textures,fetch

This line of the kernel input = tex1Dfetch(tex, idx); is causing race condition among the threads of a block. All threads in a block are trying to fetch value from texture into the __shared__ variable input simultaneously causing undefined behavior. You should allocate separate shared memory space for each thread...

Keep somewhere additional data after backbone's collection fetched

javascript,backbone.js,collections,fetch

If I understand your question correctly, the answer is straight forward. You're not limited to simply saving data in a collection or in the model.attributes hash. Backbone objects are traditional javascript objects and you can create any custom property you'd like. So, in your parse function, you could do... parse:...

PHP cUrl fetch website content for offline usage

php,curl,hyperlink,fetch,offline

<?php include_once('simplehtmldom/simple_html_dom.php'); //set up curl $ch = curl_init('http://example.com'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $curl_html = curl_exec($ch); //use curl to get data from example.com //use simplehtmldom to parse the site into a dom-like object $html = str_get_html($curl_html); echo $html; ?> Here is good example & solution refer this link1 link2 link3...

Mysql PDO : get row with “dynamic” fields in query

php,mysql,pdo,row,fetch

Wrap the constant in {} to create dynamic variables. echo $rs->{FIELD_NAME}; You can see some example from the documentation. Curly braces may also be used, to clearly delimit the property name. Demo: http://3v4l.org/sgvV4...

Adding Array to MySQL Fetch

php,mysql,arrays,json,fetch

Don't use fetchAll and while together. Then: $posts = array(); while ($post = $database->fetch()) { $post['additional'] = 'test'; $posts[] = $post; } Or: $posts = $database->fetchAll(); foreach ($posts as &$post) { $post['additional'] = 'test'; } ...

How to download a web directory when authentication is required?

linux,wget,fetch,ubuntu-14.04,web-folders

Sounds like you are using basic auth. You can pass this to wget with the following syntax: wget http://user:[email protected]/.... ...

Fetch Android files using FTP and Python

android,python,ftp,connection,fetch

ftp = FTP('123.456.7.89:13000', 'username', 'password') The documentation of ftplib suggests that the first argument must be a host, not host:port. This explains also the following error: [Errno 11004] getaddrinfo failed This is an error from the resolver, because it tried to interpret the given name 123.456.7.89:13000 as hostname, IPv4...

Backbone view render with multiple model fetch

jquery,backbone.js,collections,model,fetch

You can combine the requests' promises returned by fetch with jquery.when to synchronize your rendering task. Something like: render: function(){ var that = this, promises = [], user = this.utilisateur, clients = this.listeClient; promises.push(user.fetch()); promises.push(clients.fetch()); $.when.apply(null, promises).done(function(){ that.$el.html(FormTemplate({clients: clients.models, user: user})); }); return this; } ...

Post Fetch_Assoc to another form

php,mysql,variables,table,fetch

i solved my answer, i only create a form in each row, and a submit button in the last TD Thanks...

mysql_fetch_array() expects parameter 1 to be resource, boolean given in, and a [duplicate]

php,mysql,sql,select,fetch

<?php if (isset($_GET['id'])) { $con = mysql_connect("xxxx.net","username","password") or die("Connection to server Failed"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("xxxxdb") or die("DB Selection Failed"); $messages_id = $_GET['id']; $result = mysql_query("SELECT * FROM reservation where reservation_id ='$messages_id'"); if($result === FALSE) { die(mysql_error()); // TODO: better error handling }...

Mysqli prepared statements register

php,mysqli,fetch,statements,close

UPDATED: more logical statement $result = $mysqli->prepare("SELECT username FROM user WHERE username=?"); $result->bind_param("s", $username); $result->execute(); $found = $result->fetch(); $result->close(); if ($found){ echo "User already exists!"; } else { $register = $mysqli->prepare("INSERT INTO user (username, password, email, rr, rank) VALUES (?, ?, ?, ?, ?)"); $register->bind_param("sssii", $username, $kode, $email, $rr, $rank);...

CloudKit Batch Fetches?

objective-c,fetch,cloudkit

The number of records returned by CloudKit is not fixed. CloudKit has a mechanism for deciding how many records to return. It looks like it's currently 100, but it could change depending on the current load on Cloudkit. It is possible to set this to a fixed number on the...

How to appropriately performFetch from NSFetchedResultsController after changes in another context?

ios,objective-c,core-data,refresh,fetch

I am not sure what your complete setup involves but you do need to implement NSFetchedResultsControllerDelegate protocol methods to dynamically update your tableview cells. https://developer.apple.com/library/prerelease/ios/documentation/CoreData/Reference/NSFetchedResultsControllerDelegate_Protocol/index.html If you are using different managed object context to make updates, you will have to merge those changes as well before they are reflected in...

MYSQL fetching rows to different tables

php,mysql,row,fetch

You need to create a separate table for every type of record you have? Simple enough, if you order your records by the type: SELECT * FROM whatever ORDER BY type_of_record then $previous = null; while(... fetch from db ...) { if ($row['type'] != $previous) { ... got new record...

Unable to see an array's content

php,arrays,pdo,fetch

How about some executing between the preparation and the fetching? like this: $req->execute(); Also i think you want to print the array where you fetched your data in like this: <pre> <?php print_r($article) ?> </pre> So all in all your code should look something like this: <?php try{ $req =...

Symfony 2 doctrine request object by Id giving blank page

database,symfony2,doctrine,fetch

Intermediary answer: for now I am using \Doctrine\Common\Util\Debug::dump($article); in order to get the output without problem. Apparently there are extensions that allows to echo the output in a more properly manner. If I find something better I will come back to post it here....

mysqli fetch_array() is only turning first row of retrieved data into an array

php,arrays,mysqli,fetch

You want to use fetch_all(); fetch_array() returns just one row (as an array) See http://php.net/manual/en/mysqli-result.fetch-all.php This is in fact what the outermost while is doing, fetching one row at a time with fetch_array()...

PDO fetch without moving internal cursor

php,pdo,fetch

Your example $this->db->query($somequery, $arrary_replacements); if($this->db->getField("myField") === null){ // Do some stuff // Do some database queries too }else{ $row = $this->db->nextRow(); // Process $row } In my mind, your example usage is flawed. You have already accessed the first row by using getField(), therefore logically, I would assume nextRow() should...

Migrating to prepared statements

php,prepared-statement,fetch

Done some changes to your code according to the example in the docs http://php.net/manual/en/mysqli-stmt.bind-result.php One great thing about parameterized queries is that we no longer (usually) need to escape data, it's done for us :D $sql = "SELECT id,title,description,champion FROM our_videos WHERE datemade BETWEEN NOW() - INTERVAL ? DAY AND...

Error when upgrading MySQL to PDO: Call to a member function fetch() on a non-object

php,mysql,pdo,fetch

Always prepare the query Check for the returned values Print errors $nextTicket = $ticket->fetch($thread) is really strange If you query 3 times the same query you doing it wrong. Enable error mode no need for recursion, just loop through the records. function getComments($ID) { $db = new PDO("mysql:host=$dbHost;dbname=$dbDatabase", "$dbUser",...

Content Service for Google Apps Script returning HTML instead of JSON

javascript,google-apps-script,fetch

Your usage of ContentService is correct, the code works exactly as is. Here is a link to my copy of your code published as a web app: https://script.google.com/macros/s/AKfycbzx2L643LHw0oQAq1jBmKQh2ju_znGfmdj78dUypj36iF-s91w/exec The problem you are running into is related to Authorization or Authentication, if the published script is not authorized, an HTML error...

Prepared Statement; fetch() or fetch_all()? Issue with While Statement

php,prepared-statement,fetch

Is this thinking correct? fetch() for one, fetch_all() for many? That's actually two different methods of two different objects. fetch() belongs to mysqli statement object and uses ugly method of assigning query result to global variables. Can be run in a loop. Loop is a thing where you can...

fetch --nohooks chromium : Permission Denied?

git,unix,browser,fetch,chromium

what's the cwd when you running $fetch chromium --nosvn=True? From the trace, looks like you do not have write permission to write file ./.glcient.

React Native fetch is not a function

fetch,react-native

You don't need to require it. It's a polyfill for the browser version, and like the browser version it's always available to the global scope. Take a look at the Movies example and you'll see that fetch is used without explicitly having to require it.

Mysql Fetch not working

php,mysql,mysqli,fetch

You're using a mysqli DB connection, but calling mysql to do your select. You cannot mix/match the database libraries like that. If you'd had even minimal error checking, you'd have been told that there's no connection to the db: $result = mysql_query($select) or die(mysql_error()); ^^^^^^^^^^^^^^^^^^^^^ Plus, your select query has...

PDO fetch and fetchAll with conditional statement not working

php,pdo,fetch,conditional-statements,fetchall

All the fetchXYZ methods advance the underlying cursor, so once you've called them, you cannot "go back" and get the same rows again. You could redo your condition in-memory, after calling fetchAll() only once: $result = $statement->fetchAll(); if (count($result) == 1) { $result = $result[0]; } ...

Fetching a jquery DYNAMIC value from website

javascript,php,jquery,string,fetch

You can do this: $('#result').load('otherPageUrl.php div#currentTime'); See: Example The only problem with this is cross domain restrictions or this will not be possible. The other way you can do this is by the use of iframe....

My fetch appears not to get any results

php,pdo,fetch

You assigned the sql query to $sql2 and ran $sql in $connect->query($sql) Correct would be: $sql2 = "SELECT * FROM advertentie"; $result2 = $connect->query($sql2);...

Fetch several rss feeds from other blogs in one page

wordpress,function,rss,fetch,autoblogged

Much easier to use WordPress's built-in RSS function. See https://codex.wordpress.org/Function_Reference/fetch_feed Use it as many times as you want in a php template, or make it generate a shortcode. Style the <ul> and <li> and add a containing <div> if needed. Example: <?php // Get RSS Feed(s) include_once( ABSPATH . WPINC...

Can't echo array properly

php,mysql,arrays,fetch

You are missing loop, data come up. You can see when you are printing data using print_r($fetch), use loop to show one by one. And also try to don't use user input directly in query before checking mysql injection. like you have putted username='qwe' if username is user input then...

Issue with rand() function in PHP

php,mysql,random,fetch

add this to your query: ORDER BY RAND() LIMIT 1 ...

Get the latest files from Location using Python

python,csv,fetch

You could do this: Get the latest date by splitting individual file names and taking the first element from reverse sorted. From the latest date, get all the files which contain latest date fileList = ['DataLogs_20141125_AP.CSV', 'DataLogs_20141125_UK_EARLY.CSV', 'DataLogs_20141125_CAN.CSV', 'DataLogs_20141125_US.CSV', 'DataLogs_20141125_EUR.CSV', 'DataLogs_20141125_US_2.CSV', 'DataLogs_20141126_AP.CSV', 'DataLogs_20141126_UK_EARLY.CSV','DataLogs_20141126_CAN.CSV', 'DataLogs_20141126_US.CSV','DataLogs_20141126_EUR.CSV',...

Sending data as key-value pair using fetch polyfill in react-native

http,fetch,react-native

Sounds like you want the same format as a querystring, so import/require a package like https://www.npmjs.com/package/query-string which doesn't appear to depend on any browser features and has a stringify method: queryString.stringify({ foo: 'bar', nested: JSON.stringify({ unicorn: 'cake' }) }); //=> foo=bar&nested=%7B%22unicorn%22%3A%22cake%22%7D Alternatively you could just use the relevant part of...

Fetching entity's relationship NSSet [closed]

core-data,request,nspredicate,fetch

Found it out myself, anybody who has the same Problem: NSPredicate* predicate = [NSPredicate predicateWithFormat:@"ANY entityName=%@", @"B", selected];...

How to connect from your iOS app to a backend server? how to read,modify and fetch data to backend server?

ios,objective-c,server,fetch,backend

First, you have to create API in ruby. Here is a tutorial on how to do it: https://www.codeschool.com/courses/surviving-apis-with-rails. After that, when you are sure that your API is working correctly, you can write a service for HTTP communication. You can do it by yourself, but in my opinion much better...

Matlab FRED data import (fetch error)

matlab,fetch

It appears that FRED doesn't like non-HTTPS requests. I get the same error you report in Matlab 2015a, but if you change the url to https, it works ok. c = fred('https://research.stlouisfed.org/fred2/'); d = fetch(c,'DEXUSEU'); If you take the url that Matlab is requesting from FRED and paste it in...

SQL fetch with user supplied array

php,sql,fetch

You don't have a WHERE clause in the query; it will return the entire table and this is not what you need. More, even if you add a WHERE clause, LEFT JOIN will still return more rows that you need. A possible solution to your problem could be: SELECT p.part_id,...

Core Data - Accessing data in retrieved Managed Object (swift)

ios,swift,fetch,nsmanagedobject,nsfetchrequest

With Martin R's help I finally solved my problem. Here is my code from giveMeData method: // entity descritption let entityDescription = NSEntityDescription.entityForName("Contact", inManagedObjectContext: managedObjectContext!) // request let request = NSFetchRequest(entityName: "Contacts") //request.entity = entityDescription // predicate - stanovení parametrů, na základě kterejch to vyhodí výsledek //let pred = NSPredicate(format:...

Location updates not received during Fetch background mode

ios,background,location,fetch

This was either due to not creating a UIBackgroundTask or using Selene. Using NS APIs solved the issue.

React-native upload image to amazons s3

javascript,file-upload,amazon-s3,fetch,react-native

multipart/form-data support for React Native (via the XHR FormData API) for mixed payloads (JS strings + image payloads) is in the works. It should land in GitHub soon.

CloudKit fetchRecordWithID error: “Fetching asset failed”

ios,fetch,cloudkit

As you can see in your screenshot the error code is 4 which is a network error See xcdoc://?url=developer.apple.com/library/ios/documentation/CloudKit/Reference/CloudKit_constants/index.html#//apple_ref/c/tdef/CKErrorCode Try switching to 3G or WiFi to see if there is different behavior. If you go to your app settings, is mobile data enabled? Can you run the code from the...

React Native - Interact with API - Special Characters Causing Issues - What's the best way to do this?

post,get,fetch,react-native

"it groups the data into a single unnamed parameter (changing the API to accept this is not an option)." It would, because you've set the post body. This is how it's supposed to work. I wish to receive the data as two strings that can be parsed as json...

Angularjs - returning data from a ng-option

angularjs,data,fetch

According to your piece of code: correct option name for ngOptions. I didn't see center_navn is an attribute of your center object. working filter. Please provide more details about what the scope variable centre is. Here's working plunker: http://plnkr.co/edit/Q8jhdJltlh14oBBLeHJ9?p=preview...

Backbone: Collection Won't Reset

javascript,backbone.js,fetch,reset

Instead of calling reset before your fetch, a better way to do this would be to use: collection.fetch({reset: true}); As per the Backbonejs docs, "When the model data returns from the server, it uses set to (intelligently) merge the fetched models, unless you pass {reset: true}, in which case the...

fetch single model from json array in backbone.js

arrays,json,backbone.js,model,fetch

I will suggest you to change a few things in you code and read more about Backbone.Model and Backbone.Collection and how REST-ful resources behave themselves. Try to use Backbone.Collection when you are dealing with the collections of objects or so called resources (from REST). And mention appropriate Backbone.Model to that...

NHibernate iStatelessSession returns duplicate parent instances on eager fetch

nhibernate,fluent-nhibernate,fetch,eager,istatelesssession

I would say: Do not use StatelessSession. It does not suite to this use case. 13.2. The StatelessSession interface Alternatively, NHibernate provides a command-oriented API that may be used for streaming data to and from the database in the form of detached objects. A IStatelessSession has no persistence context associated...

How do I use window.fetch() with httpOnly cookies

javascript,dom,cookies,fetch

Okay, I found out after reading on the Mozilla Developer Network a bit more and trying out the credentials option. Looks like the credentials option is what I should have looked for. fetch('/something', { credentials: 'same-origin' }) // or 'include' Will send the cookies....

Meteor cursor.fetch().property returns “undefined”

javascript,meteor,settimeout,fetch

You are trying to get the BusinessContact property of an array - try doing userTags[0].BusinessContact PS: Try to make a meteorpad.com when posting a problem...

Caching jsonp callback parameter when doing a backbone fetch

jquery,ajax,caching,backbone.js,fetch

FYI. The solution that appears so far to have worked was to not override the fetch but override the sync and hardcode a string as the jsonPCallback such as below. sync: function(method, model, options){ options.dataType = this.SYNC_METHOD; options.cache = true; options.jsonp = 'callback'; options.jsonpCallback = "onNowCallback"; return Backbone.sync(method, model, options);}...