Hi all,
I'm working on some legacy code/database, and need to add a field to the database which will record a sequence number related to that (foreign) id.
Example table data (current):
ID ACCOUNT some_other_stuff
1 1 ...
2 1 ...
3 1 ...
4 2 ...
5 2 ......
Got a weird bug best shown by this page http://www.zoecormier.com/freelance/
Scroll down to the article named 'Testing turnitin' and you will see the article date is not showing. The article above it (named 'Stolen words') is showing the date. These two articles have the same date, but only one is displaying it.
Code for the article li...
Can anyone suggest a CMS able to offer the following features:
Free/open source
Support for multiple languages (both frontend and backend)
Support for translating content (i.e. an article can have 1+ translations)
Support for different content types, namely pages, articles (timestamped, with comments) and image (galleries).
Support for...
Hi All
i am trying to Use this
function GetXmlHttpObject()
{
if (window.XMLHttpRequest)
{
// code for IE7+, Firefox, Chrome, Opera, Safari
return new XMLHttpRequest();
}
if (window.ActiveXObject)
{
// code for IE6, IE5
return new ActiveXObject("Microsoft.XMLHTTP");
}
return null;
}
function CallSomePHP()
{
xmlhttp=...
Hi
Is it normal to get the error "Default value for parameters with a class type hint can only be NULL" for a method in an interface defined as
public function nullify(bool $force=FALSE);
?
I need it to be bool, not an object, and FALSE by default.
...
Hi,
I am trying to split the text into words:
$delimiterList = array(" ", ".", "-", ",", ";", "_", ":",
"!", "?", "/", "(", ")", "[", "]", "{", "}", "<", ">", "\r", "\n",
'"');
$words = mb_split($delimiterList, $string);
which works quite fine with strings but I am stuck in some cases where I have to do with numb...
I'm building a site that requires paypal integration. The way it works is I have buyers and sellers, the buyer requests the item, and pays for the item, but the seller needs to accept the money first.
So the money is held in limbo until the seller accepts it. Once accepted the money isn't transferred until the item has been received.
C...
I am creating an 'award' system for my website to encourage a community fealing, much in the same way that stack overflow uses badges.
The site is built in CakePHP, i have created an Award model, controller etc - currently the methods for calculating whether a user has an award are contained within the Award controller.
However, i can'...
When I output $_SERVER['REQUEST_URI']; on:
http://localhost/tools/?tool=cs&sub=1
I get:
/tools/?tool=cs⊂=1
Is there other solution to get /tools/?tool=cs&sub=1 besides using & instead of & ?
...
I Would like to know if there is anyway I can check if a form has been modified.
eg. If one of the inputs has been changed I would like to display a button to submit the changes.
...
Hello, I need to write a script to export contact data for printing on stickers for mailing. There could be up to 20 000 records in the database table.
The main problem is that the number of records could be so high and the site is hosted on a shared server and exporting the whole 20k records would, presumably, kill the script or stall....
Update: Finally got this thing working but still not sure what the problem was. I am using a wamp server that I access through a networked folder.
The problem that still exists is that to execute the mysqldump I have to access the php file from the actual machine that is being used to host the WAMP server.
End of update
I am running a...
I have a Zend_Form
$form = new My_Form();
$uploadedData = $form->getValues();
Zend_Debug::dump($uploadedData, $form->name,true)
and when i dump the form values i get a string array
array(11) {
["event"] => string(2) "26"
["firstname"] => string(3) "sdf"
["surname"] => string(0) ""
["gender"] => string(1) "M"
["company"] => ...
How is this function numtoalpha to print out the alphabetic equivalents of values that will be greater than 9 used?
Results, something like this: 10 for A, 11 for B, etc....
PHP.net does not even have that function or i did not look in the correct place, but I am sure it said functions.
<?php
$number = $_REQUEST["number"];
/*Create a ...
Hello,
I have a webapplication where I read images from a sql 2008 database through the 'new' filestream functionality.
The thing here is, when you right-click and choose save image, IE gives error 800700de while with Firefox it works fine.
The img src is set to a php document which takes a few params to know where to look in the datab...
Hi Friends,
I am stuck with a problem. I am working on a backoffice project which needs to access the live database of our website which is very big and complicated. Now when i connect my backoffice with live Mysql database and run my queries, some slow queries are also there which in turn locks the database for that time period and the...
I've made an API controller with some actions to spit out JSON for my app and I've turned off the layout and view renderer in its init() method so I've got no view scripts for this controller.
I'm trying to use my apiController::treeAction elsewhere in the app via an actionHelper to output some JSON inline. I can access the action direc...
Hi,
I'm working on a news site. Like every news site there will be news, columns, videos and photo galleries. I'm planning to keep these different types of records in different tables but relate them with tags. Here is a simple schema:
Tables: News, Videos, Galleries, Columns, Tags, Post_to_tags
Post_to_tags:
- tagid
- postid
- posttyp...
This should work, so I'm really perplexed about why it's not working.
I'm checking to see if a user is logged in using a $session class method at the top of each admin page. However, I want to dynamically adjust the header file depending on whether a user is logged in, and on what role level that user has.
So I check $session->is_logge...
Hi there,
I am about to build an SQL database and i need to get it right instead of making mistakes and fixing them down the line which is why i am here...
I will have main categories and sub categories to them, i need to know weather it'd be best to store the sub categories in the same tables as the main but just offset them for exam...