Hi,
I have a php script which calls messages from a database but I'd like to allow people to make a comments on the messages and view old comments by selecting a button which will expand to show all the comments made on a specific message:
Code to retrieve messages...
Hi,
I'm attempting to run a PHP script using a Cron job, which imports a csv file into a mysql database.
I initially scheduled them to run within crontab but they were never performed.
I've tested to ensure PHP is set up correctly and that cron is really running.
When I've attempted to run...
Hi,
Thanks for you feedback.
I'm testing this now but when importing the file, it seems to insert the correct about of records but all records are empty.
Am i missing anything that's preventing the variables from being populated?
$filename='2009-09-14.txt';
$handle = fopen($filename...
Hi,
Thanks very much for your help.
I've attempted to use:
array_map('mysql_real_escape_string', $data);
It's completes the import of data but the 6 fields that have an apostrophe are still dropped?
I included the code within the while loop:
$filename='2009-09-14.txt';
$handle =...
Hi,
I'm trying to import a CSV (tab) delimited file into a MySQL database, however it error's when importing fields with an apostrophe.
I'm importing the data using the fgetcsv function:
$filename='http://www.test.co.uk/2009-09-14.txt';
$handle = fopen("$filename", "r");
while...
Excellent thanks jpadie, this worked perfectly.
It now outputs all the query errors, the majority of them being for illegal characters or where the data has been encoded for XML.
Such as:
'
But fails when importing these into the database.
Is there a small way to remove or encoded...
Hi all,
I'm attempting to parse an XML file into a MySQL database using simpleXML but keep encountering the error
"Duplicate entry '203581' for key 'PRIMARY'"
Is it possible to skip these transactions? so the error does not occur.
Would it potentially be possible to do a IF statement and...
I'm trying to select the most recent records added to a table. I have three tables (User, user_training, training) user_trainging is resolving the many to many relationship and the table i am querying.
When i run a normal query grouping by the training ID, it selects the first record inserted...
Hi,
I apologise in advance but i'm very new to this.
I'm trying to join three variables to build a URL:
<html>
<head>
<script type="text/javascript">
var a = 'http://www.testing.com?';
var b = '%PRODUCT_FIELD(MovieURL,1)%';
var c = '&test';
function url(a, b, c)
{
url = a+b+c
return url
}...
Ha oh yeah, i wasn't thinking about that.
I basically just want to check that field for illegal characters and that was the only piece of code the would work.
do you know the function to allow letters, numbers only?
I really appreciate your help on this.
Hi,
I'm using an example of some validation i found on the internet but it does not allow me to submit Spaces between words.
E.g
i can submit "this_is_a_test" but can not insert "This is a test"
CODE:
<!--
function validateFormOnSubmit(theForm) {
var reason = "";
reason +=...
Hi,
I have a form which contains three dropdown menus. The second is dependant on the first dropdown but i can get it to automatically reload the second menu without me having to pressing the submit button:
<form name="program_search" action="task_management.php" method="get" > </p>
<table...
Hi,
i've created a php frontend, that displays a table of data which contains tasks and dates, i need to change the background colour of the cells dependant on how old the tasks are.
Does anyone know how i should do this or of any threads that would be useful?
Thanks in advance.
Hi,
I'm trying to create a view using a variable entered by the using, i started by using the code below:
<?php
$programid = $_GET['prog_id'];
//echo "$programid";
$period = $_GET['period'];
//echo "$period";
$query=mysql_query("drop view IF EXISTS...
thanks for responding,
i've now got the problem where if 1 is selected for the month it will insert 00 and 2 will insert 01.
the range for month is 1, 12
any ideas why this is occuring??
for code see first post.
Hi,
i have some code that allows the using to input the date.
how do i join the day, month and year so it can be reversed into MySQL date format?
is this the easiest way to create a date drop down?
Code:
<tr>
<td>Shift Date</td>
<td><div align="left">
<?php
$months =...
Hi, thanks for replying!
the forms begins like:
<form name="Assign_job" action="update_job.php" method="GET">
Should i be declaring the mysql_query or doing something else with it??
sorry i'm new at this!!
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.