I have a form that allows users to edit an entry in a database. It displays
the current values in a textbox/select box/textarea depending on the type
of data (text, enum, etc). The same form is used for different tables, so
no values are hard coded. Field names are retrieved with a show columns
I've just tried to do something I've done a thousand times. It does not
work. I've checked all of the syntax, made sure the field and variable
names are correct. No matter what I do it just doesn't work. The table
remains empty. Here's the query:
$logit = mysql_query("INSERT INTO log SET term='
What is the error? there i something i always do when i have this problem,
try this:
error_reporting(E_ALL);
$sql = "INSERT INTO log SET term='$search', returns='$arrayword',
time=CURTIME(), date=CURDATE(), ip='$ip'");
echo $sql;
$logit = mysql_query($sql);
This makes all kind of notice about un
You haven't done that a thousand times - the syntax is wrong :).
You are using a combo of INSERT and UPDATE syntax there.
Try
INSERT INTO log (term, returns, time, date, ip) VALUES ('$search',
'$arrayword',CURTIME(), CURDATE(), '$ip');
Cheers,
Paul
-Original Message-
From: Axel IS
I'm using MySQL for about 2 years and never heard about this kind of INSERT.
Is not SQL compliant neither.
YOU CAN NOT MAKE : INSERT INTO table SET var=1 [as I know]
Try to search for the INSERT INTO syntax.
You combined INSERT INTO and UPDATE syntax.
Tip for insert: INSERT INTO table(field1, fi
Try this:
$logit = mysql_query("INSERT INTO log (term,returns,time,date,ip) VALUES
('$search','$arrayword',CURTIME(), CURDATE(), '$ip'"));
Regards,
Muhammed Mamedov
turkmenweb.com
- Original Message -
From: "Axel IS Main" <[EMAIL PROTECTED]>
To: "PHP-DB" <[EMAIL PROTECTED]>
Sent: Thursd
Anyone knows/uses IMP database search engine?
http://www.imptechnology.com/DesktopDefault.aspx?tabid=56
Thanks,
M.Mamedov
Hello,
I suggest PostgreSQL+TSearch2+OpenFTS...
30 minutes to a wonderful search engine.
On Thu, 26 Feb 2004, Muhammed Mamedov wrote:
> Anyone knows/uses IMP database search engine?
> http://www.imptechnology.com/DesktopDefault.aspx?tabid=56
>
> Thanks,
> M.Mamedov
>
--
Co-Founder
Command P
Hey.
I've just installed Red Hat 8 from a downloaded distribution and have set up
Apache, PHP and MySQL. The problem I have is my old code that I wrote in a
Windows environment doesn't work.
The error I get is: call to undefined function mysql_connect()
I know that Apache is running fine and I k
Hi, i use phpmyadmin I i cant conect to my database. I use this code:
and it gives me this error:
Warning: mysql_connect(): Access denied for user: '[EMAIL PROTECTED]'
(Using password: YES) in C:\Program Files\DzSoft\PHP Editor\php47F.tmp on
line 6
Access denied for user: '[EMAIL PROTECTED]' (Us
Ok guys, I found the problem. It's actually something I've run into
before. If you take a look at the query you'll notice that one of the
fields is named "returns". When I created the test table with phpMyAdmin
it created it and everything seemed fine. Then I decided to try
something. I tweaked
To: [EMAIL PROTECTED]
From: "Jono" <[EMAIL PROTECTED]>
Date: Wed, 25 Feb 2004 20:50:37 -
Subject: call to undefined function mysql_connect()
[PHP / MySQL / Red Hat 8]
Hey.
I've just installed Red Hat 8 from a downloaded
distribution and have
set up
Apache, PHP and MySQL. The problem I
Call to undefined function mysql_connect(), this means that php doesnt
reconize mysql_connect() as a function, this could be because you use the
wrong name for the function (in this case it seems ok, check your code), or
because the mysql extension isn't loaded (it is loaded by default, and it
shou
I agree this is a valid format. People should check the manual before making
statements that are untrue to the list server.
Axel did you get an error message or just no update?
-Original Message-
From: Nitin Mehta [mailto:[EMAIL PROTECTED]
Sent: 26 February 2004 12:26
To: Erwin Kerk; [EMA
Yeah thanks for the phpinfo() tip. I guess I know that MySQL isn't working
with PHP cos I'd already checked that. Bit silly I presumed that installing
it all at the same time as installing Linux it would all work together.
In the package manager for RedHat, under the Web Server Section, PHP is
lis
Hi
I am looking for some help with the OCINewCollection function. My pb is that I whant
to get a PLSQL stored procedur OUT parameter of TYPE my_type of collection( TABLE ...)
back in my PHP script as array
Please help me ...
P.S.
I am very newby in the list so if my question is stupid so
Hi,
I am executing a SELECT query from PHP (4.3.4) through ODBC on a Pervasive
2000SP4 (all on Windows). odbc_result_all, odbc_fetch_into, and all other
php odbc function stop returning records before the end of the effective
resultset.
Here is what is happening :
* In Pervasive: SELECT * FROM t
Okay, there is no "mysql.so" module in /usr/lib/php4 (my extensions dir),
which basically says to me that no matter what i do i won't get mysql
support unless it is there, even if I uncomment it in my php.ini file. Can
I download it from somewhere and just plonk it in the extensions dir, or
does i
Actually, yes, a thousand times is an obvious exaggeration, but I have
done a whole lot of times, and the query syntax is the query syntax.
Different don't make it wrong. This is working in several other places
throughout this particular set of scripts.
Paul Fitz wrote:
You haven't done that a
Hi Pascal
The odbc extension uses ODBC 2, while Access and Pervasive are most likely
using ODBC 3. This may or may not be the cause of your problem. Try using
the odbtp extension at http://odbtp.sourceforge.net. It uses ODBC 3, and
may give you better results.
-- bob
On Wed, 25 Feb 2004, Pascal
Been kind of following this thread off and on...
If the syntax is acceptable by MySQL, which it appears to be, is it possible
that the variables you are using within the query string are not set to
anything? Or is it possible that there is something broken immediately
before the query string is fi
Hi,
Say I have a script that knows the value of a variable $codename.
The script contains a function that needs to know the value of $codename.
What is the syntax for passing the parameter to the function?
Example: the script knows that $codename = blah. The function has to
pass 'blah' on to an
An interesting thought. I tried this:
echo "Term: $search, Returns: $arrayword, UserIP: $ip";
$logit = mysql_query("INSERT INTO log SET term='$search',
returns='$arrayword', time=CURTIME(), date=CURDATE(), ip='$ip'");
echo "Query Value: $logit";
And got this on the page:
Term: skater, Returns:
Thanks for responding.
script 1 receives the value of $codename from previous scripts -
ultimately from user input. So in script 1, I can't hard-code the value
as "blah". Should have mentioned that before.
Up to now, I've been using
This works fine for passing the value of $codename from s
mysql_query does not return a specific value, rather a pointer to a range of
values (depending on what the query returns..) so what you're seeing is
normal. I think depending on your error settings, PHP will actually return
the value as 'POINTER' or something like that to let you know it's not
An interesting thought. I tried this:
echo "Term: $search, Returns: $arrayword, UserIP: $ip";
$logit = mysql_query("INSERT INTO log SET term='$search',
returns='$arrayword', time=CURTIME(), date=CURDATE(), ip='$ip'");
echo "Query Value: $logit";
And got this on the page:
Term: skater, Retur
Right.. a resource.. sorry.
On Thursday 26 February 2004 12:55 pm, [EMAIL PROTECTED] wrote:
> An interesting thought. I tried this:
>
> echo "Term: $search, Returns: $arrayword, UserIP: $ip";
> $logit = mysql_query("INSERT INTO log SET term='$search',
> returns='$arrayword', time=CURTIME(), date
Good point, but all you needed to do is surround the field name with back
quotes.. i.e.:
$logit = mysql_query("INSERT INTO log SET
`term`='$search',`returns`='$arrayword', `time`=CURTIME(), `date`=CURDATE(),
ip='$ip'");
I think phpmyadmin does this automatically, which is why that worked.
-M
Good afternoon!
I used SQLYOG to export the tables and data from a Mysql database. Now, when
i try to re-import the data back into a different database, I get an error
stating "Error : MySQL server has gone away". What is happening and how do I
fix this. I NEED this script to execute badly. I even
On Fri, 27 Feb 2004 01:16:20 +0100, Erwin Kerk wrote:
>Robin 'Sparky' Kopetzky wrote:
>
>> Good afternoon!
>>
>> I used SQLYOG to export the tables and data from a Mysql database. Now, when
>> i try to re-import the data back into a different database, I get an error
>> stating "Error : MySQL ser
Thank you to all who helped. I was able using UltraEdit to chop up the sql
file and created all of the individual INSERT statements. Now, I'm up and
running again. Slow but it worked!
Thanks again!
Robin Kopetzky
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://w
Robin 'Sparky' Kopetzky wrote:
Good afternoon!
I used SQLYOG to export the tables and data from a Mysql database. Now, when
i try to re-import the data back into a different database, I get an error
stating "Error : MySQL server has gone away". What is happening and how do I
fix this. I NEED this
Lisi wrote:
I have a form that allows users to edit an entry in a database. It
displays the current values in a textbox/select box/textarea depending
on the type of data (text, enum, etc). The same form is used for
different tables, so no values are hard coded. Field names are retrieved
with a
Ok guys, I found the problem. It's actually something I've run into
before. If you take a look at the query you'll notice that one of the
fields is named "returns". When I created the test table with phpMyAdmin
it created it and everything seemed fine. Then I decided to try
something. I tweaked
Script 1:
...other form stuff as necessary...
Submit the form.
Script 2:
Access the data passed in the hidden field as $_POST["codename"].
For example, echo $_POST["codename"];
Rich
> -Original Message-
> From: Robbie Staufer [mailto:[EMAIL PROTECTED]
> Sent: Thurs
What about the single quotes? Might try this.
$sql = "INSERT INTO log SET term=\'$search\', returns=\'$arrayword\',
time=CURTIME(), date=CURDATE(), ip=\'$ip\'";
> $sql = "INSERT INTO log SET term='$search', returns='$arrayword',
> time=CURTIME(), date=CURDATE(), ip='$ip'";
>
> echo $sql;
>
> $
Ok, ok. I get the message about the syntax. Since I've used this syntax
for a long time and so far there hasn't been a problem I'll assume
that's not the problem. I will, however, review this and probably make
some changes for the sake of compliance if nothing else. In any event,
the syntax is
you probably have the mysql and the php installed and working correctly.
check your php.ini file search for a section named extensions and check if
the mysql extension is commented (if so uncomment it), check is the
entensions directory is correct, check the apache logs to see if php load
correctl
exactly, i'm using it for more than a year
- Original Message -
From: "Erwin Kerk" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; "PHP DB" <[EMAIL PROTECTED]>
Sent: Thursday, February 26, 2004 5:36 PM
Subject: Re: [PHP-DB] What's wrong with this query?
> Viorel Dragomir wrote:
>
> > I'm
Viorel Dragomir wrote:
I'm using MySQL for about 2 years and never heard about this kind of INSERT.
Is not SQL compliant neither.
YOU CAN NOT MAKE : INSERT INTO table SET var=1 [as I know]
As a matter of fact it IS possible, according to the MySQL manual on
http://www.mysql.com/doc/en/INSERT.html
40 matches
Mail list logo