Search Results

Search: Posts Made By: barrydocks
Forum: Programming 05-10-2017
3,837
Posted By barrydocks
MYSQL merge csv data with exisiting table
I have a MYSQL table with demographic data. The addresses contained in the table were entered manually before the advent of online postcode lookup software and, hence, there are a lot of errors when...
3,564
Posted By barrydocks
Thankyou Corona688, works a treat. Now made the...
Thankyou Corona688, works a treat. Now made the script run at startup.

So my code is
#!/bin/bash
echo "on 5" | cec-client -s #switch audio on
echo "is" | cec-client -s #make RPi inactice CEC...
3,564
Posted By barrydocks
I am assuming this might work? ...
I am assuming this might work?
/opt/vc/bin/tvservice -M | grep -q "HDMI is attached" && RunCommand---------- Post updated at 02:04 PM ---------- Previous update was at 01:35 PM ----------

So my...
3,564
Posted By barrydocks
Simple CEC run command on event script
To cut a long story short I need to implement a CEC server in order to allow my Samsung TV to interact with other peripherals. I plan on using a RPi for this purpose.

I have installed CEC-untils...
Forum: Programming 11-25-2014
1,959
Posted By barrydocks
Thanks for the reply, I tried select id,...
Thanks for the reply, I tried
select id, 'today', 'monthago', today, monthago
from (
SELECT id, stdate, DATE_SUB(CURDATE(), INTERVAL 1 month) as monthago, CURDATE() as today
FROM data_table...
Forum: Programming 11-25-2014
1,959
Posted By barrydocks
MYSQL query search between dates
Just a little help if possible
I have a table with date data, I want to select dates that fall between today and 1 month ago, here's my query
SELECT id, stdate, DATE_SUB(CURDATE(), INTERVAL 1...
Forum: Programming 11-18-2014
4,055
Posted By barrydocks
So the Min, Max and increment are all stored in...
So the Min, Max and increment are all stored in the mysql table as integers, what I need to do is to great the array of values that will populate for the dropdown list. ie if Max=6, Min=0,...
Forum: Programming 11-18-2014
4,055
Posted By barrydocks
I was sort of hoping to include it as part of the...
I was sort of hoping to include it as part of the sql query?
Forum: Programming 11-18-2014
4,055
Posted By barrydocks
Php number array from max, min, step size mysql data
I want to create a form with data values in a dropdown list. The values in the dropdown list need to be generated on the fly from max, min and increment values contained in a mysql database.
...
Forum: Web Development 09-24-2014
2,121
Posted By barrydocks
Ah, right - that's no good!! so how would I...
Ah, right - that's no good!! so how would I modify the script to copy the contents of t2 to t3 as the user moves away from t2 (ie tabs out of the text box)? I guess I need onblur?

1 other query:...
Forum: Web Development 09-24-2014
2,787
Posted By barrydocks
Yes nearly, I need there to be exactly 2 decimal...
Yes nearly, I need there to be exactly 2 decimal places ie 1.00, 1.25, 1.50, 1.75, etc

Or the other alternative leave the value as typed by the user and give an pop up error if any other decimal...
Forum: Web Development 09-24-2014
2,787
Posted By barrydocks
Javascript to force decimals in 0.25 steps
I have a few input values on a form that must be in 0.25 steps, how do I force this ? alternatively how do I automatically enter the correct vales as the user types and disallow any other values ie:...
Forum: Web Development 09-23-2014
1,667
Posted By barrydocks
Thanks for the replies guy but I think javascript...
Thanks for the replies guy but I think javascript would be the best way to go as I want the user to see the changes as they happen.
I have started a new thread:...
Forum: Web Development 09-23-2014
2,121
Posted By barrydocks
Javascript to check field is empty then execute rest of script
I have found this bit of code (https://www.unix.com/stackoverflow.com/questions/1422284/how-to-copy-contents-of-a-textbox-to-another-textbox-using-javascript)that nearly does what I want.
...
Forum: Web Development 09-22-2014
1,667
Posted By barrydocks
Php help to copy form field if empty
I have an input form with several fields. What I would like to achieve is to auto populate or copy certain fields if they are empty when the form is submitted. I would like to use php if not...
Forum: Web Development 09-19-2014
1,668
Posted By barrydocks
Thanks for the reply but my php is too basic for...
Thanks for the reply but my php is too basic for it to help :-(


Edit:
Actually I managed it, Thanks
the final code
<?php echo $row_spec_rx['spec_rx_id']; ?></td>
<td>
<p><?php
...
Forum: Web Development 09-19-2014
1,668
Posted By barrydocks
If I simply do a cut & paste: <?php...
If I simply do a cut & paste:

<?php if($row_spec_rx['locked'] == 1) {
echo "locked";
}
else {
<a href="update_spec_rx.php?spec_RxID=<?php echo $row_spec_rx['spec_rx_id']; ?>" ...
Forum: Web Development 09-19-2014
1,668
Posted By barrydocks
Basic php help
So I want to hide or display a html button based on a mysql data value. The button has a link to a specific page to update a record, I can do both but can't combine the code :confused:

Show/hide...
Forum: Programming 05-19-2014
5,451
Posted By barrydocks
One additional thing, how do I add an additional...
One additional thing, how do I add an additional SQL command to the trigger? For example say I want to create another column with the same data, ie:
create trigger before_update_concat before...
Forum: Programming 03-04-2014
4,669
Posted By barrydocks
MYSQL - trigger to track changes to fields on update
So I have a php web application that allows updating of records. I would like to track the changes of only the fields that have changed. There are plenty of how to's that involve recreating the...
Forum: Programming 02-24-2014
5,451
Posted By barrydocks
Sorry I am a bit confused, does that mean I need...
Sorry I am a bit confused, does that mean I need to create a table named 'new' with 4 columns, 'col_comb', 'cola', colb', and 'colc'??

--------------Edit--------------------
Ignore all that, it...
Forum: Programming 02-23-2014
5,451
Posted By barrydocks
MYSQL v5.6.11 I am trying to achieve this...
MYSQL v5.6.11

I am trying to achieve this using phpmyadmin but here's the code it generates
CREATE TRIGGER `concat` BEFORE ...
Forum: Programming 02-16-2014
5,451
Posted By barrydocks
MYSQL - trigger update on record insert or update
Right I have a MYSQL database with table1 with 3 columns, colA, colB and colC. I want to combine the data in the 3 columns into a 4th column names col_comb. Here's the SQL command that works:...
2,185
Posted By barrydocks
Great thanks, will try the whole script later...
Great thanks, will try the whole script later when we are closed!
:)
2,185
Posted By barrydocks
OK, here's the output: ~$ smbstatus -b | awk...
OK, here's the output:
~$ smbstatus -b | awk -F"[()]" '{ print $2 }' | while read IPADDRESS
> do
> echo "IP address is $IPADDRESS"
> done
IP address is
IP address is
IP address is
IP...
Showing results 1 to 25 of 87

 
All times are GMT -4. The time now is 05:53 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy