w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
SQL Code in home rolled gridview search results not displaying correct results
Have you tried wrapping all the OR statements in your query in () It almost looks as if it's reading it as: (record_number >= 500 AND ([column_a] LIKE '%' + @column_a + '%')) OR ([column_e] LIKE '%' + @column_e + '%') OR ([column_g] LIKE '%' + @column_g + '%') OR ([column_h] LIKE '%' + @column_h + '%') OR ([column_j] LIKE '%' + @column_j + '%') rather than: record_number >= 500 AND (([column_a] LIKE '%' + @column_a + '%') OR ([column_e] LIKE '%' + @column_e + '%') OR ([column_g] LIKE '%' + @column_g + '%') OR ([column_h] LIKE '%' + @column_h + '%') OR ([column_j] LIKE '%' + @column_j + '%')) the difference being that it sees the >= 500 plus the first statement for column_a as one condition in which case the other conditions can be true as well resulting in results that are re

Categories : C#

tipue search not displaying search results
Well, to begin with, you're missing a comma (which I believe is required) next to 'mode': 'live': $(document).ready(function() { $('#tipue_search_input').tipuesearch({ 'mode': 'live', 'liveDescription': '.header', 'liveContent': '.container' }); }); This should've produced an Expected token '}' error in your console.

Categories : Javascript

Search Form Suddenly Not displaying results
So, to be clear, you see "0 Search Results"? Are there any errors in the logs or output? Have you tried echo()'ing your SQL statement: echo "select * from propertyinfo where Property like '%$property%' and NumBed like '%$bedroom%' and NumBath like '%$bathroom%' and Price >= '$priceMin' and Price <= '$priceMax' and utilities like '%$check%' and TermLease like '%$termlease%'" ... and then paste that SQL statement directly into the CLI. Other than your SQL being subject to SQL injection attack, you might find that you have some stray characters in the input causing problems with your SQL statement.

Categories : PHP

Rails: Need help building a basic AJAX search form and displaying results
Strongly recommend to go with this approach: Search, Sort, Paginate with AJAX by the way the jquery method .live() which author using is outdated and were replaced with .delegate() jquery documentation .deleate()

Categories : Javascript

Youtube API - API search results differ from web search results, and no partial matches?
In the web you are searching the entire channel (not only the uploads playlist but all the playlists inside the channel) vs in the second one you restrict the search with uploads playlist. I also strongly suggest to use Data API v3 instead of GData

Categories : Android

MySQL results inserting into database but not displaying any results
You must not select columns with single quotes but instead you should select them with backticks . Change your query to $sql = "SELECT `topic_id`, `topic_subject`, `category`, `sub_category`, `posted_by`, `posted`, `view`, `reply` FROM `topics` WHERE topics.topic_id = '".mysql_real_escape_string($_GET['id'])."' "; and also change this query $posts_sql to : $posts_sql = "SELECT posts.post_topic, posts.post_content, posts.post_date, posts.post_by, users.user_id, users.username, users.profile FROM `posts` LEFT JOIN `users` ON posts.post_by = users.user_id WHERE posts.post_topic = '" . mysql_real_escape_string($_GET['id'])."' "; there is a different between backt

Categories : PHP

How do I change the alignment of my search box?
Close the button tag You've floated both the search bar and the button. The parent div won't use the height that the children occupy, until you insert a div with style "clear:both". You've done a "clear: both" after the form, and not after the children. <form class="form-wrapper cf"> <input type="text" placeholder="Search here..." required> <button type="submit">Go< /button>< div style="clear:both"> </div> </form> With respect to aligning it to right top, you need to position it absolute or fixed, and specify the "right" and "top" attributes. Did you even try doing that? Or, did you think that you could copy a snippet from somewhere and Stackoverflow members would fix it for you? .form-wrapper { width: 450px;

Categories : CSS

Displaying a search term in search field after submit
There is no HTML5 tag that means "remember what was typed in here prior to submitting the form" -- that isn't the role of an HTML element. After the form submits, you're on a new page. You'll either be redirecting, or rendering a page. So, to display the search term in the form, you'll need to place the term in the value attribute of the search field as you render the results page, whatever method you use to do so. I'm not sure what server-side technology you're using, so I can't be very specific, but generally: <input ... value="[IF length($searchValue) > 0 THEN print $searchValue]" ... /> Also, you are using an inline onclick event to set the value of the field to an empty string -- even if you successfully carry the value through, as soon as the user focuses on the input th

Categories : HTML

apache solr - show possibly related search results if no results found
You have to handle it on the Client side to fire a Second Query in case of No results found in Solr. You can use the Spell Check components/Did You mean based on the Index dictionary to provide suitable suggestions to the User instead of firing a default search.

Categories : Apache

Getting twitter api to return search results instead of results summary
In twitter API's documentation when you use "search", you got this dict object and in statuses key you should have a list of tweets according to your search options. Be sure that tweets in statuses are dict objects too, and its content are in text key

Categories : Python

Clicking on search button to search through sqlite database according to user input and display results in listview
You need to add function to get details from DB based on the user input. (eg:) if you want to get the list of users with a name starting with the letter "J", SELECT * FROM YOUR_TABLE WHERE FirstName LIKE 'J%';

Categories : Android

search form that redirects to search results page, rails
You can do it like this: <%= form_tag "http://www.stackoverflow.com/questions", :method => 'get',:id => "products_search" do %> Put whatever you need in place of that URL. for more info please look at the form_tag helper documentation But if you need actually to be trough that path you were using, you have to use a redirect or a forwarding. For using a forwarding just call the name of the next action near the end of that action yuo are calling. Something like: def another_action ... end def product ... another_action end For using a redirect just do it like: def products redirect_to another_action end

Categories : Ruby On Rails

Include singular search results when search for plural in Solr
You need to apply stemming to your indexed fields in order to achieve this behavior. Please see the Stemming Wiki Page for a complete explanation and an example fieldType to support stemming.

Categories : Solr

MySQL: Use search results (Like %search%), to match id's in another table in the database
I would perhaps try a combination of LOCATE() and SUBSTR(). I work mainly in MSSQL which has CHARINDEX() that I think works like MySQL's LOCATE(). It is bound to be messy. Are there a variable number of elements in the parts-list field?

Categories : PHP

Trouble in search in grocery CRUD, search by one field with no results
I think your problem is the code: $crud->where('parentid', $parent_id); Did you include the $parent_id to the URL? So for example if you have http://www.example.com/main/test it has to be: http://www.example.com/main/test/345 or something like that. So in your case I think this will solve your problem: if (!empty($parent_id)) { $crud->where('parentid', $parent_id); }

Categories : Misc

google json api search results limit, not 100 search queries per day
another year passed... Limits are the same =(( Google forces us to use multiple accounts to get complete search results. Use a query per day/week/month. Or you can sort huge result array by publish date. And when '100-items' limit is reached you should execute new request with excluding first items by applying "the lowest(or the highest) possible value" condition on publish date. btw, using webbrowser you could set 100 results per page. So total count of result items is 1000 per query. Web crawling would be helpful=)))) be happy!

Categories : Json

Linkable tabs in javascript
code snippet form url link for different tabs <ul class="tabs"> <li><a href="javascript:tabSwitch(1, 2, 'tab_', 'content_');" id="tab_1" > <img src="image1.jpg" /> <h3 class="designers"> Link 1 </h3> </a></li> <li><a href="javascript:tabSwitch(2, 2, 'tab_', 'content_');" id="tab_2" > <img src="image1.jpg" /> <h3 class="designers"> Link 2 </h3> </a> </li> </ul>

Categories : Javascript

Optimizing Search: no results returned for phrase search
What about this kind of thing : $query = "SELECT * FROM files WHERE ('".$searchText."' LIKE concat('%',keywords,'%')) OR (keywords LIKE '%".$searchText."%') ORDER BY website, description ASC";

Categories : PHP

images in different spans, 1 is clickable/linkable
It's because you're using padding to position. That changes the actual size of the elements, and because you're absolute positioning, they will overlap, and the last one is in front of the others (so they're not 'clickable'). The quick fix is to change padding to margin. The better fix is to delete padding and replace with top: 8px; and left: your-left-padding-value-for-this-element;.

Categories : CSS

How can I make a group of s linkable in Rails?
An easy way around your problem would be to attach click handlers to the <td>s instead of the <tr>s and then use jQuery's :not, :has, and :checkbox selectors to exclude the cells which contain checkboxes. Something like this: $('tr[data-link] td:not(:has(:checkbox))').click -> $tr = $(@).closest('tr') #... Also note the use of closest in the click handler, we use that because @ will be the <td> and data-link is on the <tr>; you could use parent instead of closest if you want, closest just makes things clearer to me. Demo: http://jsfiddle.net/ambiguous/qH282/

Categories : Javascript

Get individual ID of ROW, and make the result linkable
I don't see the query in your code but the general idea is as follows: $result = mysql_query("SELECT id, name FROM reports WHERE field = value") or die(mysql_error()); while ($row = mysql_fetch_assoc($result)) { echo '<a href="mysite.com/' . $row['id'] . ',">' . $row['name'] . '</a>'; } Keep in mind the mysql_* functions are deprecated. You should use mysqli or PDO.

Categories : PHP

Get ID from ROW and include in a linkable result - PHP MYSQL
I'm not going to dig through your code completely, but you should delete your ID column and whatever variable is being used for ID(such as $id) should be formatted like this where your name column is printed. <A HREF=http://mysite.com/"<?PHP echo $id ?>">"<?PHP echo $name ?>"</A>

Categories : PHP

Search Results from an array by search the keyword in php
You could use array_filter() to filter the array: $output = array_filter($yourArray, function($v) { return stristr($v, 'fu'); }); Would output: array 4622 => string 'Function Areas' (length=14)

Categories : PHP

changing results from a search to a premade search (php)
Having had a look at the docs, I'm pretty sure you'd do this: $twitter = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET, ACCESS_TOKEN, ACCESS_TOKEN_SECRET); // API v1 $twitter->host = "http://search.twitter.com/"; $search = $twitter->get('search', array('q' => 'from:eurogamer OR from:nintendolife OR from:outsidebox', 'rpp' => 4)); /* // API v1.1 (I think) $twitter->host = "https://api.twitter.com/1.1/"; $search = $twitter->get('search/tweets', array('q' => 'from:eurogamer OR from:nintendolife OR from:outsidebox', 'count' => 4) ); */ $twitter->host = "https://api.twitter.com/1.1/"; foreach($search->results as $tweet) { $status = 'RT @'.$tweet->from_user.' '.$tweet->text;

Categories : PHP

Linkable
I actually just finished doing this over a youtube video, just float a div on top of your frame. Check my fiddle for the code I used: http://jsfiddle.net/Ym5w8/ Place the iframe and the link inside a container like so: <div align="center" class="container"> <a href="http://thelink" class="the-click"></a> <iframe wmode="Opaque" class="video-iframe" width="100%" height="315" src="//www.youtube.com/embed/ZauRZNs8BMg" frameborder="0" allowfullscreen=""> </iframe> </div> Then style the container to have position relative for IE support then float your link: .the-click { position: absolute; left: 0px; right: 0px; width: 100%; height: 100%; z-index: 999; }

Categories : HTML

is there a search results github code that makes calls to web services (index/js) and returns results based on code words?
try this for authentication examples :https://github.com/apache/cordova-android/blob/master/framework/src/org/apache/cordova/CordovaWebViewClient.java

Categories : Android

Narrow down search from search results
Try something like this: DECLARE @SQL NVARCHAR(500) DECLARE @SubjectCommand VARCHAR(50) SET @SubjectCommand = '' IF (SubjectIsSelected) BEGIN SET @SubjectCommand = 'AND (Subject_1 = ''Maths'' OR Subject_2 = ''Maths'' OR Subject_3 = ''Maths'')' END SET @SQL = 'SELECT First_Name, Last_Name, City, Subject_1, Subject_2, Subject_3, Standard_From, Standard_To FROM TutorProfile WHERE City = ''Mumbai''' +@SubjectCommand EXEC(@SQL)

Categories : Asp Net Mvc

Displaying group of results from SQL
SELECT filename, sum(like) as likes FROM TABLE group by filename to order by likes: SELECT filename, sum(like) as likes FROM TABLE group by filename order by sum(like) desc

Categories : SQL

mysql_fetch_assoc - not displaying results
You could try something like the following, if (isset($_POST['email_address']) && isset($_POST['password'])) { $email_address = $_POST['email_address']; $password = $_POST['password']; //conection: $con= mysqli_connect("hostname","username","password","database") or die("Error " . mysqli_error($link)); //query: $query = mysql_query("SELECT * FROM users WHERE users.email_address = '$email_address' AND users.password = '$password'"); //display information: $row = mysql_fetch_assoc($query); if($email_address == $row['email_address'] && $password == $row['Password']){ echo $row['email_address']; }else{ echo "Invalid login"; } }

Categories : PHP

displaying accurate results
You need to make changes to the code for list.php based on the input it gets through GET parameter. something like: if ($_GET['id'] == 'FREE'){ // do something like display FREE items } elseif($_GET['id'] == 'GIFT') { // display GIFT items } else { // perform some default action } This is to make it even more database driven (helpful when there are many categories): $sql = "select * from categories where id = '".$_GET['id']."'"; if (mysql_results($sql)){ // do something } else { // show error } Note that this is for demo only and in your code you should use PDO/MySQLI and prepared statements and not mysql_results function. In light of more information provided by OP: Change this $articles = $article->fetch_all(); to $articles = $article->fetch_dat

Categories : PHP

SQL View not displaying all count results
select count(*) returns the record count in a table back to you in a single row...not 1 row per record counted. If the count was 20 million, it would return 1 row with 20 million in it. So this query is only returning 1 row. Limit 0,30 and limit 50 both return the first and only row saying 37. Limit 30,30 will return nothing in this case as it returns 30 rows from row 30 (which doesn't exist because this only returns one row) Try select * from ... if you want to see 1 row for each record.

Categories : SQL

SQL Statement for displaying results when searching
Sounds like you need the LIKE keyword: SELECT univ_name FROM university WHERE univ_name LIKE '%University%; % is a wildcard operator that will return the column where the text contains the word University

Categories : SQL

MySQL displaying results from a many-to-many relationship
SELECT title,GROUP_CONCAT(mood_name SEPARATOR ' ') AS moods FROM films JOIN films_moods ON films.id=films_moods.film_id JOIN moods ON films_moods.mood_id=moods.id GROUP BY title You can fiddle with this by going to http://sqlfiddle.com/#!2/c6dd3/14/0 - I also fixed a couple of typos in your schema.

Categories : PHP

MySQL syntax for displaying many-to-many db results
You need to add GROUP BY: SELECT title, GROUP_CONCAT(ambienceName SEPARATOR ' ') AS ambiences FROM Films AS f INNER JOIN Films_Ambiences as fa ON f.id = fa.film_id INNER JOIN Ambiences AS a ON a.id = fa.ambience_id GROUP BY title Updated fiddle Result is: TITLE AMBIENCES film1 sad happy film2 sad happy

Categories : PHP

displaying results of OnItemClickListener on a different activity
Use Intents @Override public void onItemClick(AdapterView<?> arg0, View view, int position,long id) { String temp = (String) listView.getItemAtPosition(position); // or String temp = (String) arg0.getItemAtPosition(position); disp.setText(temp);// display on screen Intent i = new Intent(ActivityName.this,SecondActivity,class); i.putExtra("key",temp); } }); In SecondActivity Have a textview Bundle extras = getIntent().getExtras(); if(extras!=null) { String value = extras.getString("key"); // textview.setText(value); }

Categories : Android

PHP for loop displaying strange results
From http://php.net/manual/en/language.types.float.php Additionally, rational numbers that are exactly representable as floating point numbers in base 10, like 0.1 or 0.7, do not have an exact representation as floating point numbers in base 2, which is used internally, no matter the size of the mantissa. Hence, they cannot be converted into their internal binary counterparts without a small loss of precision. So to overcome this you could multiply your numbers by 10. So $max is 40 or 60. for($i = 10; $i <= $max; $i+=1) { echo ($i/10).'<br>'; }

Categories : PHP

Displaying Database Query Results
Yes it is possible to process the form on the same page. <?php if (isset($POST)) { //write your insert query } ?> <html> <body> <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post"> <!-- Your form elements and submit button --> </form> <table> <?php //your select query in a while loop ?> </table> </body> </html> But if you choose this technique instead of ajax, you have to refresh all the page for each insert action. An example <div id="dialog-form"> <form action="<?php echo $_SERVER["PHP_SELF"]; ?>" method="post"> <table> <tr> <td>Job&

Categories : PHP

Joining 3+ tables using SQL displaying too many results
The query needs to look something like this i.e. use this form SELECT a.Company_name, f.Job_ID, f.Job_Name, b.User_Name, c.Comments, c.Reliability, c.Rating FROM company a INNER JOIN Users b ON a.???? = b.??? Since I dont have your table definitions I cant help you with the JOIN conditions. Show us the tables definition and we would be able to help. UPDATE: So based on your table structures you will be looking for something like this: SELECT * FROM company cmp INNER JOIN company_job cmpjb ON cmp.Company_ID = cmpjb.Company_ID INNER JOIN jobs jb ON cmpjb.Job_ID = jb.Job_ID INNER JOIN usercompjobrating ucmpjbr ON ucmpjbr.Comp_Job_ID = ucmpjbr.Comp_Job_ID INNER JOIN users usr ON usr.Users_id = ucmpjbr.Users_ID INNER JOIN ratings rat

Categories : Mysql

MySQL query results not displaying
SELECT * FROM articles ORDER BY artnum DESC LIMIT 15 OFFSET 85 Which should work, since I've checked and the amount in articles is 85. Aha, if you have 85 records in your table, what do you expect to get from the above select from row number 86 to 100 other than an empty result set ??

Categories : PHP

Displaying results on same page with flask
do you mean when a user presses on submit for e.x he gets the result without refreshing ? if yea then you need to use ajax for that see: http://flask.pocoo.org/docs/patterns/jquery/

Categories : Python



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.