Created
April 1, 2013 19:21
-
-
Save Raydor/5287044 to your computer and use it in GitHub Desktop.
Traducción vía PHP de la tabla item_template, al ejecutar este PHP, crea una query SQL del cual saca los datos de nombre y entry de locales_item y los adapta a item_template, con lo cual, podrás copiar y pegar la query resultante para traducir toda la item_template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$host = "localhost"; // Host de Mysql | |
$user = "root"; // User de Mysql | |
$pass = "password"; // Pass de Mysql | |
$db = "world"; // Base de datos | |
$locale="locales_item"; | |
$tabla="item_template"; | |
$conn = mysql_connect ($host,$user,$pass) or die ("Error".mysql_error()); | |
mysql_select_db ($db,$conn) or die ("Error".mysql_error()); | |
mysql_query("SET NAMES UTF8"); | |
$result1 = mysql_query("SELECT entry, name_loc6 FROM $locale WHERE name_loc6 <> '' ORDER BY entry;"); | |
while ($row = mysql_fetch_array($result1)){ | |
echo 'UPDATE '.$tabla.' SET name="'.$row["name_loc6"].'" WHERE entry="'.$row["entry"].'";<br>'; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment