When I have a finite set of data for an array, I'll initialize the array and create it beforehand.
$newarray = array();
for($i=0;$i<=23;$i++){
$newarray[$i] = 0;
}
Then just fill in the blanks as needed with the loop from the query.
loop start
$newarray[$hour] = $hits;
loop end...
Nevermind. It's early here. I see what you did.
It's still a one-to-many if you have the same parent_id more than once. You end up with (let's say) the same t1.id, but the t2.id's for those records are different.
Since you're using PHP, maybe it would be best for you to loop through the...
Is there a sequence number in the links table? If not, you'll end up with a one-to-many ratio on each of your joins.
If there is a sequence number, just add 'AND t1.seq=1' to the JOIN. Of course, each JOIN will have a tx.seq=x filter.
Mark
Yes, google has an API you can use. I believe it's free as long as you don't query it over 15k times per day.
Download the google API and apply for a key.
Here's some code to get you started.
$map = new GoogleMapAPI('map');
$map->setAPIKey('their_key');
$startll =...
Pretty much. Use the MySQL tools for the databases and tar the rest of the files.
As for SAMBA, I'd install it on RH and do a side-by-side compare of the configs. As IRudebwoy said, the locations might be different and they could be different versions with different options.
BTW, you can't just tar up the mysql tables, they will not work on the new server.
Mysqldump allows you to backup the databases during uptime and restore them to the new server during uptime.
Mysqlhotcopy will also allow uptime backups, but you'll have to shut down the mysql server on the new...
For that type of conversion, I'd...
1. configure the new server similar to the old
2. do a mysqldump of all databases
3. import the databases to the new server
4. tarball your code and copy it to the new server
5. untar it and test...test...test
Once the new server reacts as the old server...
85%??? Sounds like you need a security overhaul. Quickly. The iSeries is probably the most secure server platform in the world if configured properly. You should have someone (who knows what they're doing) review the security on that system and make the necessary changes to secure it very soon...
If the job is submitted by an application (or user), the profile submitting the job should have the authority. If your security is configured properly, very few users should have *ALLOBJ or *SECADM (only system admins). The user running the job should have security to only the objects needed...
While jpadie's suggestion is the best alternative, you could also change the for loop to foreach, concatenate the sn and givenname fields and use that as the key, then just do an asort of the array when you're done. You can loop through the sorted array and output the data afterward.
If your...
Make it a subselect.
SELECT date, sum(category) from (
SELECT
date,category
FROM table
WHERE clause1 = '1'
AND date = 'feb'
LIMIT 10,1000000
) as x
GROUP BY date
ORDER BY date DESC
Sounds like it might be the bind-address = 127.0.0.1 in the my.cnf file may need commented out (it's not commented out on a new install so only connections from localhost are allowed). Comment out bind-address, restart mysql, make sure that the web connection user exists and has rights from that...
Add "events" to your select and group by statements. Personally, I would have used something like this...
SELECT * from (
SELECT devices, events, SUM(*) AS Total
FROM devices
GROUP BY devices, events) as x
ORDER BY Total DESC
Now you can see all failing devices in descending order.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.