What would be the easiest way to generate nextval for some particular sequence with given name? The annotation solution with specifying doesn’t satisfy me, as long as there is some more complex logic involved: in some cases I need to retrieve nextval, in other – I would go with the value retrieved…
Tag: php
PHP commenting standards
I need to comment massive amounts of information in only a handful of files, and when I look around Google and here at Stack Overflow, I continue to find results matching coding standards, when I need commenting standards. My coding matches most coding standards, except when it comes to commenting. What would…
Sanitize $_SERVER[‘HTTP_USER_AGENT’] & $_SERVER[‘HTTP_REFERER’] before saving to DB?
I have a feedback form which will take a couple of user inputted fields along with a few fields generated by PHP functions like ‘user-agent’ and ‘referer.’ My question is should these strings be sanitized before being inputted? I realize one could easily alter the user-agent and the re…
How can I change PHP constants? [closed]
Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 2 years ago. Improve this question I am working on making my own custom CMS in PHP by hand and I have a few c…
ZendFramework – How to add ->HeadScript() from Controllers?
I have a case where i need to add the Javascript from controller to the Layout where it has already HeadScript(); How to do that from controller? e.g: $this->view->HeadScript()->appendScript(); This is controller: Both does not apply. This is the view file: index.phtml If i uncomment in view it works…
Headers downloading actual page content, not the csv file I’ve constructed
My goal here is to have the browser download a csv file using headers to do it. For some reason yet to be determined, the browser seems to be downloading the HTML content of the current page (and not the contents of the array I’ve given it). Here is the code I’ve been using: I’ve followed th…
Fatal error: Call to undefined function getsqlvaluestring()
Hey guys I get this error when I try to login with a default Dreamweaver Login Module, please help me – this is a though one, I’m just an html designer trying to make a simple login script for a small site I’m working one. It’s be great if you can help Sorry guys, the error is Fatal er…
PHP is_int is not performing as expected
I have a page (index.php) that takes a GET variable from the URL and checks it for security purposes. This GET variable should only be an integer. I am using the following code to check this, but in all instances, integer or not, I get the index.php page. The header never appears. After this code, the rest of…
Command-line script PHP does not run
I am trying to build a PHP script to process data manually to later convert it to a cronjob. This script also gets data from MySQL and a third-party SOAP interface. When I try to run it from the command line I have an error and the script does not run. It shows: Here’s what I have in my script:
php isset shorthand else return array not working
I have this php code line Is something wrong with the isset shorthand because when I print_r($data[‘viewData’][‘filter’] with else being active, returns nothing/null/empty. What could be wrong? Edit, to add more info: Code inside the controller: Code inside view: And I get nothing when…