Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by Kozusnik

  1. Kozusnik

    Filling in missing hours from array

    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...
  2. Kozusnik

    nested sub items in drop down from mysql

    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...
  3. Kozusnik

    nested sub items in drop down from mysql

    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
  4. Kozusnik

    Sorting with PHP

    How 'bout this... echo "<td>" . $results[$key]["sn"][0] . "</td>"; echo "<td>" . $results[$key]["givenname"][0] . "</td>"; echo "<td>" . $results[$key]["telephonenumber"][0] . "</td>"; echo "<td>" . $results[$key]["mobile"][0]. "</td>";
  5. Kozusnik

    Zip code radius search

    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 =...
  6. Kozusnik

    Suse Linux to Red Hat Migration

    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.
  7. Kozusnik

    Suse Linux to Red Hat Migration

    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...
  8. Kozusnik

    Suse Linux to Red Hat Migration

    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...
  9. Kozusnik

    Implications

    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...
  10. Kozusnik

    Implications

    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...
  11. Kozusnik

    Sorting with PHP

    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...
  12. Kozusnik

    Top command - cpu usage

    While in top, press 1 to see individual CPU core utilization.
  13. Kozusnik

    help with limit and sum

    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
  14. Kozusnik

    MySQL database connection issue

    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...
  15. Kozusnik

    Need Help with mysql query

    My apologies. I was thinking COUNT(*). Of course SUM(*) won't work. Thanks. :)

Part and Inventory Search

Back
Top