Thanks for the suggestions, I ended up using format when populating the text field value when printed to the page and
date("Y-m-j", strtotime(str_replace('/', '-', $_POST['datetimefield'])));
on inserting data.
Another question, is that safe to use the above code in my query, for other...
I am having to update a system I built from mysql to mssql (and also from a wamp environment to IIS running windows php).
All is going well so far apart from datetime data types. I read that datetime is not supported and to use the much more forgiving datetime2 instead but I'm still getting the...
Firstly let me apologise if this is the wrong forum, I couldn't find a specific forum for IIS and php.
The IT team in their wisdom are decomissioning the apache machines and only supporting windows, they have created a virtual Windows Server 2008 R2 system with IIS7.
I managed to set up php...
I have a table that features 5 columns that are entered into a database, there are 3 rows of these
<form method='post'>
<table>
<tr>
<td><textarea name='this'></textarea></td>
<td><textarea name='that'></textarea></td>
<td><textarea name='other'></textarea></td>
<td><textarea...
Yes the error is from jsFiddle, here is the code I grabbed from the view source on the result frame, I added in the latest jquery version as this has been passed for our firewall.
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">...
Thanks for the replies, there will only ever be two options. I tried using feherke's solution but receive the error
Object doesn;t support this property or method
on
$('div#'+answer.join('')).show()
We are running IE8 company wide (I know I know) so can;t test on other browsers unfortunately.
I have a page that I'd like to open up different options depending on the answers to two fields, here's the scenario
can you confirm that the info is correct? [Please select|Yes|No]
Do you have the relevant qualifications [Please select|Yes|No]
Yes | Yes - show div1
Yes | No - show div2
No |...
Thanks for the help, that worked perfectly.
I am hoping to get some time to redo the tables so expect a thread here on how to properly sort the tables (I already have lots of bed time reading on best practices etc)
Thanks for the help that works great, I'd also need to do the same for a time range.
Basically the 'questions' table has a 'itemid' column, this links to the 'item' table id column. The item table contains a date field, here's the structure
questions table
id | q1 | q2 | q3 | q4 | q5 |...
I have a table with a set of questions as columns, the answers to the questions are either 1, 2 or 3 i.e.
id | q1 | q2 | q3 | q4 | q5
1 | 1 | 1 | 1 | 2 | 2
2 | 1 | 2 | 2 | 2 | 2
3 | 1 | 1 | 2 | 1 | 2
4 | 1 | 1 | 2 | 1 | 2
I need to work out how many 2's there are for each...
A typical set of answers for person with id 999 would be
id | userid | t1-score1 | t1-score2 | t1-score3 | t1-score4 | t1-score5 | t1-score6 | t1-score7 | t1-score8 | t1-score9 | t1-score10
1 | 999 | 3 | 3 | 2 | 3 | 3 | 1 | 3 | 2 | 3 | 1
so they have a set of data similar to this for all 8...
I am making a fullname text field and want it so that when people start to type, it accesses the users table in the database and suggests names, the user clicks one to autocomplete the text field. This will hopefully prevent fullname spelling errors. I got this working no problem, but, is it...
Thanks audiopro, you put me on the right track. My final working query is
SELECT *
FROM table t1
INNER JOIN table t2 ON t1.fullname = t2.fullname
GROUP BY t1.fullname
I have a table with many columns, I want to return all columns but ignore duplicates based on one column
id | fullname | this | that | other
1 | Bob | 1 | 0 | 0
2 | Mary | 1 | 1 | 0
3 | Bob | 0 | 1 | 0
In the above example I need to only pull...
The extra info is for this system only and will be a manually updated list. i.e. these people are current assigned as managers xxx, xxx.
Here is the process I see;
export csv from oracle database
remove current data from staff table
upload csv into now empty staff table
add extra columns
run...
Good to hear, I have printed to a new spreadsheet before using Header("Content-Disposition: attachment; filename=export.csv"); but I'm guessing updating an existing spreadsheet won't be so friendly.
Can you point me towards any tutorials/resources/reading? My search came back with nothing to...
I have written a php script that interrogates a database and produces 30 results from it and outputs these to a page
i.e.
number of surveys completed in total = 200
number of surveys per staff member = 0.2
surveys scored 50 and above = 20
percentage of surveys scored 50 and above = 10
etc etc...
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.