Home arrow Forum synch problem after doing 76 of 500+
  Welcome, Guest. Please login or register.
Did you miss your activation email?
December 05, 2008, 12:23:23 PM
Home New Posts Search Calendar


Login with username, password and session length
+  Joomla Forum
|-+  Joomla Hacks
| |-+  Joomla-SMF Forum Support
| | |-+  Mambo-SMF 1.3.x
| | | |-+  synch problem after doing 76 of 500+
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: 1 [2] Go Down Print
Author Topic: synch problem after doing 76 of 500+  (Read 4658 times)
paulyiend
Joomla Newbie
*

Karma: +0/-0
Offline Offline

Posts: 4


View Profile
Re: synch problem after doing 76 of 500+
« Reply #15 on: October 31, 2005, 10:26:22 AM »

Hello Cowboy,

Well I've identified the problem records, will now try to remove these and start the sychron. process from scratch. But as promised here's the php code to incorporate your search into a page of results accessible from your browser.

Might be missing the point of the search (so far as the next step involves accessing the database to remedy the situation.) but this is my first php code so I've learnt from the process anyway. Hope it is of use to mambo/ joomla/ smf users out there, please feel free to amend and change the script as you like.

<?
$username="USERNAME HERE";
$password="PASSWORD HERE";
$database="DATABASE NAME HERE";

/* This sets up the connection to your database via the details supplied above */
mysql_connect(localhost,$username,$password);
@mysql_select_db($database) or die( "Unable to select database");
/*Start of query supplied by Cowboy */
$query="SELECT jos1.id, jos1.username, jos1.email, smf.ID_MEMBER, smf.memberName, smf.emailAddress
FROM smf_members smf, mos_users jos1
LEFT JOIN mos_users jos ON smf.memberName = jos.username
WHERE jos.username IS NULL
AND jos1.email = smf.emailAddress";
/*Create a variable called $result that totals up the number or rows or records retrieved from the query */
$result=mysql_query($query);

$num=mysql_numrows($result);
/*close the database connection, its not good practice to keep too many connections open */
mysql_close();
?>
<!-- We will output the results of the mysql query in a table -->
<table border="0" cellspacing="2" cellpadding="2" bgcolor="#FFFFFF">
<tr bgcolor="#9CB2CE">
<th><font face="Verdana, Arial, Helvetica, sans-serif">Mambo ID</font></th>
<th><font face="Verdana, Arial, Helvetica, sans-serif">Mambo Username</font></th>
<th><font face="Verdana, Arial, Helvetica, sans-serif">Mambo Email</font></th>
<th><font face="Verdana, Arial, Helvetica, sans-serif">SMF ID MEMBER</font></th>
<th><font face="Verdana, Arial, Helvetica, sans-serif">SMF Member Name</font></th>
<th><font face="Verdana, Arial, Helvetica, sans-serif">SMF Email Address</font></th>
</tr>

<?
$i=0;
while ($i < $num) {
$mambId=mysql_result($result,$i,"jos1.id");
$mambUser=mysql_result($result,$i,"jos1.username");
$mambEmail=mysql_result($result,$i,"jos1.email");
$smfId=mysql_result($result,$i,"smf.ID_MEMBER");
$smfMember=mysql_result($result,$i,"smf.memberName");
$smfEmail=mysql_result($result,$i,"smf.emailAddress");
?>
<tr bgcolor="#EBEBEB">
<td><font face="Verdana, Arial, Helvetica, sans-serif"><? echo $mambId; ?></font></td>
<td><font face="Verdana, Arial, Helvetica, sans-serif"><? echo $mambUser; ?></font></td>
<td><font face="Verdana, Arial, Helvetica, sans-serif"><? echo $mambEmail; ?></font></td>
<td><font face="Verdana, Arial, Helvetica, sans-serif"><? echo $smfId; ?></font></td>
<td><font face="Verdana, Arial, Helvetica, sans-serif"><? echo $smfMember; ?></font></td>
<td><font face="Verdana, Arial, Helvetica, sans-serif"><? echo $smfEmail; ?></font></td>
</tr>
<?
$i++;
}


echo "</table>";
?>
Logged
Pages: 1 [2] Go Up Print 
« previous next »
Jump to:  



Login with username, password and session length

Powered by MySQL Powered by PHP Joomla Forum | Powered by SMF 1.1 RC1.
© 2001-2005, Lewis Media. All Rights Reserved.
Joomla Bridge by JoomlaHacks.com
Valid XHTML 1.0! Valid CSS!

Joomla Hacks is a Joomla Components, Joomla Modules, Joomla Templates, & Joomla Mambots resource portal. None of the text or images in this public website may be copied without the expressed written consent of the authors. Copyright 2005 by JoomlaHacks.com. Powered by Joomla. All rights reserved.
Terms of Use
Joomla Hacks



Joomla Hacks
German Lang French Lang Italian Lang Spanish Lang Japanese Lang Chinese Lang
Search Contact About Advertise Blogs Topsites Submit News Register Login