Cheers for the comments. I noticed the photoinfo div problem when I installed firefox there; should be easy enough to fix. It's not happening in Safari or Opera.
I fear testing it in internet explorer.
Thanks rhyno!
That has worked a treat.
If you wanna have a look at the gallery you can see it at http://japan.traceramc.co.uk
2 mysql tables, 3 php pages - hopfully hundreds of holiday photos!
Cheers for your help.
Alex
Hello.
I am putting together a php photo gallery and have a field in the mysql database called photoKeywords. This contains some comma delimited keywords for each photo. eg. Cityname, Countryname, Peoplename
I have created a search page that displays all the photos, captions and keywords that...
Hey
Just wanted to say thanks for all of your help. Futurelet, your script works great, I like how I can specify input and output files when I call the script... I must write like this in the future.
Cheers
Alex
ps. PHV, sorry I got your name wrong in so many of the posts, I was a bit...
Just to add,
Fulurelet's and PVH's scripts only return the last occurance of any grid reference to the output file. eg.
If the input file looked like this...
BT04 1LG,UniqueID1,Type1
BT19 6SF,UniqueID2,Type1
BT19 6SF,UniqueID3,Type2
BT04 1LG,UniqueID4,Type2
BT04 1LG,UniqueID5,Type3
BT19...
This script was suggested by a friend:
#!/bin/sh
out=results.txt
> $out
while read xx1 xx2 ; do
POSTCODE="`echo $xx1 $xx2 | sed 's|,.*||'`"
UniqueID=`echo $xx2 | sed 's|...,||' | sed 's|,.*||'`
Type=`echo $xx2 | sed 's|.*,.*,||'`
# echo POSTCODE=$POSTCODE UniqueID=$UniqueID...
Futurelet,
Your code worked a treat. I'm gonna run it on some known datasets and then work out how to write like that myself for the next time I need it. Thanks!
PHV,
With NR==FNR as supplied by vgersh99 your code works too. Thanks!
There seem to be so many ways of doing these things.
Now I...
Thanks for the quick reply PH,
When I run that code I get a blank results file.
I don't know how to debug it because I don't understand it.
#!/bin/bash
awk -F',' '
NR=FNR{a[$1]=$2","$3;next}
$1 in a{print a[$1]","$2","$3}
' input.txt database.txt > results.txt
When i run this from the command...
Hello,
This is my first post.
I have a problem that I have nearly solved, I need some help to complete it.
I have 2 files.
input.txt (6000 lines) looks like this:
BT04 1LG,UniqueID1,Type1
BT19 6SF,UniqueID2,Type1
BT22 4PT,UniqueID3,Type2
BT19 5SF,UniqueID4,Type2
database.txt (750,000 lines)...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.