![]() |
|
Welcome to the Computer Webmaster Gaming Console Graphics Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
| |||||||
| PHP PHP for some can be one of the hardest website programming codes, so do you need help on your PHP script, if it is php4, php5 or lower this is the place for you for any PHP help. |
![]() |
| | LinkBack | Thread Tools | Display Modes |
| | #1 | ||
| Hi, I'm pulling my hairs out on the following. I have a database.mdb which I want to access by a web site. Now everything works fine (it's displayed when I want it, so the connection is made), but I can't add records. I've been to php.net, and there I have seen: INSERT foo into Table Values (var1, var2, var3) INSERT foo into Table Values ("\ var1, "\ var2, "\ var3") INSERT foo into Table Values ($var1, $var2, $var3) INSERT foo into Table Values ("$var1", "$var2", "$var3") etcetera. It's very nice that eighty five options are given, but which syntaxis is the correct one? Any help would be appreciated. I'm running PHP 5.0 beta 1 on IIS 5.1 Thanks in advance, Hans | |||
| Advertisements |
| | #2 | ||
| On Mon, 28 Jul 2003 18:04:22 +0200, hans wrote: > Hi, > > I'm pulling my hairs out on the following. I have a database.mdb which I > want to access by a web site. > > Now everything works fine (it's displayed when I want it, so the > connection is made), but I can't add records. > I've been to php.net, and there I have seen: INSERT foo into Table Values > (var1, var2, var3) INSERT foo into Table Values ("\ var1, "\ var2, "\ > var3") INSERT foo into Table Values ($var1, $var2, $var3) INSERT foo into > Table Values ("$var1", "$var2", "$var3") etcetera. > It's very nice that eighty five options are given, but which syntaxis is > the correct one? > Any help would be appreciated. > > I'm running PHP 5.0 beta 1 on IIS 5.1 > > Thanks in advance, > > Hans It looks like none is. It should be "INSERT INTO foo..." But if you fix that out of the way, the answer is that all of the above statments might by correct syntax. There are several things going on on those statement snippets that are blending PHP syntax with SQL syntax, which is why it is confusing. For example: * all of the "$var1" strings are probably referring to a PHP variable. * The backslash statments are probably not right. They should probably be \" and not "\ -- that is the backslash *before* the quote. This is used to make PHP ignore double quotes that occurr *inside* a double-quoted string. There are several things you need to learn before a detailed explanation will be of much use. Please RTFM on: * PHP strings * backslash as an escape sequence * SQL syntax later...! -- Jeffrey D. Silverman | jeffrey AT jhu DOT edu Johns Hopkins University | Baltimore, MD Website | http://www.wse.jhu.edu/newtnotes/ | |||
| | #4 | ||
| "hans" <ijsbergvla@NOSPAMhotmail.com> wrote in news:bg66d1$es5$1 @news.cistron.nl: > Sigh... Anyone else who understands the question? I do, but.. do you connect / work with ODBC functions ? Did you look into the manual, there are some interesting comments... here, http://ch.php.net/manual/en/function.odbc-exec.php Someone named Rupix... Hope it helps... -- Aphrael http://ludivers.fr.st | |||
| | #5 | ||
| On Tue, 29 Jul 2003 18:12:20 +0200, hans wrote: > Sigh... Anyone else who understands the question? Here is Hans's emailed reply to me, just to point out that he is a jerk. I was only trying to help, and this is what I get. sheesh! Hans Timp wrote: > I know how extremely good you are. I also know that you use terms like > 'RTFM', even when you don't even understand my question. I was using SQL > when you were still sucking your mom's breast, so better READ a question > yourself before you polute a newsgroup with your stupid cliché arrogance. We > are definitely NOT waiting for lamers like you. And don't tell me to read a > manual, rite after I said that manual sucks. Because that is even more > stupid. > > I guess you're an American, rite? > I was not being arrogant, I was being straightforward. There is a big diffrerence. But whatever. Frankly, your question, as posted, is very difficult to understand. I was doing the best I could to *help* -- its not my fault if you take things so ****ing personally. If I don't understand your question, I'm probably not alone. Try rephrasing it or including verbatim code snippets. Also, don't assume things. How old do you think I am, anyways? -- Jeffrey D. Silverman | jeffrey AT jhu DOT edu Johns Hopkins University | Baltimore, MD Website | http://www.wse.jhu.edu/newtnotes/ | |||
| Featured Websites | ||||
|
![]() |
| Tags: access |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Interface to Access | ft310 | Database | 0 | 05-31-2007 8:43 PM |
| access privileges | Bart Vandewoestyne | Database | 2 | 05-31-2007 8:38 PM |
| Access Programmer / Access Developer Can help Automate your BIZ | sos | Building An Internet Business | 0 | 05-29-2007 3:10 AM |
| ********ACCESS TO A COMPUTER? | RJ | Building An Internet Business | 0 | 05-29-2007 1:44 AM |
| ms access | theseeric | Database | 1 | 08-02-2006 1:41 AM |
| Featured Websites | ||||
|