Hello!
This is my first time I am trying to make something seriously with relational db in MySQL and some kind of CMS created in PHP with CodeIgniter.
I came to the part where I have to insert some data in few many-to-many related tables.
In my code everything works fine (well, with just few minutes of testing), but I need some help with...
So I am creating a form builder. Users will login and then fillout the forms that Admins have created. I am using saveAll() in my "data_controller" "add" method.
This works fine and and looks like this:
//debug($this->data); prints the following
//app/controllers/data_controller.php (line 21)
Array
(
[Datum] => Array
(
...
It appears that the ActiveMQ FuseSource Stomp PHP client can't handle messages larger than 1024 bytes. The code is as follows in Stomp.php:
$rb = 1024;
$data = '';
$end = false;
do {
$read = fread($this->_socket, $rb);
if ($read === false) {
$this->_reconnect();
return $this->readFrame();...
Hi All, what we can do to remove page=2&
From:
"page=2¶m1=value1¶m2=value2" or
"param1=value1&page=2¶m2=value2".
become:
"param1=value1¶m2=value2" or
"param1=value1¶m2=value2".
in case of page=2, 2 is any natural no. i.e. (0 to 32000).
Regards,
...
Please help me. I am quite new to kohana. How best to do so the controller was chosen based on the subdomain. For example:
www.site.com -> Controller: siteroot. Method: run
admin.site.com -> Controller: adminsite. Method: run
moderator.site.com -> Controller: moderatorsite. Method: run
director.site.com -> Controller: directorsite. Meth...
I have a products table with a column that contains a space separated list of ids (like: "23 42 365"), the column is called "categories". The numbers refer to rows ids in another table (categories).
I need to extract all product rows where all of the ids in the space separated list point to rows on the categories table that no longer ex...
Hi together,
I have switched to Ruby on Rails and my current problem is to reroute
the old contents like XXX/dummy.html or XXX/dummy.php in RoR.
What exactly is the best solution for
isolated content (XXX/onlyinstance.html)
content which has a internal structure like XXX/dummy1.html, XXX/dummy2.html
http://guides.rubyonrails.org/...
I am on LAMP with Alternative PHP Cache (APC). It worked fine until yesterday when I updated the website and changed a few MySQL queries (I don't see how it would affect the APC opcode cache.)
Today I see that the load has increased on the server and I see in Alternative PHP Cache, that the uptime of APC is somewhere around 15 minutes a...
Hi ,
I need to add in a $person into the area were you add a value into addChild ,So it add's the value fo $person it into my xml file
$person->addChild('first_name', $person);
I know this is wrong but could some one explain why ?
Thanks
...
Is there something wrong with using the following:
$test .= '$row[\''.$row[0].'\'].';
//When echo'ed shows
echo $test;
//$row['CustomerID'].$row['CompanyName']
//I have used it like this
eval($test)
PHP complains:
Parse error: parse error in C:\w.php(73) : eval()'d code on line 1
I can't see where the parse error is. Please help.
...
From my related question here at SO I've come up with the following PHP snippet:
$url = parse_url($url);
if (is_array($url))
{
$depth = 2;
$length = 50;
if (array_key_exists('host', $url))
{
$result = preg_replace('~^www[.]~i', '', $url['host']);
if (array_key_exists('path', $url))
{
...
I've set up PHPMyAdmin on a Mac, and it's complaining that it can't load the 'mcrypt' function(s). Apparently the stock install of PHP on Macs doesn't have it.
Can anyone tell me what the implications are? Neither the PHPMyAdmin documentation or the PHP documentation seems to tell me what kind of problem, if any, this will cause me.
Th...
Hi Guys ive tried to search for this answer all morning, but with no luck,
all i want to do is match [slideshow or [gallery with the included [ bracket..
code as follows.
$gallery = get_post_meta($post->ID, 'gallery', true);
if (preg_match("|^/[slideshow", $gallery)) {
echo "Slideshow was forund";
} else if (preg_match("|^/[ngga...
Hi ,
I know that too add a text value into the xml page I do the following
$person = $sxe->addChild("person");
$person->addChild('first_name');
If I want to use the value of $person how could I code it ?
...
This question is similar to this one but (literally) takes it to another level, or levels.
Background: I am using the Kohana PHP framework and, specifically, the ORM library.
Basically, when you loop through DB results with it, you can access the field values as properties of an object. Any joined tables can be accessed in a hierarchic...
Hi guys, im here with a nasty question.
Drupal handle comments giving the user the choice to display thems just in 4 ways: Flat list - collapsed, Flat list - expanded, Threaded list - collapsed, and Threaded list - expanded.
Im using the last one, whom provide a markup like:
<div class="comment">
<!-- comment's content -->
</div>
...
I've seen a lot of articles about integrating ZF and Doctrine. There is also a proposal for ZF here but they have always two possible structures. Either they put all models into one top level model directory or they put it into a module related model directory.
application
|-- Bootstrap.php
|-- configs
|-- controllers
|-- models ...
i want to set session time out limit by 3 min ,
i have used this in the page
ini_set("session.gc_maxlifetime", "50"); not working
...
Which one of this frameworks would you recommend to someone who knows the basics of PHP?
What are the advantages and disadvantages?
...
I have written a script that gets paypals current rates compared with the dollar every hour (the currency my products are in by default).
The user can set their currency in their settings and that is store in the user table.
My initial idea was to store all the currencies rates in the database and then when the user logs in store the c...