Questions tagged [search.php]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
126 views

pset8 - /search - I'm not getting any json outputs

In my SQL table I stored the postal_code as INTEGER and place_name as TEXT. So whenever I type a number or text, it will match accordingly. The problem is that I'm not getting anything as JSON output. ...
0
votes
1answer
162 views

PSET8 search LIKE and MATCH SQL

I didn't understand if we had to implement both techniques or just one, but for fun I tried to implement both. With the LIKE method, I wrote this code: $geo = $_GET["geo"]; //match with LIKE ...
0
votes
1answer
48 views

PSet8 Permissions Search

I completed the search.php file, but when I try to run it, I get this error: Warning: file_get_contents(/home/ubuntu/workspace/pset8/includes/../config.json): failed to open stream: Permission denied ...
0
votes
1answer
87 views

problem with SQL sintax for MATCH AGAINST in pset8

I created the fulltext index for the three colums: This is my query: FROM places WHERE MATCH ( postal_code, place_name, admin_name1 ) AGAINST ( '+New +Haven' IN BOOLEAN MODE ) and I get the ...
0
votes
1answer
172 views

Pset 8 cs50:search.php

i dont know what is the problem with my search fuction or databse but when i try to access https://ide50-username.cs50.io/search.php?geo=Cambridge,Massachusetts,US it gives me an error showing: ...
0
votes
1answer
193 views

Pset8 Search not working correctly

I am having trouble getting search.php to work correctly. I implemented a solution for if the user just searches one term that works great. However, I'm having trouble getting it to work when they ...
1
vote
0answers
98 views

pset8 - search.php - How can I have a more accurate sql query?

This is how I've been dealing with my search.php sql query: function multiexplode ($delimiters,$string) { $ready = str_replace($delimiters, $delimiters[0], $string); $launch = ...
0
votes
1answer
197 views

The search.php in pset 8

So I have already implemented the search.php code. I have tried https://ide50-username.cs50.io/search.php?geo=Cambridge,Massachusetts,US on my code and the staff implementation. My code returns a lot ...
1
vote
2answers
619 views

Pset8 search.php permission issues, warnings & fatal error - fail to open CS50.php

I had issues with accessing my website at cs50.io, but thanks to great help I received here I have managed to set up correct permissions to all files and folders and thus access the site. Although I ...
1
vote
2answers
135 views

I'm on pset8 testing search.php but this is the result to every url [duplicate]

I'm on pset8. I finished implementing search.php and was now testing it with the urls given but this is the result to every url
0
votes
1answer
222 views

pset8 search.php failed to open stream:

When I am testing the implemented search.php in the browser, I get "Fatal error: Unknown: Failed opening required '/home/ubuntu/workspace/pset8/public/search.php' (include_path='.:/usr/share/php:/usr/...
0
votes
1answer
222 views

How to make search.php return results that are more relevant

For pset8 in search.php, I cannot get relevant results to show up. I am using match () against () and I really want to only use this. The problem is, for example, when I type in Cincinnati, I get ...
0
votes
1answer
286 views

pset8 search.php.fulltext problem (general mysql)

i concatted postal code, state, city, and country code and created a new column called location. i put a fulltext index on location. sometimes the search works well with good accuracy, and other times ...
0
votes
1answer
89 views

Search.php outputs lots of html before the required JSON objects

Here's my code: <?php require(__DIR__ . "/../includes/config.php"); // numerically indexed array of places $places = []; // TODO: search database for places matching $_GET["geo"] if(is_numeric(...
1
vote
1answer
577 views

PSET8 - search.php, admin_code1

I've hit a snag in pset8 rather early on. My code, for some reason, does not seem to like admin_code1 in search.php. Here's the relevant code so far: if(strstr($loc, ",")) { if(strstr($loc, " "))...
0
votes
1answer
148 views

Search.php does not show any result

I don't know why this results in no rows although I am being blind cautious about any errors. Can anybody pick up the reason for this? sorry the code is quite loquacious I found it the simplest way. ...
0
votes
1answer
333 views

Cannot use query function in pset8 for search.php

Array declared: $names = array("country_code", "postal_code", "place_name", "admin_name1", "admin_code1", "admin_name2", "admin_code2", "admin_name3", "admin_code3"); for ($i = 0; $i < 9; $i++...