On Saturday 03 August 2002 04:13, Erich Kolb wrote:
Is there any way to speed up MySQL queries?
1) Use a faster computer
2) Read the mysql manual
3) Ask on the mysql list
4) Ask google
--
Jason Wong - Gremlins Associates - www.gremlins.com.hk
Open Source Software Systems Integrators
* Web
On Mon, Jul 08, 2002 at 10:49:12AM +0300, adi wrote:
$string=-line1\n -line2 \n-line3;
$result2 = db_query(update table1 set column1= '$string' where ID =
'$IDcurent') or db_die();
When i try to view in a textarea control the new value from column1, the
newlines disappear!
Werid.
Steven:
On Sun, Jun 23, 2002 at 10:30:56PM +0100, Steven Dowd wrote:
ID , Address, Name, Relation
1, market st, fred waters, head
2, market st, mrs waters, wife
3, market st, paul waters, son
4, market st, jim wheeler, head
5, market st, mrs wheeler, wife
6, market st, ann wheeler, dau
Hi,
[..]
$user = OMMITTED;
$pass = OMMITTED;
$db = Book Store1;
$local = OMMITED;
$link = mysql_connect( $local, $user, $pass );
[..]
You do realise, you have just pasted your database connection details to
the world?! I gonna have to write an article on how to communicate
securely
You do realise, you have just pasted your database connection details to
the world?! I gonna have to write an article on how to communicate
securely over the internet. (not just with PHP, but with the data you
communicate in the messages as well!!)
Well not quite, she did post her username
mysql_select_db( $db, $link )
or die ( Couldn't open the $db: .mysql_error() );
if ($submit){
if( $booktitle AND quantity ){
$sql = UPDATE Book2 SET stock ='$stock-quantity' WHERE
booktitle='$booktitle' AND quantity=quantity;
}
Easy enough =) You're not running the mysql query =)
Missed a spot =)
if( $booktitle AND quantity ){
I'm not certain if this if statement is accurate. I've never used a
statement like this but from the looks of it the AND quantity part would
always be true (assuming it parses it). This could be adding to your
problem as well. I think you were
On Thu, 16 May 2002, City Colleges of Chicago - Mannheim wrote:
SELECT name = quantity size=1
OPTION value=11/OPTION
OPTION value=22/OPTION
OPTION value=33/OPTION
OPTION value=44/OPTION
OPTION value=55/OPTION
OPTION value=66/OPTION
OPTION value=77/OPTION
OPTION value=88/OPTION
OPTION
On Tuesday 14 May 2002 18:38, City Colleges of Chicago - Mannheim wrote:
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.
if ($booktitle AND $quantity) { ...
?php
:51 PM
Subject: Re: [PHP] PHP and mySQL
On Tuesday 14 May 2002 18:38, City Colleges of Chicago - Mannheim wrote:
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
snip
}else if(!$submit){
/snip
Acthough you didn't show 75 lines of code my guess would be your problem
lies here. The else and the if shouldn't have a space between them.
} elseif(!$submit){
See how that works for you =)
Also your SQL is faulty
snip
$sql = UPDATE Book2 SET
You are missing a before $booktitle.
old:booktitle=$booktitle AND quantity=quantity;
new:booktitle=$booktitle AND quantity=quantity;
So you're saying
$sql = UPDATE Book2 SET stock ='$stock-quantity' WHERE
booktitle=$booktitle AND quantity=quantity;
is the correct SQL statement? Me thinks
Actually, elseif and else if are both valid.
J
Craig Vincent wrote:
snip
}else if(!$submit){
/snip
Acthough you didn't show 75 lines of code my guess would be your problem
lies here. The else and the if shouldn't have a space between them.
} elseif(!$submit){
See how that works
mysql_connect(host,username,password);
If there is no password, leave it blank. host is the name or IP
address of the MySQL server. Set it to localhost if it's on the same
machine as the script.
---John Holmes...
-Original Message-
From: Paras Mukadam [mailto:[EMAIL PROTECTED]]
You can simply grant username instead of username@machine.
Bogdan
Paras Mukadam wrote:
Hi Gurus,
one MySQL - PHP query : while granting permissions to particular user in
MySQL, the administrator has to give username@machine_address !! Then how
can we connect to MySQL through PHP only by
On Thu, 2 May 2002, Paras Mukadam wrote:
one MySQL - PHP query : while granting permissions to particular user in
MySQL, the administrator has to give username@machine_address !! Then how
can we connect to MySQL through PHP only by passing username as one of the
arguments to mysql_connect() ?
Um. Sorry. That was idiotic.
Bogdan
Bogdan Stancescu wrote:
You can simply grant username instead of username@machine.
Bogdan
Paras Mukadam wrote:
Hi Gurus,
one MySQL - PHP query : while granting permissions to particular user in
MySQL, the administrator has to give
Your message? Actually you're right. I just noticed in the manual:
The simple form user is a synonym for user%.
miguel
On Fri, 3 May 2002, Bogdan Stancescu wrote:
Um. Sorry. That was idiotic.
Bogdan
Bogdan Stancescu wrote:
You can simply grant username instead of
Ok. Then the second message was even more idiotic. Damn! :)
Bogdan
Miguel Cruz wrote:
Your message? Actually you're right. I just noticed in the manual:
The simple form user is a synonym for user%.
miguel
On Fri, 3 May 2002, Bogdan Stancescu wrote:
Um. Sorry. That was idiotic.
Bogdan
Since you didnt make it clear, do you even have MySql and php on your
server? Are you looking to just move your data or looking to get php mysql
installed on the server as well? (SERVER = production site, not localhost)
if you just wanna move data, like everyone else said phpmyadmin rocks, but
Cyberskydive wrote in message:
Since you didnt make it clear, do you even have MySql and php on your
server? Are you looking to just move your data or looking to get php
mysql
installed on the server as well? (SERVER = production site, not localhost)
...
Yes. I have
On Fri, 5 Apr 2002, Anthony Ritter wrote:
Any idea what the cost is for the ISP to install mySQL on their end so that
I can utilize my database that I've set up on localhost?
MySQL is free for that sort of usage, so it only costs their time. If
they've done it before, it takes about 5 minutes
At 04.04.2002 18:39, you wrote:
Using MS Windows 98, Apache, PHP and mySQL.
I've installed Apache on my hard drive to test a database driven website
using PHP and mySQL.
Could somebody lead me through the steps if I want to continue using the
mySQL database and PHP when the site goes live and
You should install something like phpMyAdmin, which is a web based admin
tool for MySQL... among it's MANY awesome features (create modify tables
and databases, perform queries, all in a GUI way), it has the ability to
save dumps of the database or table structure, and/or the database/table
Sorry if my original question was confusing.
This is what I would like to accomplish:
I am currently developing a database on my website using mysql which is on
my harddrive.
I have installed Apache as well and I am using PHP.
My database is functioning fine on localhost.
I would like to find
check out phpMyAdmin, as per my last post on the issue to you.
Justin French
on 05/04/02 1:25 PM, Anthony Ritter ([EMAIL PROTECTED])
wrote:
Sorry if my original question was confusing.
This is what I would like to accomplish:
I am currently developing a database on my website using
On Thu, 4 Apr 2002, Anthony Ritter wrote:
Sorry if my original question was confusing.
This is what I would like to accomplish:
I am currently developing a database on my website using mysql which is on
my harddrive.
I have installed Apache as well and I am using PHP.
My database is
If this file has a .php extension remote users will not have access to the
variables because the file is parsed by php and they never see the actual
file contents when requesting the document via the web. If you are
concerned with users on localhost having access to the file, simply give it
the
At 16:59 -0800 1/27/02, Fred wrote:
If this file has a .php extension remote users will not have access to the
variables because the file is parsed by php and they never see the actual
file contents when requesting the document via the web. If you are
concerned with users on localhost having
* Miles Thompson ([EMAIL PROTECTED]) [Jan 27. 2002 19:55]:
Hi Miles,
[...]
$hostname = 12.34.56.78;
$user = username;
$password = password;
$dbname = database;
and change your connection string as follows:
include 'params.inc';
//maybe some other stuff her
$conn =
If you know you are running on an apache server, you could try using a
simple .htaccess file in a (say) etc directory which contains any or all
files you wish to secure.
ie:
/index.php
/etc/config.php
/etc/.htaccess
--index.php
?php
include(etc/config.php);
...
?
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
* On 17-01-02 at 21:57
* Morten Nielsen said
- --with-mysql. But I can't figure out what that means.
That looks like a Unix(ish) command?
Hi,
I try to use mySQL through PHP, but I can't get it to work.
Both PHP and mySQL is installed
Tanks Vicent, but i found the problem. It was in the php.ini that was
broken. I reinstall de PHP and after i reinstall php-mysql. After all
the php with mysql work .
Tanks.
Fred
On Sun, 2002-01-13 at 19:24, Vincent Stoessel wrote:
Yeah, this smells like someone upgraded/recompiled php without
Yeah, this smells like someone upgraded/recompiled php without mysql
and that is pretty hard to do nowadays as mysql is built in by default.
Dennis Moore wrote:
execute phpinfo(); on a new page to see if mysql is still compiled in...;
- Original Message -
From: Frederico
execute phpinfo(); on a new page to see if mysql is still compiled in...;
- Original Message -
From: Frederico Madeira [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, January 10, 2002 10:37 PM
Subject: [PHP] PHP x Mysql
Hello !!
My server was runing perfect the mysql
Case 2. Without any form of auth, I read the text file and do
mysql_connect($the_db_host,$the_db_username,$the_db_pass);
mysql_select_db($the_db_name);
mysql_query(select * from table);
and the server response is:
Error 2002: Can't connect to local MySQL server through socket
Hello John,
Wednesday, August 01, 2001, 11:06:06 AM, you wrote:
JM In an environment where it's possible to have multiple
JM users register at the same time (relatively speaking), how can I be sure
JM that the 'last ID' is indeed the 'intended' last user's ID?
JM Ex.
JMSay that
Many thanks, Daniel!
I trully appreciate it.
-john
__John Monfort_
_+---+_
P E P I E D E S I G N S
www.pepiedesigns.com
The world is waiting, are you ready?
-+___+-
On Wed, 1 Aug 2001,
This happens when the mysql server you are running is different from the
version of the mysql library php was linked against. If you compiled php
using --with-mysql you get the mysql client library that comes bundled
with PHP which may not match your mysql server and thus may look for the
Maybe his mysql.sock file isn't in /var/lib/mysql/mysql.sock?
Mine is /tmp/mysql.sock
-Original Message-
From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]]
Sent: Friday, July 13, 2001 1:31 AM
To: Gaylen Fraley
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] PHP installed - MySql Server can't
You can also use the curdate() function in the MYSQL syntax.
e.g. insert into table (datefield) values (curdate());
Cheers
Kee Yong
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the
Try using
?
$date = date ("Y-m-d H:i:s");
?
which formats the same as MySQL...
-Original Message-
From: Dhaval Desai [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 15, 2001 2:19 AM
To: [EMAIL PROTECTED]
Subject: [PHP] php or Mysql for DATE?
I want to have a posting column wherein
On Thu, 15 Mar 2001 17:49, Dhaval Desai wrote:
I want to have a posting column wherein people can
post their messages and when a new message is posted
the Curent date has to be added in the mysql database.
Do u think I should use Php to generate the date or
should I have mysql to generate
You can see my problem here. I want to be able to write parts of my sql
statement based upon user input, and then execute it all at once. How do I
tie all of my $qual variables in so that this will read/execute it
properly?
$where = ' where 1=1 ';
if ($dig == '1'){
$where .= " and track =
Read RFC2396 for URI format.
You are escaping query string as HTML where do you don't have to.
When you deal with query string, you should escape as URL.
Read PHP manual for rawurlencode()/rawurldecode() for URL encode/decode.
Regards,
Yasuo Ohgaki
- Original Message -
From: "Jim Ray"
I have a BLOB field in a MySQL database that I want
to parse into my page using PHP.
For instance, in this field might be the following:
? echo "test"; ?
So when I access this field in PHP I want it to display "test".
Is this possible?
Yeah. That's called "eval" (short for 'evaluate')
101 - 146 of 146 matches
Mail list logo