Jump to content

glendango

Members
  • Posts

    93
  • Joined

  • Last visited

About glendango

  • Birthday 06/06/1976

Profile Information

  • Gender
    Male
  • Location
    England

glendango's Achievements

Advanced Member

Advanced Member (4/5)

0

Reputation

  1. Any more cheek and i'll throw the book at you , so i will.
  2. furlongs lol... 'something like that' anyone care to look at rightmove and tell me what the hell is going on under the hood? could be ' typeahead' j.s . with a json file of postcodes and counties,.Could be ajax calling the locations from the database... just because i type ajax into google doessnt mean that is the correct way to do it... sweet jesus mother of god.... its like getting blood from bent coppers round here, so it is
  3. nice,,so i can set the radius from the selected lat/long of the properties. Rightmove only lets you search minimum 1/4 mile radius which is to large... 1/8 mile be ideal.
  4. They have a big database of locations. Probably purchased from and/or subscribed to a service that tracks stuff like that so they don't have to try to stay up to date themselves. interesting. so do you think they use Ajax to get the locations from a database or would it be an API.... once a user selects e.g. Islington, London . does this then add that as a $variable to a select statement to the database to create a list of properties on the next page ? $location = islington select * from table where $location
  5. Hi, i'am looking for best practices in 2019 for Search on a website. Very similar to rightmove / zoopla etc. 1) They allow the user to search by county / postcode / town. How is this list populated in the drop down? is it a list of towns in a plugin which are then used as variables to populate the mysql select query,, or is it ajax populating the search input with a call to the db... Reason iam confused it i know of a site with no property in a certain area but the list still predicts the area ...i.e. if no matching address is in the db how is it populating? 2) they also have a search function that once the user has arrived on the page by postcode..users are able to search 1/4 mile 1/2 mile radius etc from the postcode for other properties... how is this working? thx for your time in advance . in the jpeg i show the search box...when user types 'lon' it brings up everything with lon in title i.e london, londonderry, long meadow etc
  6. "Composer is a dependency management tool." could you translate that for me... what does the actually mean in english do you think. thx
  7. thx for your time but iam now equally confused.. Have you ever seen a search table / bar on a real estate property site? it uses functions to query the database or the xml file with xpath. where would you begin to search for these ready made functions ( granted i know i would have to fill in the gaps with my own data... think of it more like this: i want a hamburger. I could make a hamburger ( function) but macdonalds makes lots of ready made burgers.. so , iam looking for directions of how to get to macdonalds..... to eat..... a burger / function....
  8. I have been teaching myself xml manipulation as well as db queries to create a detailed search engine for users ( a bit like rightmove uses to search through property and allow user to change e.g.. how many bedrooms or status of sold or available.. I could keep on this path for another few weeks but i cant help thinking there must be php function library that will basically give me the scripts i need to set up a real estate website with all the functions i need for searching property .. i dont mean wordpress either.... this is terrible experience and trying to glue the xml feeds into a parser and into a blog without some of the data being lost is annoying. i started using laravel a few weeks ago and with 1 line of code a login system was created using COMPOSER... i thought this would be great..but on visiting composer i cant make head or tail of their search bar to even find what i'am looking for on the composer site. Does what i'am looking for exist ? The site iam was hoping to find was: www. here you go, all the code you need to make a modern web site in 2018 , all divided into handy folders and clear explanations of what they do .com so far i havent found anything that comes close.... cheers.
  9. fair one ... will see what happens when use the main db.
  10. this is how it looks now but i dont get the last id i get (0) in the pictures and they still dont loop so i get 1 picture. $sql = "INSERT INTO properties( instructedDate, price_text, bedrooms, priority, advert_heading, brochure) VALUES ('". $instructedDate ."','". $price_text ."','". $bedrooms ."','". $priority ."','". $advert_heading ."','". $brochure ."')"; $prop_id = mysqli_insert_id($conn); foreach ($xml->branches->branch->properties->property->pictures->picture as $rows) $pictures = (string)$rows->filename; //$sql2 = "INSERT INTO pictures(property_id, filename) VALUES (LAST_INSERT_ID(),'". $pictures ."')"; $sql2 = "INSERT INTO pictures( filename) VALUES ('". $prop_id ."' , '". $pictures ."')"; print_r($sql); echo"<br><br>", print_r($sql2);echo"<br><br>";
  11. 'Do you realise that the code you posted does not execute any queries?' ha yes,,i print onto screen .. otherwise i would be up to about 5000 unique id's if kept sending it to db while i sort this code out. i cant get my head round your example! where does it go in relation to my code. come on...iam so close.
  12. maybe that was lost in translation.. yes i have a primary key for every image. = picture_id in my case. So i have 3 columns in the pictures table. So, how to get many pictures belonging to each product into the table with the same property_id . Any chance you could could edit my example..cant follow your foreach example.
  13. Happy Thursday ! I will try to ruin it for you. I have an xml file with products in it and i use xpath to get out what i need from the file. Nested in each product are all the elements = $variables below. i need the pictures of which there may be upto 20 in each product to go into a seperate mysql table because its relational. but have the same id as the property table. i have managed to get the first picture to behave this way by using Last_insert_id . What i cant do is get the remaining pictures->picture->filename (nested) ; to insert into the table with the corresponding property id (which i auto increment) the filename holds the text url (not a blob) which i store and will echo once i start doing my select statements. Hope this is clear enough.... thx $xml = simplexml_load_file('propertiesshort.xml') or die("can not find it"); foreach($xml->branches->branch->properties->property as $row){ $instructedDate = (string)$row->instructedDate; $price_text = (string)$row->numeric_price; $bedrooms = (int)$row->bedrooms; $priority =(string)$row->priority; $advert_heading = (string)$row->advert_heading; $brochure = (string)$row->brochure; foreach($xml->branches->branch->properties->property->pictures as $rows ){ $pictures = (string)$rows->picture->filename; $sql = "INSERT INTO properties( instructedDate, price_text, bedrooms, priority, advert_heading, brochure) VALUES ('". $instructedDate ."','". $price_text ."','". $bedrooms ."','". $priority ."','". $advert_heading ."','". $brochure ."')"; $sql2 = "INSERT INTO pictures(property_id, filename) VALUES (LAST_INSERT_ID(),'". $pictures ."')"; print_r($sql); echo"<br><br>", print_r($sql2); echo"<br><br>"; ?>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.