Search found 13 matches

by stevedeboo
Mon Mar 13, 2017 2:35 pm
Forum: PHP coding => General
Topic: extract image file name from large string
Replies: 7
Views: 1989

Re: extract image file name from large string

Thank you yes that works but how can I use the following to extract the filename this way and insert it back into the database in a spare field. <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title></title> </head> <body> <?php $con = mysqli_connect("ip.ip....
by stevedeboo
Mon Mar 13, 2017 4:56 am
Forum: PHP coding => General
Topic: extract image file name from large string
Replies: 7
Views: 1989

Re: extract image file name from large string

chorn wrote:
Mon Mar 13, 2017 4:53 am
the string given is valid JSON, use json_decode(..., true) on it to get a standard PHP Array to work with.
Sorry not sure what you mean, Sorry if I am lame on this, but I need to extract the file name and then copy it into another field in the database so it only has the file name of the image.
by stevedeboo
Mon Mar 13, 2017 4:22 am
Forum: PHP coding => General
Topic: extract image file name from large string
Replies: 7
Views: 1989

Re: extract image file name from large string

Problem is that you have two filenames in that string(fxdfsmall_gn44od0r.jpg and fxdfsmall.jpg), do you know which one is the correct one? If the same pattern is repeated in each record, you could do as you say and simply extract that string between those two positions. Perhaps do something simply ...
by stevedeboo
Mon Mar 13, 2017 3:10 am
Forum: PHP coding => General
Topic: extract image file name from large string
Replies: 7
Views: 1989

extract image file name from large string

Hi folks I have a load of images stored in a mysql database and I want to migrate all the data into another db but the image is inside a load of other information, see below, now each image can have any number of characters in its name and also finish with jpg,png,bmp etc etc how can I extract each ...
by stevedeboo
Fri May 20, 2016 3:36 am
Forum: PHP coding => General
Topic: Display certain text from database
Replies: 6
Views: 1636

Re: Display certain text from database

You can use two functions strpos and substr, something like the follow two lines should get you what you are after... // Find the position of 642... $pos = strpos($row['body'], "64206_"); // Use that position + 6 to get the reference number $rest = substr($row['body'], $pos + 6, 6); Regards, Jon ht...
by stevedeboo
Fri May 20, 2016 2:21 am
Forum: PHP coding => General
Topic: Display certain text from database
Replies: 6
Views: 1636

Display certain text from database

Hi all, I have a requirement to extract certain details from a database field that requires me to display just text from in between 2 points in the data. At the moment I am using this to display the details from certain columns while($row = mysqli_fetch_array($result)){ echo $row['Name']."<BR>".$row...
by stevedeboo
Fri Sep 04, 2015 8:05 am
Forum: PHP coding => General
Topic: How to use wildcard in $_GET url
Replies: 1
Views: 461

Re: How to use wildcard in $_GET url

Its OK I sorted it, probably NOT the correct way to do it but it works. $data[0] = $_GET['Bedrooms']; $data[1] = $_GET['NearestTown']; $data[2] = $_GET['Price']; $data[3] = $_GET['Property_Type']; if ($data[1] == "" && $data[3] == "") { $strSQL = "SELECT * FROM tblproperties where Bedrooms>='$data[0...
by stevedeboo
Thu Sep 03, 2015 8:40 am
Forum: PHP coding => General
Topic: How to use wildcard in $_GET url
Replies: 1
Views: 461

How to use wildcard in $_GET url

Hi folks I am trying to create a search string that works fine but if I omit a value that does not match in the url it does not return a value. in other words if i search for a property that has the following it works using 3 beds Albufeira Villa 450000 BUT what if the person doesn't know what town ...
by stevedeboo
Mon Feb 02, 2015 5:54 am
Forum: PHP coding => General
Topic: A Little help please.
Replies: 10
Views: 1336

Re: A Little help please.

Thank you so much for trying to help I tried that but the layout is a bit strange there is one box on row one and then nothing on rows 2 and 3 and then 7 boxes on row 4 and one on row 5 you can see it here http://algarvepropertysearch.uk/new.php Thank you Steve Its OK I think I worked it out from yo...
by stevedeboo
Mon Feb 02, 2015 4:26 am
Forum: PHP coding => General
Topic: A Little help please.
Replies: 10
Views: 1336

Re: A Little help please.

Landi Thanks for your reply, the example you commented on it for another page and its a test, the reason I want the 9 smaller boxes id for latest properties on the home page so I need the last 9 property details to populate the boxes. with links to the main property details which I already have. Its...
by stevedeboo
Mon Feb 02, 2015 3:46 am
Forum: PHP coding => General
Topic: A Little help please.
Replies: 10
Views: 1336

Re: A Little help please.

Thank you so much for your explination and sample code, but I think this is getting a little too hard for me to understand, it seems crazy that it is simple to do what I want with one result per row/column but not force it to show 3 columns The problem I have is, its all about how the page looks and...
by stevedeboo
Mon Feb 02, 2015 1:55 am
Forum: PHP coding => General
Topic: A Little help please.
Replies: 10
Views: 1336

Re: A Little help please.

Thanks for your reply, I am not entirely sure what you mean. Its possible that there could be 100 properties or more so they need to be created dynamically. I created the initial layout in Microsoft Frontpage so how the html looks was caused by Frontpage. I am sorry I cant be more specific. What I w...
by stevedeboo
Sun Feb 01, 2015 4:57 am
Forum: PHP coding => General
Topic: A Little help please.
Replies: 10
Views: 1336

A Little help please.

Dear folks I need a little help here I have this code working the way I want it BUT I cant seem to work out how to get the results appear in 3 boxes per row instead of 1 box per row. Its to show 9 featured properties on this page. here is the code and you can see what I mean here http://algarveprope...