I had been working on "Preorder tree traversal algorithm" as a part of my daily task.. what I came across was that for MySQL, we need to lock a table and after insertion or deletion of any entry, we need to unlock the particular table (I succeeded in my task though).... I juz wonder why we do this??? apart from this case, where else do ...
We are using Jmeter to test our Php application running on the Apache 2 web server. I can load up Jmeter to use 25 or 50 threads and the load on the server does not increase, however the response time from the server does. The more threads the slower the response time. It seems like Jmeter or Apache is queuing the requests. I have ch...
I am wondering if it is possible to automate or by button press to move mysql table information from one table to another table deleting it from the first table and putting it in another table? Using php.
My mysql table is big and the page that adds the information to that table has 70 query's on it which slows the page refresh times. ...
Hello once again,
I'm doing an auctions website (not for any institution, just as part of my learning of php and cakephp). At Home page I have all the items displayed. What I need to do now is to refresh price / last licitation and time remaining in each item when any user makes a licitation.
So do you know how can I, in a view, keep w...
Hi All, thanks in advance for your time,
Over the last year I have moved from a beginner PHP developer to a more intermediate developer, I use Mac OS X and a local development server environment (MAMP).
I am thinking about starting to develop using the .NET framework. Can anyone give me some advice?
What do I need to begin?
How sim...
I feel daft asking this, but it's driving me potty. How can I make this string:
Children\''s Toy
Suitable for insert to a MySQL database and escape the characters properly?
Thanks
...
I have a function that takes 2 variables, one for the database connection and the other for a query. For some reason, the mysqli link isn't happy unless it is inside the function; It isn't enough to just pass the link.
Has anyone else had this happen and what can I do to avoid instantiating the db object inside the function.
This does ...
I am developing a Zend MVC application.
Sometimes I like to echo some text just for quick and dirty debugging. e.g
<?php
class MyClass {}
echo('hello world - yes this script is included');
I can echo 'debug-text' in my bootstrap> But, when text is echoed in my model or controllers it is NOT being rendered in the output.
I am using Z...
header.php
<?php
$conn = mysql_connect('localhost', '-', '-');
@mysql_select_db('accmaker', $conn) or die("Unable to select database");
?>
<html>
<head>
<title>Mysite.com - <?php isset($pageTitle) ? $pageTitle : 'Home'; ?></title>
</head>
<body>
profile.php
require 'header.php';
$q = mysql_query("SELECT * FROM users WHERE usernam...
First, I'm just starting to learn MySQL with PHP.
My query copy/paste directly from my IDE:
$query = "CREATE TABLE IF NOT EXISTS $table_messages (
id int(11) unsigned NOT NULL auto_increment,
show tinyint(1) unsigned NOT NULL default '0',
to varchar(255) ...
I have to make a view that shows unrelated data from multiple tables. I am new to cakePHP (and PHP in general) and as far as my understanding goes, each model is a depiction of just one table. I know that we can define associations with other tables, but in my case I need to give access to data that is no way related to the model who's v...
I have a generally straight forward web service that I've written (converting code to ZF from a Java implementation of the same service and trying to maintain the same wsdl structure as much as possible). The service loads a PHP class, rather than individual functions. The PHP class contains three different functions within it.
Everyth...
I'm working on a site where the user can select his country, for now I've created an array which contains alla nation names and relative codes like it code for Italy:
<?php
$nations[] = array ("code" => "af", "name" => "Afghanistan");
$nations[] = array ("code" => "ax", "name" => "Aland Islands");
$nations[] = array ("code" => "al", "na...
Hi,
i want to serve an existing file to the browser in php.
i've seen examples about imagejpeg but that function seems to save a file to disk and you have to create a right sized image object first... (or i just don't understand it :))
in asp.net i do it by reading the file in a byte array and the call context.Response.BinaryWrite(byte...
I've got two matching php programs, one held on the development folders, the other on the live folders, both on the same machine. The live version can pull data from the database and display it, the development version cannot and kills the page as solid white.
Both are identical and both are reaching for the same database.
I wish I ...
Hi all, i looking for help... and hope of you kindly
I want to change my site language model from radio button to auto dropdown button using loop
This the languages
if ($lang=="en") {
//Pages
define ("Pages", "Pages") ;
}
if ($lang=="de") {
define ("Pages", "Seiten") ;
}
This the existing Radio button
<td width="6...
I would like to perform SVN operations on an SVN repository (over HTTP, if it matters) without requiring a working copy. Basically, here are the things I want to do:
Check if a directory exists remotely.
If the directory does not exist, create it
Check if a file exists in the repository
if the file does not exist, create a new fil...
I have a Drupal 5 site that is using the Printer, e-mail and PDF versions module that appears to be creating a print version of a URL like so:
screen:
country/uk
print:
print/country/uk
Each page is set up using panels and has the country image and a view of most recent country news below.
On the print/country/xxx the view isn't pr...
I wonder 3 things.
1: If I have implemented an interface (with a method) in a superclass where im declaring that method, and then I extend that superclass in another class. Then I don't have to redeclare that method right?
2: But if I don't declare that method in the superclass but in the child class then I instantiate the superclass. ...
I am using the header function of PHP
to send the file to the browser with some small code. Its work well
and I have it so that if any one requests it with a referer other than my site
it redirects to a page first.
Unfortunately it's not working with the internet download manager.
What I want to know is how the rabidshare and 4shared si...