|
|
|
|
![]() ![]() |
Mar 24 2006, 01:23 AM
Post
#1
|
|
|
Super Member Group: Members Posts: 572 Joined: 25-April 05 From: Nashville Tennessee Member No.: 4,340 |
I am not the most regular contributer to PHP Builder but every now and then there is just a question from a newbie or someone that can not be fixed. I do not know if it is that they do not know how to ask the question but this one has been going on too long.
It seemed from the question that they asked that they wanted to insert some data froma text file into the MySQL database. So after looking at their query (the original question) QUOTE Here's part of my code: Code: $result = mysql_query("INSERT INTO AL_BVA (contact, time, phone, address, city, state, zip, email, website, notes) VALUES ('$contact',NOW(),'$phone','$address','$city','$state','$zip','$email','$website','$notes')",$connect); echo "<b>Form updated.</b>"; I'd like to use "include", or anything that works, to replace the "(contact..." and "('$contact',..." parts so they can be updated from one file. I've used .txt files for the other parts I needed to update from an external file but I can't seem to get the right code for these two... I desperately need this to work. Thanks in advance! I deduced that what they really wanted to do was QUOTE That would probably be used as More posts went by and I got disgusted, either because I do not know what they want to do, and am not a mind reader but an escape artist (I have been known to even disappear) what other method of doing what you saw quoted would help the poor soul, 'cause I don't know?
PHP Code: LOAD DATA INFILE "datafilename" INTO TABLE tablename See Load Data |
|
|
|
Mar 24 2006, 09:32 AM
Post
#2
|
|
|
End Of Computer Group: Members Posts: 346 Joined: 1-September 04 From: .:: MARS ::. Member No.: 28 |
do you have Macromedia Dreamweaver
Macromedia Dreamweaver have many php aplication that you can create just by some clicks one of them is insert/delete/ update in databases i suggest you that use Macromedia Dreamweaver, if you are not the most regular contributer to PHP |
|
|
|
Mar 24 2006, 05:14 PM
Post
#3
|
|
|
Super Member Group: Members Posts: 572 Joined: 25-April 05 From: Nashville Tennessee Member No.: 4,340 |
What I am talking about has nothing to do with using an editor that is WYSIWYG especially if it costs money, my PHP Designer 2006 works just fine for code development. The question posed by the user could not have been solved by using an editor, it needed someone to look at the objective and come up with a solution. Again here is the persons query;
QUOTE I'd like to use "include", or anything that works, to replace the "(contact..." and "('$contact',..." parts so they can be updated from one file. You don't use includes with MySQL so no editor in the world will make that happen. They were using the wrong logic about what they actually wanted to do. If the purpose was to place a large amout of data into a field in this case the contact field (column if you prefer) was to use the SQL of LOAD DATA INFILE "datafilename" INTO TABLE tablename which is a far cry from an INSERT or UPDATE query. This was actually more of a MySQL question than a PHP question although you could use PHP to perform the query, I haven't checked back because I and another member suggested the same approach but the user that posed the question seemed to have something different in mind (I think).
|
|
|
|
![]() ![]() |
Similar Topics
|
Lo-Fi Version | Time is now: 2nd December 2008 - 12:40 PM |