Re: [PHP-DB] What wrong with my Query??

2005-03-26 Thread GR Kumaran
There you have to consider the following things;
1, the query is mixed with INSERT and UPDATE staments
2, `id` is a numeric data type field, so the value should be mentioned
in numeric form (instead of string)
3, LIMIT is a keyword of SQL statement
4, `lastip` field is a string datatype, so the value should be
mentioned in string form
5, if the query is just for insertion of a new record, there might be
no need to specify value for `id` field as it is an auto_increment
field

R. Kumaran
India


: -Original Message-
: From: HarryG [mailto:[EMAIL PROTECTED]
: Sent: Thursday, March 24, 2005 11:27 PM
: To: php-db@lists.php.net
: Subject: [PHP-DB] What wrong with my Query??
:
:
: What the hell is wrong with this MYSQL query?? PHP keeps giving me
the
: error message:
:
: You have an error in your SQL syntax. Check the manual that
corresponds
: to your MySQL server version for the right syntax to use near
: 'limit=2, name='test1', email='[EMAIL PROTECTED]', password='t
:
: $query = INSERT INTO mfadmin SET id='', account='$accname_lc',
: limit=$plans, name='$yourname', email='$email',
password='$password',
: lastlogin='$datetoday', datecreated='$datetoday',
expiry='$expirydate',
: lastip=123.123.123.123;
:
: This is my table structure
: CREATE TABLE `admin` (
:   `id` int(10) unsigned NOT NULL auto_increment,
:   `account` varchar(50) NOT NULL default '',
:   `limit` int(10) unsigned NOT NULL default '0',
:   `name` varchar(50) NOT NULL default '',
:   `email` varchar(50) NOT NULL default '',
:   `password` varchar(50) NOT NULL default '',
:   `lastlogin` varchar(50) NOT NULL default '',
:   `datecreated` varchar(50) NOT NULL default '',
:   `expiry` varchar(50) NOT NULL default '',
:   `lastip` varchar(50) NOT NULL default '',
:   PRIMARY KEY  (`id`)
: ) TYPE=MyISAM;
:

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] php/js

2005-03-26 Thread Yemi Obembe
hi guys,
sorry about making this stupid comparisons but i hope someone help me with 
them. Simply, I'd like to know php functions that are equivalent to this 
javascript functions:
1.document.lastModified // displays date document was modified as reported by 
server
2.var php = 'php forever!'
   document.write(php.big()) // outputs bigphp forever!/big



-

A passion till tomorrow,
Opeyemi Obembe | ng.clawz.com






-
Do you Yahoo!?
 Yahoo! Small Business - Try our new resources site! 

RE: [PHP-DB] php/js

2005-03-26 Thread Bastien Koert
1. http://ca.php.net/manual/en/function.filemtime.php
2. $php = php forever;
  echo big$php/big;
bastien
From: Yemi Obembe [EMAIL PROTECTED]
To: php-db@lists.php.net
Subject: [PHP-DB] php/js
Date: Sat, 26 Mar 2005 06:48:27 -0800 (PST)
hi guys,
sorry about making this stupid comparisons but i hope someone help me with 
them. Simply, I'd like to know php functions that are equivalent to this 
javascript functions:
1.document.lastModified // displays date document was modified as reported 
by server
2.var php = 'php forever!'
   document.write(php.big()) // outputs bigphp forever!/big


-
A passion till tomorrow,
Opeyemi Obembe | ng.clawz.com


-
Do you Yahoo!?
 Yahoo! Small Business - Try our new resources site!
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP-DB] Slow access Apache + PHP + MySQL

2005-03-26 Thread Andre Matos
Hi List,

I have 4 web based systems developed using PHP4 and MySQL accessed for 10
users. The Web Server and Database Server were running ok on a Mac OS X 10.3
G4 dual. However, since we move to a new server, the access becomes very
slow. This was not expected since we move to a 64 bits high performance
machine.

Now, we are using MySQL version 4.1.9 with Apache 2.0.52 and PHP 4.3.10, all
compiled and running on a Linux Fedora X86_64.

My first thought was the systems, but since I have not changed 3 of the 4
systems, I start to look to the database. I monitored the MySQL using MySQL
Administrator, but I couldn't identify any problem. It looks ok, but not
completely sure if really is.

The system administrator told me that could be the PHP session, but again,
he also was not complete sure about this.

It is a big problem since I need to check in 3 places: MySQL, Apache, or
PHP.

Does anyone had this kind of problem or has any suggestion or direction to
help me to identify and solve this issue?

Any help will be appreciated!!!

Thanks.

Andre

-- 
Andre Matos
[EMAIL PROTECTED]

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] Slow access Apache + PHP + MySQL

2005-03-26 Thread Bastien Koert
There are a ton of things to check.
Check the amount of memory that can be used by each process;
add some time checks to the scripts to see where the hang ups are, if its db 
access or the webserver.
Monitor the amount of resources consumed by each process during a page 
creation/query.
Check the logs. Turn on slow-query log for mysql to see what queries(if any) 
could be tuned to gain performance.
Check to see that the webserver has all required permissions to write 
session files (if your app uses sessions) and other files as needed.
Check to see if you have indexes on the tables. We've migrated before and 
lost all the indexes and that can kill the app.

bastien
From: Andre Matos [EMAIL PROTECTED]
To: 'php-db@lists.php.net' php-db@lists.php.net
Subject: [PHP-DB] Slow access Apache + PHP + MySQL
Date: Sat, 26 Mar 2005 10:47:18 -0500
Hi List,
I have 4 web based systems developed using PHP4 and MySQL accessed for 10
users. The Web Server and Database Server were running ok on a Mac OS X 
10.3
G4 dual. However, since we move to a new server, the access becomes very
slow. This was not expected since we move to a 64 bits high performance
machine.

Now, we are using MySQL version 4.1.9 with Apache 2.0.52 and PHP 4.3.10, 
all
compiled and running on a Linux Fedora X86_64.

My first thought was the systems, but since I have not changed 3 of the 4
systems, I start to look to the database. I monitored the MySQL using 
MySQL
Administrator, but I couldn't identify any problem. It looks ok, but not
completely sure if really is.

The system administrator told me that could be the PHP session, but again,
he also was not complete sure about this.
It is a big problem since I need to check in 3 places: MySQL, Apache, or
PHP.
Does anyone had this kind of problem or has any suggestion or direction to
help me to identify and solve this issue?
Any help will be appreciated!!!
Thanks.
Andre
--
Andre Matos
[EMAIL PROTECTED]
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php