Skip to content

Tag: php

CakePHP3: How to run custom SQL query in table model

In CakePHP 3, is it possible to run a custom SQL query from within a table model? If so, how? I tried the following from within a table model: (The query is deliberately simple for example purposes.) But then, when I loop through the $rows, this results in an infinite loop. I’m surprised CakePHP 3 does …

Laravel: Error InvalidArgumentException

I’ upload the project from localhost to my dedicated server and after so many problems, finally some pages works domain.com | domain.com/home | domain.com/allsites etc.. But now, the routes “domain.com/site/create” “domain.com/site/ID/manage”, “domain.com/site/ID/edit&#8221…

how can i make PHP to display pictures

I need help to display all my pictures in my folder in a row, not over each other. Answer You should use css classes and styles. Then include your stylesheet in html head and finally style your images in that stylesheet.css All of this is the most basic html and css stuff. Please consider reading some tutoria…

PHP end a financial year in june of every year

I would like to do something of this sort in php, when the month reaches June 2016, I would like to echo 2016-17, but before that i echo 2015-16 What I have so far echos 2015-16 meaning it changes with the beginning of the year, but i would rather it does that in june onwards, Any suggestions Answer Very basi…