h1

Multi-dimensional Arrays in PHP

May 16, 2011

Not sure if you’ve ever considered this:

mysql_select_db($database_dbDirect,$dbDirect);
 $query_rsa = "SELECT * from recording_type order by service_code";
 $rsa = mysql_query($query_rsa, $dbDirect) or die(mysql_error());
 $row_rsa = mysql_fetch_assoc($rsa);
 $totalRows_rsa = mysql_num_rows($rsa);
do {
 $audio_info[$row_rsa['service_code']] = $row_rsa;
 } while ( $row_rsa = mysql_fetch_assoc($rsa));
function audio_code($scode) {
 global $audio_info;
return $audio_info[$scode]['service_marker'];
}
function audio_description($scode) {
 global $audio_info;
return $audio_info[$scode]['service'];
}

We are dealing with a small number of records – say 10 – 20 with a record containing perhaps 3 or 4 fields with a key that we are using somewhere else – in this case we are dealing with sermons that could be at any number of different services (normally on a Sunday) and 1 or more of these services need to be retained…. So we can have an id ( 1 – 20 ), a description (morning, evening, afternoon, special), and code (am, am2, pm, pm2, an, an2, sp, sp2) – for example.

I may have 200 or more records which will use the code to determine when the recording is made – so now I can simply retrieve the text to use to uniquely identify the file (audio_code), or the descriptive text to display (audio_description) with no additional SQL and no additional overheads in storage either in memory or in the recordset…

We often forget how easy it is to use multi-dimensional arrays… and functions to handle them..

h1

A Psalm of Longing

April 22, 2011

It is lonely. It is empty. A hole that I sit in day after day, so dark.

Why should I feel this way, when I have a passion that still burns deep? How is it that I have let the day creep in leaving little of my Lord behind?

I come to my Lord, in sorrow, and in repentance. I have put my love aside and put on the lusts of each day. His cross is but a piece of wood, meaning little but a symbol of a fulfilment lost. The Water of Life is a stream run dry and the rains have not yet come.

I look to the clouds and cry, but my voice is lost in the dry rattle of the wilderness.

The zephyr begins on my face, and as I, with tears, weep, first silently, then racking with grief as I lament. I am guilty of my Lords death, for I have sinned; not just once, but again and again.

My, Lord, have mercy on me! Come close again, and make me whole!

The fruit has withered on the vine, there in no sweetness in me.

I want to love You; I need to love You, I long to be in love with You. Take me once again into your arms, anoint me with your oil, and bring me to the place of your table.

Your peace is like a rainbow the crosses the sky, a bridge between God and man. Your peace is a dew in the morning that refreshes the weariest soul. Your peace becomes a dove that rests the wildest heart. Your peace is the still waters by which you bring me to lie. Your peace is the shepherd’s voice to the lone sheep on the hillside.

Oh Lord, great is your faithfulness. Your Love exceeds the deepest well. How can I understand such Grace? Lead me to the bosom of your Life and there may I dwell the days of my life.

h1

When bad things happen – you should see this…

February 9, 2011

I’m stunned!

Choose #5 – When bad things happen to good people Pt2

http://www.newspring.cc/series/make-war/#ooid=RwZzMxMjqpZlw5Vhw8zAwsLkLYRzfaG8

h1

Welcome to the Place of Level Ground

February 3, 2011

http://www.theworshipcommunity.com/brian-doerksens-welcome-to-the-place-of-level-ground-video-premier-twc-giveaway/

This looks like something to get – whether given away or not! I love the video and the song….

Something for the church – I think it is a must.

h1

Friends, Aquaintances, and a Holy God

June 20, 2010
To be aware of those around you, those you meet briefly, those you get to know and those you grow to love. This is life, this is hurt and this is joy.
I know that there are many whom I have enjoyed time with who have become very special in my life. Those who will be remembered long after they have passed by – the perfume of their lives lingers on and we are richer for it.
Melancholy, no – thanking God for bringing these people to my life. It is these people who weave patterns that are so beautiful that you can only step back in awe of God’s Holy plans. If I can touch others lives and give them Hope, bring them some joy – and let them know of this great Jesus who means so much, who in His gracious love has His arms open wide, ready to receive us, embrace us and strengthen us to meet His new friend. To all of you who are no longer with us, and those who I may never meet in this world again – I salute you, I pray His love for you and I thank you for allowing a moment of your time.
For you there is a symphony both delicate and strong – both soft and gentle – strident and strong. It builds a tapestry in my life and in all those  you met. I thank God for each of you.
Sweet beauty, such fragrance, O counsellor and Most Holy Spirit, we welcome you, fill us with you words and your dreams – let our eyes see as you see, out mouths speak the words that you fill them with – and our minds filled with the knowledge of You.
Oh most High Yaweh – grant us you most gracious love and give us your Peace and we stumble through this world.
 
your most humble and penitent adopted child…
h1

A tale of Satellite vs Broadband

July 20, 2009
Never have heard this before..
 
Normal broadband speed was around 2.5Mb which at the distance from the Exchange was considered quite good. And then one day the Satellite distribution box decided to develop a fault (although we did not know that at the time since the satellite TV was still working fine). Suddenly our broadband failed completely. ISP suggested that our modem was faulty – so a new one was purchased. Result was no better but a very old modem allowed us a connection….
A telephone engineer changed our wiring because it was suggested that the fault existed internally… but the broadband got worse…
 
Then we heard that our neighbours had problems… and nobody could solve it.. days passed…
 
Finally we had a BT engineer test our internal circuit and modified the wiring again…. at the same time another engineer has found that there was an incredibly strong RF signal that was causing interference on the telephone lines – and it was our satellite distribution box! It was switched off – and suddenly I had the best broadband signal that I have ever had – at 7Mb!
 
An emergency call to a satellite engineer has give us back the satellite tv and so every one is happy…. except our neighbours because they still can’t achieve 7Mb!
h1

CMS Grows

May 13, 2009
The number of sites using the new CMS grows! Added to St Marys Ferndown and New Directions Training and Fran Robinson’s Alexander site are Julie Vivienne‘s new site for performance and worship events, Trevor Newlin’s website site Newlin Design and soon to be fully operational will be Mouthpeace Dental Practice.
There will be some new sites and some old ones converted to use the CMS system soon.
The CMS is relatively easy to use (!) – since we are dealing with a backend system more than the front end. However some simple PHP statements will populate the pages without any difficulty so the whole thing is now much faster to develop new sites. There is still more to do – since there is always something that can be done better – or new facilities can be added to make it more useful.
I am sure we can handle Flash better, and the gallery could be better… and the menus are a pain to get the CSS right – but it perhaps there are yet ways even these can be improved…
I guess it is still a "watch this space!"
Waiting for the next episode.
Follow

Get every new post delivered to your Inbox.