Sponsored Content
Top Forums Shell Programming and Scripting Something went awfully wrong in PHP+MySQL :( Post 302142857 by Legend986 on Tuesday 30th of October 2007 01:08:12 AM
Old 10-30-2007
Something went awfully wrong in PHP+MySQL :(

When I'm running a few statements through mysql console, they are working just fine but when I'm trying to write some logic in php and trying to execute it, its awfully slow.. Its perhaps performing, 10 queries in 20 seconds... Smilie Why is this happening?

My table structures are:

Name: asn_number
+------------+--------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+------------+--------------+------+-----+---------+-------+
| asn | mediumint(9) | | MUL | 0 | |
| ip_address | varchar(18) | | MUL | | |
+------------+--------------+------+-----+---------+-------+

And

Name: trace
+-------+---------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-------+---------------+------+-----+---------+----------------+
| id | double | | PRI | NULL | auto_increment |
| gid | int(11) | | | 0 | |
| sno | tinyint(4) | | | 0 | |
| asn | tinyint(4) | | MUL | 0 | |
| ip | varchar(18) | | MUL | | |
| r1 | decimal(10,3) | | | 0.000 | |
| r2 | decimal(10,3) | | | 0.000 | |
| r3 | decimal(10,3) | | | 0.000 | |
+-------+---------------+------+-----+---------+----------------+

Can someone tell me what could've gone wrong?
 

9 More Discussions You Might Find Interesting

1. Cybersecurity

mysql php

with a limited knowledege of php and sql, what is a good and secure way to do passwords running an https server? (1 Reply)
Discussion started by: macdonto
1 Replies

2. UNIX for Dummies Questions & Answers

PHP and MySQL

I want to design a database, using mysql as a backend, and PHP as the frontend, I wanna be able to easily build forms in PHP to communicate with MySQL, is there any programs that will allow this, I really dont want to program all the forms by hand.. thankyou (2 Replies)
Discussion started by: kwalick
2 Replies

3. Shell Programming and Scripting

Problem with PHP and MySQL

Okay, I'm new to this PHP and MySQL stuff, so help would be VERY much appreciated. :) On my iMac runnning Panther, it has MySQL and PHP installed. Yet when I view a PHP file from the iMac or another computer at my house, I get the source code. What's wrong? (11 Replies)
Discussion started by: Danny_10
11 Replies

4. Shell Programming and Scripting

PHP/MySQL slow_queries

Hi All, I have a problem with my database having lots of 'stale' slow_queries. I think the problem may be because of the following code: $numresults=mysql_query("select * from links where catagory=".$catagory." order by linknum"); $numrows=mysql_num_rows($numresults); I believe this... (4 Replies)
Discussion started by: pondlife
4 Replies

5. Programming

MySQL - PHP

Hello every one i have question i want to build DATAbase using PHP as interface i use shell to access to linux . i have in linux psql and SQLplus i'll call all html files that has db tabels from shell directory. what should to do before design php pages. can build the database sql design... (3 Replies)
Discussion started by: Scotch
3 Replies

6. Shell Programming and Scripting

Mysql is not connected in php

Hi, The php is not able to connect into my mysql database. But i can able to connect by manually. I think that I have missed some points. Please guild for the same. Thanks, Mani (1 Reply)
Discussion started by: Mani_apr08
1 Replies

7. Emergency UNIX and Linux Support

Migration of website... PHP/Mysql -which path for DB.php

Hi, I have two websites: website1.com and website2.com I didn't write either but have successfully moved all the files from website1.com to website2.com I (thought) I installed all the correct php modules and website2 is mostly up and running. However, my boss found that when we go to a... (15 Replies)
Discussion started by: Astrocloud
15 Replies

8. Programming

PHP and MySQL

Hello, While I was interpretation the PHP manual on database security the recent past, it said that you should by no means connect to the database as the super user but rather as one more user with more limited options. My question is: How do you generate new users and set access... (2 Replies)
Discussion started by: AimyThomas
2 Replies

9. Web Development

Can't Install MySQL with PHP

Hi, I'm on a Raspberry Pi with Raspbian Wheezy. I urgently need to get MySQL running with PHP, but I get an error. For example: $con=mysql_connect("127.0.0.1","root","******","ids"); gives PHP Fatal error: Call to undefined function mysql_connect() So, I found I needed to install some... (2 Replies)
Discussion started by: FreddoT
2 Replies
set(1m) 																   set(1m)

NAME
set - Modifies characteristics for the DTS entity. SYNOPSIS
dtscp set characteristic ARGUMENTS
The name and value of one or more characteristics to be modified. Valid values for characteristic are described in the following list. These values are described in more detail in the description section. check interval [relative-time] courier role [role] error tolerance [relative-time] global set timeout [relative-time] local set timeout [relative-time] maximum inaccuracy [relative-time] query attempts [integer] server entry name [name] server group name [name] server principal name [name] servers required [integer] synchronization hold down [relative-time] DESCRIPTION
The set command modifies the charactistics you specify for the DTS entity. The modifiable characteristics and their values are described in the following list. Specifies the amount of time between checks for faulty servers. Applicable only for servers that have external time providers. Default: 0-01:30:00.000 Value: 0-00:00:30.000 - 10675199-02:48:05.000 Specifies a server's interaction with the set of global servers. Default: backup courier The following values are valid: The local server becomes a courier if none are available on the LAN. The local server synchronizes with the global set of servers. The local server does not synchronize with the global set of servers. Specifies the maximum separation allowed between the local clock and the computed time before synchronizations become abrupt rather than gradual (monotonic). Default: 0-00:10:00.000 Value: 0-00:00:00.500 - 10675199-02:48:05.000 Specifies the amount of time the node waits for a response to a global synchronization request before sending another request or declaring a global server to be unavailable. The number of attempts made to reach the server is controlled by the query attemps characteristic. Default: 0-00:00:15.000 Value: 0-00:00:00.000 - 0-00:10:00.000 Specifies the amount of time the node waits for a response to a local synchronization request before sending another request or declaring a server to be unavailable. The number of attempts made to reach the server is controlled by the query attemps characteristic. Note that the local set timeout value controls only the initial contact with a time provider. During this initial contact, the time provider itself determines the timeout value for actually reporting back times. This allows a time provider attached to a slow source like a modem to request that dtsd wait for a longer interval. Default: 0-00:00:05.000 Value: 0-00:00:00.000 - 0-00:01:00.000 Specifies the inaccuracy limit for the node. When the node exceeds the maximum inaccuracy setting, it attempts to synchronize. Default: 0-00:00:00.100 Value: 0-00:00:00.000 - 10675199-02:48:05.000 Specifies the number of attempts that a node makes to contact a server before the node considers the server unavailable. Default: 3 Value: 1-10 Specifies a server's CDS entry name; hostname represents the name of the system or node that is the server's client. The default setting is the recommended value. Default: /.:/hosts/hostname/dts-entity Specifies the name of the security group that DTS uses for authentication checks. DTS clerks and servers do not accept time values from DTS servers that are not included in this group. Specifies a server's principal name for authentication purposes; hostname represents the name of the system or node that is the server's client. The default setting is the recommended value. Default: /.:/hosts/hostname/self Specifies the minimum number of servers required for a synchronization. Settings of 1 or 2 may cause unreliable computed times. Default: 1 (clerks) 3 (servers) Value: 1-10 Specifies the interval a node must wait to synchronize. Also specifies synchronization frequency when a node reaches the value specified by the maximum inaccuracy characteristic. Clerks: Default: 0-00:10:00.000 Value: 0-00:00:30.000 - 01-00:00:00.000 Servers: Default: 0-00:02:00.000 Value: 0-00:00:30.000 - 01-00:00:00.000 Privilege Required You must have write permission on the ACL associated with the DTS entity in order to execute the command. NOTES
This command is replaced at Revision 1.1 by the dcecp command and may not be provided in future releases of DCE. The following two commands are obsolete. Use the replacements shown. This command is the same as set local set timeout. This command is the same as set global set timeout. EXAMPLES
The following example command sets the check interval characteristic to 30 seconds: dtscp> set check interval 00-00:00:30.000 The following example shows how to set the number of servers required before the entity can syn- chronize: dtscp> set servers required 4 The following example shows how to set the courier role for a server: dtscp> set courier role backup courier The following example command sets the error tolerance characteristic to seven minutes: dtscp> set error tolerance 0-00:07:00.000 The following example command the global set timeout characteristic to 45 seconds: dtscp> set global set timeout 0-00:00:45.000 The following example command the local set timeout characteristic to five seconds: dtscp> set local set timeout 0-00:00:05.000 The following example command sets the maximum inaccuracy characteristic to three milliseconds: dtscp> set maximum inaccuracy 0-00:00:00.300 The following example command sets the server entry name characteristic to /.:/hosts/orion/dts-entity: dtscp> set server entry name /.:/hosts/orion/dts-entity The following example command sets the server principal name characteristic to /.:/hosts/vega/dts-entity: dtscp> set server principal name /.:/hosts/vega/dts-entity The following example command sets the synchronization hold down characteristic to 15 minutes: dtscp> set synchronization hold down 0-00:15:00.000 RELATED INFORMATION
Commands: show(1m) set(1m)
All times are GMT -4. The time now is 04:08 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy