I'm trying to run a MySQL query as a search on a site and it is just taking a long time.
I ran it directly from phpMyAdmin and it took around 20 seconds to complete.
Here is the query I am running:
SELECT * , bb_business.id AS bid
FROM bb_business
LEFT OUTER JOIN bb_offers ON bb_business.id = bb_offers.store_id
LEFT OUTER JOIN bb_cat...
Hi,
I am currently using a JSON encoded array to display the users in my database for an auto-suggest feature.
It looks something like this:
$sth = mysql_query("SELECT id, name FROM users");
$json = array();
while($row = mysql_fetch_assoc($sth)) {
$json['name'] = $row['name'];
$json['id'] = $row['id'];
$...
I want to have a view displayed as a menu either in primarylinks or secondarylinks.
I searched and looked up all modules with no luck.
should I build this functionality manually ==> build a module?
thanks in advance
...
I have a group of radio buttons in a form, I need to pass the values of the selected radion buttons to a php script. So I need to build a json object to post.
I tried with this code, but I'm not sure. Please could anyone help me.
result = [];
for (i=0; i<document.getElementsByTagName('input').length; i++) {
if (document.getElements...
Hi,
Starting with an array with 10K values. I want to randomly get 1000 values from it and put them into another array.
Right now, I am using a for loop to get the values, but I want to pick 1000 values and not have to loop 1000 times. The array_slice function works, but it doesn't give random values. What is the correct (most effi...
Hello everyone,
I am creating a from using the Zend Framework version 1.10.7. But I am getting an annoying notice of which I want to get Rid. The notice means that somewehere i have a problem with an array. I just can't find out where it is.
Any Help, idea's?
Notice: Array to string conversion in /var/www/Zend/ZendFramework-1.10.7...
Hey
I want to create a custom page that has tournament brackets instead of the usual content. I have read some of the Wordpress documentation and found how plugins work and how I add admin pages to administer the page.
My question is: What is needed to create the page itself (and have it listed on the site)? Do I need to create a custo...
Dear all,
I have trouble again with preg_replace again. I terrible need a book for preg_replace
my intention is to replace <td> author </td> with <td> Level1 </td>
Any ideas? the <td> author </td> is wrapped with other HTML element
<td align="center">
<a onclick="return listItemTask('cb1','block')" href="javascript:void(0);">
...
So I've got this:
date('c')
which formats it like so:
2010-08-17T08:55:14-07:00
but I need a way to not have the colon in the offset, so maybe it would look like this:
2010-08-17T08:55:14-0700
What solution is there for this? I'm hoping for a slightly different format, rather than getting the string and replacing the last colon (us...
I have two MySQL-Tables (oversimplified):
articles
- id
- description
article_attributes
- article_id
- attribute_name
- attribute_value
So, every article can have an unlimited amount of attributes.
For the articles i have a Kohana_ORM Model
<?php class Model_Article extends ORM {} ?>
When loading the Model I would like to have ac...
I'm trying to consume a soap feed using the PHP SoapClient and convert it to an array. It works great until I run into an object that is a complexType.
Then it returns...
[0] => stdClass Object
...instead of showing the multiple elements that are displayed when I access the SOAP feed otherwise.
I'm very new to SOAP, so any help is ap...
If someone posts a multi-line post that contained text and links, I want to be able to find and wrap the links with <p> tags, but I can only do it with one link at a time (source code comes from phpBB2 - clickable links function), which causes every link to be like this:
<p>http://www.bbc.co.uk/</p>
<p>http://www.bbc.co.uk/</p&...
Hello,
we developed an internet application for company purposes a while back (company and friends, to be precise :]) and now we're trying transfer PHP session to loaded Flash, so flash can identify itself as being loaded with user profile (stored in MySQL, accessed only by PHP so far) when communicating with server (either FMS or Wowza...
I have an array which looks like this
$dataArray = array (
0 =>
array (
'UserId' => '804023',
'ProjectCode' => 'RA1234',
'Role' => 'PI',
),
1 =>
array (
'UserId' => '804023',
'ProjectCode' => 'RA1234',
'Role' => 'PM',
),
2 =>
array (
'UserId' => '804023',
'ProjectCode' => 'A90123',
...
I have this array.
$urls = array(
'0'=>'http://www.domain.com/media1.mp3'
'1'=>'http://www.domain.com/media2.mp3'
'2'=>'http://www.domain.com/media3.mp3'
)
I wan to download these files simultaneously with the help of PHP.
How do I do that? Any suggestions?
I have tried putting headers in for loop but what it does is it combines the...
I'm getting an "Illegal offset type" for this array:
public static $CATS_AND_TYPES = array(
// Statement Administration
array( self::CAT_STATEMENT_ADMIN => "Document Administration" ) => array(
self::TYPE_STATEMENTS_LOADED => "Documents Loaded",
self::TYPE_STATEMENTS_REMOVED => "Documents Removed...
Valid characters include the alphabet (abcd..), numbers (0123456789), spaces, ' and ".
I need to strip any other characters than these from a string in PHP.
Thanks :)
...
Hi,
I'm a bit stuck trying to get my code to output correctly, see below. It all works ok, but rather than displaying all news items, it only shows one for each month. What I need to do is group all news for a selected month with the month/year heading for that month. Hope this makes sense.
Any help greatly appreciated.
SS
$theQuery="...
Hello, I'm new around so if I'm missing some info or something, please let me know and I'll provide it. I've already looked for informationg regarding this error, but I haven't found anything relevant yet.
So, here's the deal.. Some of my controllers actions are being called twice, and I've just noticed that when I was wondering why was ...
My company email does not have much space so I want to forward attachments to a Gmail address. Is that possible?
...