Ask a Question related to PHP Development, Design and Development.
-
phatnugs420@comcast.net #1
MySql insert question.
hi all thanks again for all th direction you guys have given me in the past
and hopefully now..
i have a partial backend done for uploading graphics to a directory
and information into mysql. Now what i'm having problems with is
getting the file path with the file name to upload to the sql
database.
Right now i have 2 unique qualifiers carrying over (jobnum, custID).
I'm querying the database to find those matching qualifier and i need
to fill in the file name into the directorytile field in the db. here
is what i have now (excuse the sloppy code i'm a newbie!):
<?php
mysql_connect ('localhost', 'acme', 'acme') ;
mysql_select_db ('olcg');
$query = mysql_query("SELECT directorytile FROM itl WHERE
jobnum='$jobnum' AND custID='$custID'") or die (mysql_error());
if (isset($_POST['submit'])) {
$sql = "INSERT INTO itl SET
directorytile='$file_name'";
}
?>
<?php
if($file_name !="")
{
copy ("$file", "/home/guestdir/www/olcg/$file_name")
or die("Could not copy file");
}
else { die("No file specified"); }
?>
again thanks so much!!!!!
phatnugs420@comcast.net Guest
-
CFMX & MySQL : getting the id of the last insert
So I take it you're invalidating the use of CFTRANSACTION? Yes, you are. CFTRANSACTION, according to your interpretation, doesn't 'lock out' any... -
CFMX & MySQL : getting the id of the last insert
<cftransaction> <cfquery> Insert Into myTable(col1, col2) Values('value1', 'value2') </cfquery> <cfquery> Select MAX(ID) As LastInserted From... -
id after insert in MySQL
I'm trying to obtain the id of an INSERTed MySQL record (which is set as AUTO INCREMENT in my table btw). I believe the php function is... -
insert CSV in mySql problem
Hi, The script below add twice the same line from de CSV in the DB, Is there something I am missing... ------- $link =... -
I can't insert into mySQL db table - HELP!
I have to get this done by tonight! I have a .CSV file and a PHP file where I am inserting the values of the CSV file into the db table. See the...



Reply With Quote

