-
Posts
15,274 -
Joined
-
Last visited
-
Days Won
432
Everything posted by requinix
-
Alter the column so that it uses a numeric data type instead of a string data type.
-
Are you familiar with objects? Seen the -> operator?
-
object(ATWS\AutotaskObjects\QueryResponse)[9] public 'queryResult' => object(ATWS\AutotaskObjects\ATWSResponse)[10] public 'EntityReturnInfoResults' => object(ATWS\AutotaskObjects\ArrayOfEntityReturnInfo)[1028] public 'EntityReturnInfo' => array (size=500) ... 1. Whatever you dumped was a QueryResponse object. 2. It has a property named "queryResult" which is a ATWSResponse. 3. It has a property named "EntityReturnInfoResults" which is an ArrayOfEntityReturnInfo object. 4. It has a property named "EntityReturnInfo" which is an array of something.
-
Not sure what you're missing yet but I can tell you what we're missing: code.
-
slider.php: SELECT * FROM haberlerekle ORDER BY haberekle_id DESC LIMIT 12 mansethaberler.php: SELECT * FROM haberlerekle ORDER BY haberekle_id
-
Laravel Error : Trying to get property 'data' of non-object
requinix replied to a topic in Frameworks
$result = json_decode($response); $students = $result->data; Whatever $response was, it was not valid JSON. Find out what it was. -
I don't think you understand me. You can write the Javascript, yes? I sure hope so because that's a rather important aspect to the problem you're describing. I'm not saying you don't write Javascript. I'm saying you don't write Javascript that tries to manipulate the element's style. I'm saying you do write Javascript that adds/removes CSS classes from some appropriate ancestor element, then handle the appearance changes with a CSS rule.
-
I don't yet understand what you want mansethaberler.php to do. You need to describe what the page is supposed show. I know that slider.php has a link and that you are clicking the link to go to mansethaberler.php, but I don't know what you want that page to do.
-
Do you want mansethaberler.php to show only one headline? According to the link you clicked? Or to show all of them but show the one from the link first (and the user can see others)?
-
What problem are you having trying to do that? Isn't that the same thing that slider.php is already doing? Just copy that.
-
Evidently can't create a view with a subquery in MySQL 5.6...
requinix replied to Jim R's topic in MySQL Help
Actually you can create a view with a subquery. But you shouldn't for this. Relying on GROUP BY as a way to choose distinct rows is a MySQL quirk. So you're storing coach information alongside the school? What happens when the coach changes? Do you duplicate all the other school information into a new row? Why aren't you storing school information in one place and school coaches in another? -
Need Help with showing all postcodes from a DB into Google Maps
requinix replied to snowymasta's topic in PHP Coding Help
If you're outputting multiple addPostCode()s then that part is right. Next place to look would be inside that function... -
Manipulating appearance like this is a pain. You know what's easier? Applying a class to an appropriate container ancestor and using CSS rules.
-
Need Help with showing all postcodes from a DB into Google Maps
requinix replied to snowymasta's topic in PHP Coding Help
You put the $mig_postcode in the loop. You didn't put the addPostCode in the loop too. -
Persisting an object over multiple requests
requinix replied to NotionCommotion's topic in PHP Coding Help
Methods are code so there's nothing to persist there. Data can be serialized. Do try to serialize the data and not the object though - more portable and less dependent on your PHP. Depends on the nature of the process. I don't have the answers to this one. All sorts of concerns, yeah. Such as the fact that you only have the one cookie so that means you get only the one key. The key should be enough information to uniquely identify the data. Same key means the same data, though the same data could hypothetically exist under multiple keys. If you wanted to cache the result of finding the 100th Fibonacci number then "fibonacci_100" would be a good cache key. If you have to. Polling as a whole sucks. If it takes code to make the object available then that same code should be able to (somehow) notify a client. If there's no way to notify a client then give them expected/retry time periods (eg, "not available yet, try again at X time") based on some reasonably intelligent estimates. -
That's not very good table design, but whatever. You're running a second query to get totals, right? Have the query return a count of rows too. (So AL has 10 rows, AR has 5, and so on.) Before your loop, start a counter at 0. Increment the counter every time you print a row. When that counter reaches the number of rows the state has, print out a separate <tr> row with the information you want. Then reset the counter to 0 for the next state's rows.
-
Then put it echo "<tr><td>" . $row['cmlstate']."</td>"; inside the table cell. Stick the <br> and $row[whatever] values in there.
-
Repeating your question for the fourth time does not answer mine. Do you want to put the total inside the table cell?
-
You don't want to put it inside the table cell?
-
A line break is a <br>.
-
Failure to chown() is just a warning so it won't stop the script. However that does mean (a) the warning is not being recorded in a log somewhere, or (b) it is and you haven't looked there yet... Additionally, if the script chmod()s then it may not be taking into account the umask, which typically only strips write permissions from the Group and Other masks but could be set to something stricter for you. If Apache can't read the file then it must be owned by a different user and/or group, and there aren't read permissions. (Or it could be a missing exec bit on the directory, but if Apache can read other files in it then that's not the issue.) So go into the terminal and verify for yourself exactly what user and group owns the files and what the permissions are. You should also confirm exactly what users and groups Apache and PHP are running as.
-
Persisting an object over multiple requests
requinix replied to NotionCommotion's topic in PHP Coding Help
You're reinventing caching. Set yourself up a redis or memcached server and store stuff in there. -
First step to understanding why something doesn't behave as it should is to know how it's supposed to behave. Why is that correct? Are you implying a delivery time of 1 day? Thus today (Tuesday the 18th) + 2 days of a delay before sending + 1 day of delivery = 3 days from now (Friday the 21st)? What is $off? Is $standard_days the number of business days for delivery? $saturday is apparently whether final delivery can happen on a Saturday but does that also allow mean Saturdays count towards delivery progress? Is $delay in fact some sort of pre-shipment time or does it mean something else? In other words, how is this function being used?
-
0775 means your file is an executable. Is it an executable? 0644 should be fine. PHP can't change ownership of a file unless PHP is running as root. It isn't, right? Have you seen yourself that the file is owned by http:http, or is that just what the code tries to do?