Sorry, just noticed that I had this line in the post. (should not post
before coffee).
$sql = INSERT INTO contact comments, VALUES = $test WHERE contact_id =
33;
It is supposed to be
$sql = UPDATE contact comments = '$test' WHERE contact_id = '33'
Gary gwp...@ptd.net wrote in message
Thanks all, I appreciate the follow ups and the help with the code. I'm
still relatively new with this stuff, and never had any formal training,
it's all just been learn as I go, and I have to learn fast as this project
is relatively urgent to get completed. I plan on going through all of my
Vinny Gullotta wrote:
What I want to do is find the top 10 servers where the column steps =
iisreset. The following code works great except that the page is not
displaying the servername in the 'Server Name' column of my results
(nothing appears, the column is just blank).
servername and
While it's true that '.' concatenates and ',' is a list separator, The
comma is actually more appropriate in this instance since you are just
outputting each piece. It saves the overhead of concatenation before
output.
Thank you,
Micah Gersten
onShore Networks
Internal Developer
learn something new every day! cheers Micah :)
Micah Gersten wrote:
While it's true that '.' concatenates and ',' is a list separator, The
comma is actually more appropriate in this instance since you are just
outputting each piece. It saves the overhead of concatenation before
output.
Thank
1: SQL
in mysql queries /should/ use backticks (`) around database, table and
column names, stop's them getting confused with variables or reserved
words (like timestamp) and saves you future trouble :)
.. which is a mysql-ism - no other database supports this. As soon as
you need to use
On 23. Oct 2007, at 20:33, Colin Guthrie wrote:
If you compile PHP and it finds v3 of mysql that means that you must
have the old development libraries for mysql 3 installed in some
capacity (I believe).
What is the output of:
rpm -qa --nosignature --nodigest | grep -i mysql
This should give
David Christopher Zentgraf wrote:
On 23. Oct 2007, at 20:33, Colin Guthrie wrote:
If you compile PHP and it finds v3 of mysql that means that you must
have the old development libraries for mysql 3 installed in some
capacity (I believe).
What is the output of:
rpm -qa --nosignature
On 23. Oct 2007, at 21:07, Colin Guthrie wrote:
No, I reckon Jul 5th could be about right when was .45 released? I
had it in my head it was august but Jul doesn't seem too far before
that
so entirely possible.
Ah sorry, I was thinking about source installs. RPMs keep the
original
David Christopher Zentgraf wrote:
$ rpm -V MySQL-devel-community-5.0.45-0.rhel3
missing d /usr/share/man/man1/comp_err.1.gz
missing d /usr/share/man/man1/mysql_config.1.gz
I suppose this is, albeit not ideal, tolerable?
Yeah this is fine. Your system is probably not setup to install docs
David Zentgraf wrote:
Hi,
I'm trying to upgrade a server running CentOS 3 to an up-to-date MySQL 5
installation + PHP4. I installed the MySQL 5 package, server and client,
via RPMs and they work fine, the client tells me it's version 5.0.45. I
went on to recompile PHP 4.4.7 --with-mysql,
David Christopher Zentgraf wrote:
On 23. Oct 2007, at 17:22, Colin Guthrie wrote:
Do rpm -qa --nosignature | grep -i mysql and see what old libraries you
have lying around. Specifically look for the devel libraries/packages.
Remove the 3.x versions via RPM and make sure you've installed the
SELECT id FROM dates WHERE FROM_UNIXTIME($date_string) = date
then
SELECT id FROM dates WHERE UNIX_TIMESTAMP(date) = $date_string
neither is working. Am I making some fundamental error here or missing
something? Any help appreciated!
I know yui've alreayd solved this, but for what
Upgrade your MySQL distribution to the latest version (5+).
Upgrade any shared MySQL libraries to the latest distribute.
Recompile MySQL with mysqli support.
http://php.net/mysqli
And use that instead of the regular MySQL functions.
That's what I did and it has made a huge
that PHP5 has released...i dont see any good reason why u r
still using php 3.
/sagar
- Original Message -
From: M. Sokolewicz [EMAIL PROTECTED]
To: php-general@lists.php.net
Sent: Saturday, January 08, 2005 9:55 PM
Subject: [PHP] Re: PHP any Mysql connection- new b
php 3.0???!
man, you
php 3.0???!
man, you seriously need to think about upgrading :| PHP 3 is seriously
outdated
- tul
Babu wrote:
Hi all,
I am using php 3.0 and mysql and win xp.
i want to add users to database through php page.
adduser.php
html
FORM METHOD=post ACTION=add.php
Real Name: INPUT TYPE=text
Bingo. Many thanks.
Barley wrote:
If I run the script from a shell prompt as root, it outputs Yes. If I
run
as any other user, it outputs No. It also gives this error:
Warning: mysqli_connect(): Can't connect to local MySQL server through
socket '/var/lib/mysql/mysql.sock' (13)
Check
Barley wrote:
If I run the script from a shell prompt as root, it outputs Yes. If I run
as any other user, it outputs No. It also gives this error:
Warning: mysqli_connect(): Can't connect to local MySQL server through
socket '/var/lib/mysql/mysql.sock' (13)
Check permissions on /var/lib/mysql.
Try mysqli_connect(127.0.0.1, user, pass);
Then MySQLI will try to use TCP/IP as opposed to a local socket.
Jed
Barley wrote:
I am familiar with MySql, Linux and database programming in general, but I
have not used PHP very much.
On my server, I had an application running just fine under PHP 4.1
PHP doesn't detect anything. You need to have your mysql server running and
you try with mysql_connect() or mysql_pconnect() to see if you can connect
to the server
Sean Vasey [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Does anyone know how to get PHP to detect MySQL after it has
Webmaster [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Hello i need help with mysql_create_db i found the solution once but cant
remember what it was if someone could tell me the proper way to create a
database with php and mysql i would be greatly thankfull.
Thank you.
?php
Cesar Aracena wrote:
Hi all,
I'm making a site and need some tables from wich I can extract date, time
and/or date/time later with PHP and I neved had very clear the way the
possible formats work with each other so my question is what is the best (or
recommended) method to store dates and/or
Thanks both of you for the answer.
I tried what both of you told me and I found very easy to use the datetime
value under MySQL and then fetch it using strtotime() as fireball at
sizzling dot com recommended at the User Contributed Notes of php.net's
function.date.php page rather than using
Cesar Aracena wrote:
I tried what both of you told me and I found very easy to use the datetime
value under MySQL and then fetch it using strtotime() as fireball at
sizzling dot com recommended at the User Contributed Notes of php.net's
function.date.php page rather than using mktime() which can
Here is the script for what it's worth.
...
body bgcolor=#FF text=#00
h2IS IT WORKING?/h2
plt;?php
phpinfo();
?gt; /p
/body
/html
and the result is
IS IT WORKING?
?php phpinfo(); ?
are your trying to fool the list?
whate else do you expect than when you write gt; ??
would ASP work if
Bob G [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Please help I am going quite mad.
... The PHP.INI file is in the PHP directory.
the php.ini in your PHP directory is useless
It needs to be in 1 of 3 places...
1) the IIS root directory, meaning where IIS EXE is at,
*not*
for better understanding:
phpCode
$conn1 = mysql_connect(localhost, user, pwd);
mysql_select_db(database1, $conn1);
$conn2 = mysql_connect(localhost, user, pwd);
mysql_select_db(database2, $conn2); // select two diff. DBs
echo $conn1.br;
echo $conn2.br;
/phpCode
returns:
Resource id
See the new_link parameter option for mysql_connect. It should solve
your problem. On the other hand, what you are doing is fine, I did it
for my pool since I can't use the new_link option because I'm retaining
compatibility back to PHP 4.1.2
Cheers,
Rob.
dorgon wrote:
for better
Assuming Month_Start is stored in MySQL date format (-mm-dd) you could
Select blah blah From blah Order By DATE_FORMAT(Month_Start,%m) ASC
The %m will pad on the zeroes.
http://www.mysql.com/doc/en/Date_and_time_functions.html
- Original Message -
From: Tyler Durdin [EMAIL PROTECTED]
, January 07, 2003 5:06 PM
Subject: Re: [PHP] Re: PHP and MySQL bug
@mysql_select_db(be); -- this failed
do echo mysql_error(); to see what went wrong
Nuno Lopes wrote:
I done a echo of Mysql_error and it returned:
'Nenhum banco de dados foi selecionado'
(I have the mysql server
4:12 PM
Subject: RE: [PHP] Re: PHP and MySQL bug
Since nobody is jumping in to say it is some simple configuration/setting
personally my next step would be to shut down all services on the box that
aren't absolutely necessary and stop everything in the registry under run
and stop anything
:28 PM
Subject: RE: [PHP] Re: PHP and MySQL bug
This definitely sounds like a buggy installation or there may be some
problem with the communication between the web server and the mysqld. Is
the db on a different machine? Try using mysql_pconnect instead of
connect
just to see what result you
')
- Original Message -
From: David Freeman [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, January 05, 2003 10:29 PM
Subject: RE: [PHP] Re: PHP and MySQL bug
@MYSQL_QUERY(UPDATE d SET h='$h' WHERE id='$id'); // this
query doesn't work
Personally, I'd call it bad programming
I'm using Windows 2000.
- Original Message -
From: Cleber [EMAIL PROTECTED]
To: Nuno Lopes [EMAIL PROTECTED]
Sent: Tuesday, January 07, 2003 10:23 AM
Subject: Re: [PHP] Re: PHP and MySQL bug
Try add to /etc/hosts the name and ip of DB is located
- Original Message -
From
, January 05, 2003 10:29 PM
Subject: RE: [PHP] Re: PHP and MySQL bug
@MYSQL_QUERY(UPDATE d SET h='$h' WHERE id='$id'); // this
query doesn't work
Personally, I'd call it bad programming practice to do a database update
and not check to see if it worked or not. In this case, how are you
The problem is if I close the connection and reopen it the query is done,
but if I remain with the same connection has the previous query, mysql
returns an error.
- Original Message -
From: Larry Brown [EMAIL PROTECTED]
To: MySQL List [EMAIL PROTECTED]
Sent: Sunday, January 05, 2003 4:16
: Monday, January 06, 2003 10:09 AM
To: MySQL List; [EMAIL PROTECTED]
Subject: Re: PHP and MySQL bug
The problem is if I close the connection and reopen it the query is done,
but if I remain with the same connection has the previous query, mysql
returns an error.
- Original Message -
From
Here is the source code:
?
@MYSQL_CONNECT(localhost, nlopes, testing) or die(Erro 1);
@mysql_select_db(be);
$r=MYSQL_QUERY(SELECT n,u,m,h FROM d WHERE id='$id');
if (mysql_num_rows($r)==0) {
die (Erro);
} else {
$re=mysql_fetch_array($r, MYSQL_NUM);
$nome=$re[0];
$url=$re[1];
$mirrors=$re[2];
@MYSQL_QUERY(UPDATE d SET h='$h' WHERE id='$id'); // this
query doesn't work
Personally, I'd call it bad programming practice to do a database update
and not check to see if it worked or not. In this case, how are you
determining that the query did not work? Are you manually checking
You really should be using a $link variable...it's good habit:
$link = mysql_connect(...);
mysql_select_db( mydb , $link);
$query = mysql_query( select... , $link );
$result = mysql_fetch_array($query);
Lewis
Nuno Lopes [EMAIL PROTECTED] wrote in message
Personally I say get yourself a good simple dbconnect class and make life easy.
Also if you ever change users, database name etc, you onlu have one place to replace
it in your code.
I wrote mine based on http://www.vtwebwizard.com/tutorials/mysql/
Take a look at it. Nice and simple.
Mike
Personally I think the problem lies somewhere between the chair and the keyboard
(Sorry, couldn't resist) :-)
*** REPLY SEPARATOR ***
On 04/01/2003 at 4:58 PM Stefan Hinz, iConnect (Berlin) wrote:
It doesn't work because of the /* Some code including ... */ part ;-)
Nuno,
$r=MYSQL_QUERY(SELECT n,u,m,h FROM d WHERE id='$id');
/* Some code including mysql_num_rows and mysql_fetch_array($r,
MYSQL_NUM)
And the another query:
*/
MYSQL_QUERY(UPDATE d SET h='$h' WHERE id='$id');
/* i don't know why but this doesn't work!*/
It doesn't work because of the
That's how you do it. Hopefully you've figured it out already.
---John Holmes.
-Original Message-
From: dwalker [mailto:dwalker;healthyproductsplus.com]
Sent: Saturday, October 19, 2002 7:51 PM
To: professional php; [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: [PHP-DB] MySQL
.
-Original Message-
From: John W. Holmes [EMAIL PROTECTED]
To: 'dwalker' [EMAIL PROTECTED]; 'professional php'
[EMAIL PROTECTED]; [EMAIL PROTECTED] [EMAIL PROTECTED];
[EMAIL PROTECTED] [EMAIL PROTECTED]
Date: Saturday, October 19, 2002 7:24 PM
Subject: RE: [PHP-DB] MySQL Insert Select statement
That's
]
10/19/2002 08:32 PM cc:
Please respond to Subject: Re: [PHP-DB] MySQL
Insert Select statement
Indexes
Putting strings in single quotes instead of double (WHERE id = 'something')
Normalized database design.
- Monty
From: [EMAIL PROTECTED] (Erich Kolb)
Organization: RB Receivables Management, Inc.
Reply-To: Erich Kolb [EMAIL PROTECTED]
Newsgroups: php.general
Date: Fri, 2 Aug 2002
In article [EMAIL PROTECTED],
[EMAIL PROTECTED] says...
I am getting a parse error on line 75. I am trying to say:
if there is a booktitle and a quantity chosen, then go to that booktitle and
adjust the quantity in the database.
Thanks!
Renee
?php
$user = adminer;
$pass =
City Colleges Of Chicago - Mannheim [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
if there is a booktitle and a quantity chosen, then go to that booktitle
and
adjust the quantity in the database.
?php
$link = mysql_pconnect($local, $user, $pass)
I presume that quantity is the number of books that the person has
ordered, and therefore it needs to be a variable (ie with a $ infront of it)
and its also best to do the calculation outside of the SQL statement just to
be sure it works, eg:
if ($submit){
if(isset($booktitle)
] Re: PHP and mySQL
I presume that quantity is the number of books that the person has
ordered, and therefore it needs to be a variable (ie with a $ infront
of
it)
and its also best to do the calculation outside of the SQL statement
just
to
be sure it works, eg:
if ($submit){
if(isset
:[EMAIL PROTECTED]]
Sent: 03 May 2002 02:28
To: [EMAIL PROTECTED]
Subject: [PHP] Re: PHP with MySQL
Typically it's done like:
$db = mysql_connect('localhost','username','password');
The MySQL database detects what host you're connecting from, and appends
that to your username. I'm not sure
-Original Message-
From: Jon Haworth [mailto:[EMAIL PROTECTED]]
Sent: 03 May 2002 11:34
To: '[EMAIL PROTECTED]'; PHP
Subject: RE: [PHP] Re: PHP with MySQL
Hi .ben,
Just out of interest, what's the standard/best/tried
tested method for handling errors in relation to
connecting to DB's
Hi Ben,
John, presumably I can leave the error reporting on -
but pipe it into a file if i wanted, rather than
displaying on screen, and then redirect the user to
another page?
Of course you can - I generally have my pages send me email when they throw
an error, but that's because I'm
: [PHP] Re: PHP with MySQL
Hi Ben,
John, presumably I can leave the error reporting on -
but pipe it into a file if i wanted, rather than
displaying on screen, and then redirect the user to
another page?
Of course you can - I generally have my pages send me email when
they throw
] Re: PHP with MySQL
Oh, i agree entirely.
Ok, i'll look into the logging/mailing solution - something i've been
doing
in ASP for years but am new to in PHP.
Cheers,
.b
-Original Message-
From: Jon Haworth [mailto:[EMAIL PROTECTED]]
Sent: 03 May 2002 11:57
To: '[EMAIL
Thanks John.
-Original Message-
From: John Holmes [mailto:[EMAIL PROTECTED]]
Sent: 03 May 2002 16:29
To: [EMAIL PROTECTED]; 'PHP'
Subject: RE: [PHP] Re: PHP with MySQL
There's a whole section in the manual on it. There is a log_error() or
errorlog() function that'll write your
Typically it's done like:
$db = mysql_connect('localhost','username','password');
The MySQL database detects what host you're connecting from, and appends
that to your username. I'm not sure if it's possible to specify an
alternate host.
So if both PHP and MySQL are on the same machine, and
See the manual at php.net:
addslashes()
stripslashes()
I've found it easier to just turn on magic-quotes in the php.ini file
This is all covered at php.net
Robert
- Original Message -
From: Nick Patsaros [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
In article 180f01c1c403$2ac62820$[EMAIL PROTECTED],
[EMAIL PROTECTED] says...
I have a little problem when trying to count the number of results returned
in a mysql query. I was using mysql_num_rows() to do it with no problems,
but this isn't as quick as using mySQL's COUNT(*), or so I have
;
echo username: .$row[username].br\n;
}
}
mysql_free_result($result);
?
-Original Message-
From: David Robley [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 05, 2002 8:29 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Re: PHP and mySQL
In article 180f01c1c403$2ac62820
that is nix command. On window you need to start MySQL one of two ways.
http://www.mysql.com/doc/W/i/Windows.html
HTH
Gary
Morten Nielsen wrote:
Hi,
I try to use mySQL through PHP, but I can't get it to work.
Both PHP and mySQL is installed on my computer (win2k). The PHP manual says
I
Jeroen Geusebroek wrote:
Hi there,
Does the current stable PHP (4.06) support the use of the newly released
Mysql 4?
No. Not even with CVS version AFAIK.
--
Yasuo Ohgaki
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional
check your connection string and if it something like mysql_pconnect change
it in mysql_connect
Stefan de Wal
Pieter Philippaerts [EMAIL PROTECTED] schreef in bericht
([EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Unfortunately, I can't access these settings. It's not our computer that
hosts
We have never used mysql_pconnect.
Regards,
Pieter Philippaerts
Stefan De Wal [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
check your connection string and if it something like mysql_pconnect
change
it in mysql_connect
Stefan de Wal
--
PHP General
Options:
Increase the settings in MySQL that limit how many databases can be open at
once.
Decrease the number of Apache children running.
Basically, as long as you have more Apache children than MySQL connections
available, you can get this message.
Actually, have a few spare MySQL
Unfortunately, I can't access these settings. It's not our computer that
hosts
our website.
Regards,
Pieter Philippaerts
Richard Lynch [EMAIL PROTECTED] wrote in message
01e501c138ce$f3008300$6401a8c0@Lynchux100">news:01e501c138ce$f3008300$6401a8c0@Lynchux100...
Options:
Increase the settings
Aloysius wrote:
my mysql database just won't work .. i think i have configured it correctly cause i
can see a page but the codes are messed up ..
i can confirm that the servers supports php . both php and php3 extension because
i've tried uploading simple codes and it appears correctly ...
pconnect will be your biggest win, almost for sure.
After that, I'm guessing that you'll just be making very minor speed-ups...
--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm
hi,
I would suggest u do not put path to mysql with php configure...simply,
--with-mysql will do..
hope iit works,
thank you
regards,
James
Kurt Lieber wrote:
OK, there's been another thread floating around about getting:
Fatal error: Call to undefined function: mysql_pconnect()
Turns
try something like splitting the keywords using the php-command split(...)
using a space as a separator
and then search for a string matching all the words using
SELECT from table WHERE string LIKE %foo% AND string LIKE %bar%;
-Original Message-
From: Jens Kisters [mailto:[EMAIL
71 matches
Mail list logo