php

Get a unique data in a SQL query

Hi, I've a database who contain some datas in that form: icon(name, size, tag) (myicon.png, 16, 'twitter') (myicon.png, 32, 'twitter') (myicon.png, 128, 'twitter') (myicon.png, 256, 'twitter') (anothericon.png, 32, 'facebook') (anothericon.png, 128, 'facebook') (anothericon.png, 256, 'facebook') So as you see it, the name field is no...

Child segmentation fault when doing SOAP request in php 5.1.6

I get a "[notice] child pid 26701 exit signal Segmentation fault (11)" in apache log when I try to do a simple soap request using standard php soap library. I'm running php 5.1.6 on Centos 5.4 ...

Please suggest some alternative to Drupal

Drupal propose completely different approach in web development (comparing with RoR like frameworks) and it is extremely good from development speed perspective. For example, it is quite easy to clone 90% of stackoverflow functionality using Drupal. But it has several big drawbacks: it is f''cking slow (100-400 requests per page) db st...

PHP Regular express to remove <h1> tags (and their content)

Hay, i can't seem to find any regular expressions online to remove <h1></h1> tags (and their content). Anyone lend a hand on this and help. ...

Variable width columns in a table

I'm using an HTML table for a calendar and I want to fill the cells with various events from my database. Usually they will land on weekends but some will run for long weekend, bank holidays or even the odd week day. How can I get my tables columns to expand and shrink accordingly. I'd like to avoid the use of javascript if possible. ...

Is this MySql Query Statement correct?

Hi I would like to know whether this MySql statement will be executed correctly, "SELECT sum(price) FROM products WHERE productid IN (SELECT productid FROM shoppingcart WHERE sessionid=".$this->$sessionid.")" And if not please give me pointers as to where I am wrong. Thanks ...

how can i add a new price template to magento

hello, how can i add a new price template to the category view (template/catalog/product/list.phtml) without changing the price template that is used in (template/catalog/product/view.phtml)? both files uses the template/catalog/product/price.phtml, but i need a separate price template in template/catalog/product/list.phtml that don't s...

How can i access recent 10 values from cassandra super column

How can i access recent 10 values from cassandra. i need to get the recent values from a particular super column. I am getting the result, but which is not sorted properly. i need to sort the result with descending order(latest first based on the column name/timestamp) ...

livechat in php

please tell me how can i integrate opensource livechat application in website with following features features needed are 1. conference chat (upto 50 people in conference chat), 2. file transfer feature, 3. multiple groups of people chat simultaneously. 4. chat archive/search feature, 5. video audio chat thanks in advance ...

Why is this loop over mysql resultset slow? (1.4ms per cycle)

The $res contains around 488k rows the whole loop takes 61s! that's over 1.25ms per cycle! What is taking all that time? while($row = $res->fetch_assoc()) { $clist[$row['upload_id']][$row['dialcode_id']][$row['carrier_id']]['std'] = $row['cost_std']; $clist[$row['upload_id']][$row['dialcode_id']][$row['carrier_id']]['ecn'] = $...

is there any way to catch ROLLUP (mysql) figures as values in php?

Hi, I am using group by ID WITH ROLLUP in my mysql query. The thing is I want to store these totals in a variable in php. Is there any way to do that? Thanks. ...

php application works on windows server but doesn't work on linux server,why?

Hi, i have a php web application.This application works on windows server but doesn't work on linux server.I think this is about php.ini or file permissions.Whta can be other reasons for this situaion?What must be the basic php.ini configurations for this situation?Thanks for advance... ...

How to calculate the cointegration by PHP?

Hello, I found stats_stat_correlation() http://php.net/manual/en/function.stats-stat-correlation.php to calculate the correlation between two array. Now, I'm looking for a function to calculate the co-integration of two array, but, I didn't find nothing. Could you help me? Are there a statistics libraries? Thank you very much! ...

Convert REQUEST_URI to route (Zend Framework)

Is there a built in method in Zend Framework to convert a REQUEST_URI to its route name? I want to know if ZF dispatches my request to a route, what route is taken for that specific request. For example, this is my routes.ini: routes.about.route = ":lang/about-my-company" routes.about.defaults.controller = index routes.about.defaults....

I'm stuck in a basic Mongodb php tutorial

I was following this tutorial : http://pronewb.com/mongodb-as-in-humongous-not-retarded. All was well until the "I feel the vibe" section. I do not know where to begin this section. Do i have to create a new php file or type it in some command line? ...

Messaging problems

I am creating a messaging system but the problem I face is that when users try and enter certain characters like ' into the message, the database doesnt want to allow it. Any idea what this is? ...

Anchoring the Action URL of a Form

Hello, I am using a function that leads users to a file called "comments2.php": <form action="http://www...com/.../comments/comments2.php" method="post"> On comments2.php, data passed over from the form is inserted into MySQL: $query = sprintf("INSERT INTO comment VALUES (NULL, %d, %d, '%s', NULL)", $uid, $subid, $comment); mysql_...

Alternatives to LIMIT and OFFSET for paging in Oracle

Hello, I'm developing a web application and need to page ordered results. I normaly use LIMIT/OFFSET for this purpose. Which is the best way to page ordered results in Oracle? I've seen some samples using rownum and subqueries. Is that the way? Could you give me a sample for translating this SQL to Oracle: SELECT fieldA,fieldB FROM t...

Convert RSS pubDate to a timestamp

Hello ! How to convert a date string Mon, 24 May 2010 17:54:00 GMT from RSS feed to a timestamp in PHP ? ...

what's wrong with this code?

$child= array(); $i = 0; while($row = mysql_fetch_array($result, MYSQL_ASSOC)) { $child[i] = $row['userId']; $i++; } $i = 0; while($i<=5) { echo $child[i]; $i++; } It is printing same value. ...