Membre entre membre, Besoin d'aide!

dclick07 Messages postés 43 Date d'inscription mercredi 22 novembre 2006 Statut Membre Dernière intervention 26 février 2008 - 21 janv. 2008 à 19:16
codefalse Messages postés 1123 Date d'inscription mardi 8 janvier 2002 Statut Modérateur Dernière intervention 21 avril 2009 - 2 févr. 2008 à 18:04
Bonjour, je suis a la recherche d'un script pour ajouter a mon site.


Il sagit d'un script pour ma section membre, je voudrais que chaque membre voie quel autre membre a visité sa fiche/profil.


Exemple: je visite le profil de m. X, donc m.X sais que j'ai visité son profil.


Merci Bcp !!!

14 réponses

codefalse Messages postés 1123 Date d'inscription mardi 8 janvier 2002 Statut Modérateur Dernière intervention 21 avril 2009 1
22 janv. 2008 à 09:24
Tu peux te faire un script, pour ce genre de script c'est pas possible, tu fait une simple table sql, qui contient l'id du visité, l'id du visiteur, le nombre de fois (si tu veux compter le nombre de fois)
et à chaque fois que quelqu'un consulte la fiche, tu regarde son id, et tu fait un insert dans ta table.

Hop c'est tout! :)
0
dclick07 Messages postés 43 Date d'inscription mercredi 22 novembre 2006 Statut Membre Dernière intervention 26 février 2008
22 janv. 2008 à 17:28
Je suis pas l'meilleur dans ce genre de chose tu pourrais éllaborer un peu plus stp !
mais ses exactement c'que j'recherche !!
merci
0
codefalse Messages postés 1123 Date d'inscription mardi 8 janvier 2002 Statut Modérateur Dernière intervention 21 avril 2009 1
22 janv. 2008 à 18:00
Tu doit avoir une table utilisateur, et une table visits

user :
    user_id
    login
    passwd
    email

visits
    user_id_visitor
    user_id_visited

dans ta page tu connais l'id du gars car il est authentifié, l'id est dans la variable $user_id.
Il veux consulter la page profil.php?user=4
donc tu sais que $_GET['user'] correspond à l'id de l'utilisateur à qui on veux consulter la fiche

tu fait donc un

insert into visits (user_id_visitor, user_id_visited) VALUES ($user_id, $_GET['user']);

et pour connaitre le nombre de fois que le visiteur à vu la page de l'user, tu fait

SELECT count (user_id_visited) FROM visits WHERE user_id_visitor=$user_id AND user_id_visited=$_GET['user'];

Bien sur je n'ai pas fait attention à la sécurité et j'ai simplifié le travail
avec ca tu devrait y arriver !
0
dclick07 Messages postés 43 Date d'inscription mercredi 22 novembre 2006 Statut Membre Dernière intervention 26 février 2008
22 janv. 2008 à 18:38
Je suis désolé mais je saisie pas très vite!

<?
$page =   "profile";
include "header.php";if ($user->user_exists 0 &amp; $setting[setting_permission_profile] 0)
{
                $page = "error";
                $smarty->assign('error_header', $profile[1]);
                $smarty->assign('error_message', $profile[40]);
                $smarty->assign('error_submit', $profile[43]);
                include "footer.php";
}
if ($owner->user_exists == 0)
{
                $page = "error";
                $smarty->assign('error_header', $profile[1]);
                $smarty->assign('error_message', $profile[2]);
                $smarty->assign('error_submit', $profile[43]);
                include "footer.php";
}
$privacy_level = $owner->user_privacy_max($user, $owner->level_info[level_profile_privacy]);
$allowed_privacy = $owner->user_info[user_privacy_profile];
$is_profile_private = 0;
if ($privacy_level < $allowed_privacy)
{
                $is_profile_private = 1;
}
if ($is_profile_private == 0)
{
                $profile_views = $owner->user_info[user_views_profile] + 1;
                $database->database_query("UPDATE se_users SET user_views_profile='$profile_views' WHERE user_id='" . $owner->user_info[user_id] . "'");
}
$owner->user_fields(0, 0, 0, 0, 1);
$comment = new se_comment('profile', 'user_id', $owner->user_info[user_id]);
$total_comments = $comment->comment_total();
$comments = $comment->comment_list(0, 10);
$friends = $owner->user_friend_list(0, 5, 0, 1, "RAND()");
$total_friends = $owner->user_friend_total(0);
$allowed_to_comment = 1;
$comment_level = $owner->user_privacy_max($user, $owner->level_info[level_profile_comments]);
$allowed_comment = $owner->user_info[user_privacy_comments];
if ($comment_level < $allowed_comment)
{
                $allowed_to_comment = 0;
}
if ($user->level_info[level_profile_style] != 0 &amp; $is_profile_private == 0)
{
                $profilestyle_info = $database->database_fetch_assoc($database->database_query("SELECT profilestyle_css FROM se_profilestyles WHERE profilestyle_user_id='" . $owner->user_info[user_id] . "' LIMIT 1"));
                $global_css = $profilestyle_info[profilestyle_css];
}
$is_friend = $user->user_friended($owner->user_info[user_id]);
$friendship_allowed = 1;
switch ($setting[setting_connection_allow])
{
                case "3":
                                break;
                case "2":
                                if ($user->user_info[user_subnet_id] != $owner->user_info[user_subnet_id])
                                {
                                                $friendship_allowed = 0;
                                }
                                break;
                case "1":
                                if ($user->user_friend_of_friend($owner->user_info[user_id]) == FALSE)
                                {
                                                $friendship_allowed = 0;
                                }
                                break;
                case "0":
                                $friendship_allowed = 0;
                                break;
}
if ($is_friend)
{
                $friendship_allowed = 1;
}
$online_users_array = online_users();
if (in_array($owner->user_info[user_username], $online_users_array))
{
                $is_online = 1;
}
else
{
                $is_online = 0;
}
$actions = $actions->actions_display();
$actions_total = count($actions);
$smarty->assign('tabs', $owner->profile_tabs);
$smarty->assign('comments', $comments);
$smarty->assign('total_comments', $total_comments);
$smarty->assign('friends', $friends);
$smarty->assign('total_friends', $total_friends);
$smarty->assign('friend_ofs', $friend_ofs);
$smarty->assign('total_friend_ofs', $total_friend_ofs);
$smarty->assign('is_friend', $is_friend);
$smarty->assign('friendship_allowed', $friendship_allowed);
$smarty->assign('is_profile_private', $is_profile_private);
$smarty->assign('is_online', $is_online);
$smarty->assign('allowed_to_comment', $allowed_to_comment);
$smarty->assign('total_views', $profile_views);
$smarty->assign('actions', $actions);
$smarty->assign('actions_total', $actions_total);
include "footer.php";
?>


sa ses que mon .php J'ai aussi un .tpl en html

{include file='header.tpl'}

{* JAVASCRIPT FOR ADDING COMMENT *}
{literal}
<script type='text/javascript'>
<!--
var comment_changed = 0;
var first_comment = 1;
var last_comment = {/literal}{$comments|@count}{literal};
var next_comment = last_comment+1;
var total_comments = {/literal}{$total_comments}{literal};

function removeText(commentBody) {
  if(comment_changed == 0) {
    commentBody.value='';
    commentBody.style.color='#000000';
    comment_changed = 1;
  }
}

function addText(commentBody) {
  if(commentBody.value == '') {
    commentBody.value = '{/literal}{$profile44}{literal}';
    commentBody.style.color = '#888888';
    comment_changed = 0;
  }
}

function checkText() {
  if(comment_changed == 0) { 
    var commentBody = document.getElementById('comment_body');
    commentBody.value=''; 
  }
  var commentSubmit = document.getElementById('comment_submit');
  commentSubmit.value = '{/literal}{$profile45}{literal}';
  commentSubmit.disabled = true;
  
}

function addComment(is_error, comment_body, comment_date) {
  if(is_error == 1) {
    var commentError = document.getElementById('comment_error');
    commentError.style.display = 'block';
    if(comment_body == '') {
      commentError.innerHTML = '{/literal}{$profile46}{literal}';
    } else {
      commentError.innerHTML = '{/literal}{$profile47}{literal}';
    }
    var commentSubmit = document.getElementById('comment_submit');
    commentSubmit.value = '{/literal}{$profile48}{literal}';
    commentSubmit.disabled = false;
  } else {
    var commentError = document.getElementById('comment_error');
    commentError.style.display = 'none';
    commentError.innerHTML = '';

    var commentBody = document.getElementById('comment_body');
    commentBody.value = '';
    addText(commentBody);

    var commentSubmit = document.getElementById('comment_submit');
    commentSubmit.value = '{/literal}{$profile48}{literal}';
    commentSubmit.disabled = false;

    var commentSecure = document.getElementById('comment_secure');
    commentSecure.value=''
    var secureImage = document.getElementById('secure_image');
    secureImage.src = secureImage.src + '?' + (new Date()).getTime();

    total_comments++;
    var totalComments = document.getElementById('total_comments');
    totalComments.innerHTML = total_comments;

    if(total_comments > 10) {
      var oldComment = document.getElementById('comment_'+first_comment);
      if(oldComment) { oldComment.style.display = 'none'; first_comment++; }
    }

    var newComment = document.createElement('div');
    var divIdName = 'comment_'+next_comment;
    newComment.setAttribute('id',divIdName);
    var newTable = "";
    {/literal}
      {if $user->user_info.user_id != 0}
        newTable += "url_create('profile',$user->user_info.user_username)}'>user_photo('./images/nophoto.gif')}' class='photo' border='0' width='{$misc->photo_size($user->user_photo('./images/nophoto.gif'),'75','75','w')}'>, <table cellpadding='0' cellspacing='0' width='100%'>----,  url_create('profile',$user->user_info.user_username)}'>{$user->user_info.user_username}  - {$datetime->cdate(\"`$setting.setting_timeformat` `$profile20` `$setting.setting_dateformat`\", $datetime->timezone($smarty.now, $global_timezone))}</td>url_create('profile',$user->user_info.user_username)}#comments'>{$profile26}&amp;nbsp;|&amp;nbsp;user_info.user_username}'>{$profile34}, \";
      {else}
        newTable + = \"</td><table cellpadding= '0' cellspacing='0' width='100%'>----,  {$profile33}  - {$datetime->cdate(\"`$setting.setting_timeformat` `$profile20` `$setting.setting_dateformat`\", $datetime->timezone($smarty.now, $global_timezone))}</td>&amp;nbsp;, \";
      {/if}
      newTable + = \"----
"+comment_body+"
</td></tr></table>";
    {literal}
    newComment.innerHTML =  newTable;
    var profileComments = document.getElementById('profile_comments');
    var prevComment = document.getElementById('comment_'+last_comment);
    profileComments.insertBefore(newComment, prevComment);
    next_comment++;
    last_comment++;
  }
}

function action_delete(action_id) {
  var divname = 'action_' + action_id;
  var newsrc = 'action_delete.php?action_id=' + action_id;
  hidediv(divname);
  document.getElementById('actionimage').src = newsrc;
  document.getElementById('actions_total').value--;
  if(document.getElementById('actions_total').value == 0) {
    document.getElementById('actions').style.display = "none";
  }
}

//-->
</script>
{/literal}

  ----

    {$profile6} {$owner->user_info.user_username},
    &amp;nbsp;,
    {$profile16} {$total_views} {$profile17},
 

  

{* BEGIN LEFT COLUMN *}

  {* SHOW USER PHOTO *}
  <table cellpadding='0' cellspacing='0' width='100%' style='margin-bottom: 10px;'>
  ----

 , user_photo(\"./images/nophoto.gif\")}' border='0'>

 
  {if $total_albums == 0}
   {else}
  user_info.user_username}'>Voir ses albums photos
         {/if}   
    </td>
 
 

       
       
  {* SHOW BUTTONS IF LOGGED IN AND VIEWING SOMEONE ELSE *}
  {if $owner->user_info.user_username != $user->user_info.user_username}
     
    {* SHOW VIEW FRIENDS MENU ITEM *}
    {if $total_friends != 0}
      ----

      user_info.user_username}'>{$profile7} {$owner->user_info.user_username|truncate:10:"...":true},
     
    {/if}

    {* SHOW ADD OR REMOVE FRIEND MENU ITEM *}
    {if $friendship_allowed != 0}
      {if $is_friend == TRUE}
        ----

        user_info.user_username}&amp;return_url={$url->url_create('profile', $owner->user_info.user_username)}'>{$profile41},
       
      {else}
        ----

        user_info.user_username}'>{$profile9},
       
      {/if}
    {/if}

    {* SHOW SEND MESSAGE MENU ITEM *}    {if $user->level_info.level_message_allow 2 | ($user->level_info.level_message_allow 1 &amp; $is_friend == TRUE)}
      ----

      user_info.user_username}'>{$profile10},
     
    {/if}
 
    {* SHOW REPORT THIS PERSON MENU ITEM *}
    ----

    url_current()}'>{$profile11},
   

    {* SHOW BLOCK OR UNBLOCK THIS PERSON MENU ITEM *}
    {if $user->level_info.level_profile_block != 0}
      {if $user->user_blocked($owner->user_info.user_id) == TRUE}
        ----

        user_info.user_username}'>{$profile42},
       
      {else}
        ----

        user_info.user_username}'>{$profile12},
       
      {/if}
    {/if}

   

  {/if}

  {* DISPLAY IF PROFILE IS PRIVATE TO VIEWING USER *}
  {if $is_profile_private != 0}

    {* END LEFT COLUMN *}
    </td>
    <td class='profile_rightside'>
    {* BEGIN RIGHT COLUMN *}

      
      
{$profile3}

      {$profile4}

  {* DISPLAY ONLY IF PROFILE IS NOT PRIVATE TO VIEWING USER *}
  {else}

    {* BEGIN STATUS *}
    {if ($owner->level_info.level_profile_status != 0 AND $owner->user_info.user_status != "") }
            ----

      {$profile36},
      ----

         
    {if $owner->level_info.level_profile_status != 0 AND $owner->user_info.user_status != ""}
          <table cellpadding='0' cellspacing='0'{if $is_online == 1} style='margin-top: 5px;'{/if}>
          ----

         , </td>
          {$owner->user_info.user_username} {$profile14} {$owner->user_info.user_status|choptext:12:"
"},
         
         

    {/if}
      </td>
      </tr>
      </table>
    {/if}
    {* END STATUS *}

    {* BEGIN STATS *}

    {* END STATS *}

    {* BEGIN PLUGIN RELATED PROFILE SECTIONS *}
    {section name=profile_loop loop=$global_plugins}{include file="profile_`$global_plugins[profile_loop]`.tpl"}{/section}

  {* END LEFT COLUMN *}
  </td>
  <td class='profile_rightside'>
  {* BEGIN RIGHT COLUMN *}

    {* SHOW RECENT ACTIVITY *}
    {if $actions_total > 0}
      {literal}
      <script language="JavaScript">
      <!-- 
        Rollimage0 = new Array()
        Rollimage1 = new Array()
        Rollimage0['join']= new Image(10,12);
        Rollimage0['join'].src = "./images/icons/action_delete1.gif";
        Rollimage1['join'] = new Image(10,12);
        Rollimage1['join'].src = "./images/icons/action_delete2.gif";

        function SwapOut(imgname, imgsrc) {
          imgname.src = Rollimage1[imgsrc].src;
          return true;
        }
        function SwapBack(imgname, imgsrc) {
          imgname.src = Rollimage0[imgsrc].src; 
          return true;
        }
      //-->
      </script>
      {/literal}

            ----
{$profile24},
      ----

          {* SHOW RECENT ACTIONS *}
        {section name=actions_loop loop=$actions}
         

        <table cellpadding='0' cellspacing='0' width='100%'>
        ----

       ,
          <table cellpadding='0' cellspacing='0'>
          ----

          ,
                     

          {$datetime->time_since($actions[actions_loop].action_date)}
              {* DISPLAY DELETE LINK IF NECESSARY *}              {if $setting.setting_actions_selfdelete 1 AND $actions[actions_loop].action_user_id $user->user_info.user_id}
                
              {/if}
           

                {$actions[actions_loop].action_text|choptext:50:"
"}
             ,
         
         

        </td>
        </tr>
        </table>
          

        {/section}
        
        
      </td>
      </tr>
      </table>
    {/if}
    {* END RECENT ACTIVITY *}
                ----
,
      ----

              <table cellpadding='0' cellspacing='0'>
      {if $owner->user_info.user_dateupdated != ""}----, {$profile22}</td>
      {$datetime->time_since($owner->user_info.user_dateupdated)},
      {/if}
      {if $owner->user_info.user_signupdate != \"\"}----
{$profile23}, {$datetime->cdate("`$setting.setting_dateformat`", $datetime->timezone("`$owner->user_info.user_signupdate`", $global_timezone))},
      ----

        Pr&amp;eacute;sentement :,
        {if $is_online != 0}
En ligne
{else}
Hors-ligne
{/if},
     
      {/if}
            

      </td>
      </tr>
      </table>

       {* SHOW PROFILE TABS AND FIELDS *}
    {section name=tab_loop loop=$tabs}
            ----
,
      ----

              <table cellpadding='0' cellspacing='0'>
        {* LOOP THROUGH FIELDS IN TAB, ONLY SHOW FIELDS THAT HAVE BEEN FILLED IN *}
        {section name=field_loop loop=$tabs[tab_loop].fields}
          ----

         ,
            {$tabs[tab_loop].fields[field_loop].field_title}:
          </td>
                      {$tabs[tab_loop].fields[field_loop].field_value_profile}
            {if $tabs[tab_loop].fields[field_loop].field_birthday == 1} ({$datetime->age($tabs[tab_loop].fields[field_loop].field_value)} {$profile37}){/if}
       
         ,
         
        {/section}
      

      </td>
      </tr>
      </table>
    {/section}
    {* END PROFILE TABS AND FIELDS *}

    {* BEGIN FRIEND LIST *}
    {if $total_friends != 0}
            ----
        {$profile35} ({$total_friends})
        &amp;nbsp;[ user_info.user_username}'>{$profile25} {$profile19} ]
     ,
      ----

              {* LOOP THROUGH FRIENDS *}
        {section name=friend_loop loop=$friends}
       
          {* START NEW ROW *}
          {cycle name="startrow2" values="<table cellpadding='0' cellspacing='0'>----
,,,,"}
         , url_create('profile',$friends[friend_loop]->user_info.user_username)}'>user_photo('./images/nophoto.gif')}' class='photo' border='0' width='{$misc->photo_size($friends[friend_loop]->user_photo('./images/nophoto.gif'),'75','75','w')}'>
{$friends[friend_loop]->user_info.user_username}</td>
          {* END ROW AFTER 4 RESULTS *}
          {if $smarty.section.friend_loop.last == true}
           

          {else}
            {cycle name="endrow2" values=",,,,</tr></table>"}
          {/if}
        {/section}
    </td>
  </tr>
</table>
    {/if}
    {* END FRIEND LIST *}

    {* BEGIN COMMENTS *}
    
        ----
 
          {$profile38} ({$total_comments})
      &amp;nbsp;[ user_info.user_username}'>{$profile25} {$profile32} ]
   ,
   
      {if $allowed_to_comment != 0}
        ----

                <form action='profile_comments.php' method='post' target='AddCommentWindow' onSubmit='checkText()'>
        <textarea name='comment_body' id='comment_body' rows='2' cols='65' onfocus='removeText(this)' onblur='addText(this)' style='color: #888888; width: 100%;'>{$profile44}</textarea>

          <table cellpadding='0' cellspacing='0' width='100%'>
          ----

          {if $setting.setting_comment_code == 1}
           , </td>
            ,
            ,
          {/if}
                    
          user_info.user_username}'>
          
          </form>
         ,
     

        

          
    

    

    </td>
    </tr>
      {/if}
    <tr>
    <td class ='profile' id='profile_comments'>

      {* LOOP THROUGH PROFILE COMMENTS *}
      {section name=comment_loop loop=$comments}
        

                ----

                  {if $comments[comment_loop].comment_author->user_info.user_id != 0}
            url_create('profile',$comments[comment_loop].comment_author->user_info.user_username)}'>user_photo('./images/nophoto.gif')}' class='photo' border='0' width='{$misc->photo_size($comments[comment_loop].comment_author->user_photo('./images/nophoto.gif'),'75','75','w')}'>
          {else}
            
          {/if}
       ,
                  <table cellpadding='0' cellspacing='0' width='100%'>
          ----

         ,  {if $comments[comment_loop].comment_author->user_info.user_id != 0}url_create('profile',$comments[comment_loop].comment_author->user_info.user_username)}'>{$comments[comment_loop].comment_author->user_info.user_username}{else}{$profile33}{/if}  </td>
          {$datetime->cdate("`$setting.setting_timeformat` `$profile20` `$setting.setting_dateformat`", $datetime->timezone($comments[comment_loop].comment_date, $global_timezone))},
         
          ----

          {$comments[comment_loop].comment_body|choptext:50:"
"},
         
         

        </td>
        </tr>
        </table>
        

      {/section}

    </td>
    </tr>
    </table>
    {* END COMMENTS *}

  {/if}
  {* END PRIVACY IF STATEMENT *}

{* END RIGHT COLUMN *}
</td>
</tr>
</table>

{include file ='footer.tpl'}


Je sais, mon site est vraiment mal construit mais faut j'fasse avec :S
0

Vous n’avez pas trouvé la réponse que vous recherchez ?

Posez votre question
codefalse Messages postés 1123 Date d'inscription mardi 8 janvier 2002 Statut Modérateur Dernière intervention 21 avril 2009 1
22 janv. 2008 à 18:48
tu met du code sans tout mettre, je sais pas ce  qu'est $owner, $user.
Tu doit utiliser un ensemble de classe, pear peut-etre ?

Normallement tu es sensé arriver avec ce que je t'ai mis, vu ce que tu fait au niveau code, sauf si tu a repris ce que tu m'a mis d'un autre site ?
0
dclick07 Messages postés 43 Date d'inscription mercredi 22 novembre 2006 Statut Membre Dernière intervention 26 février 2008
22 janv. 2008 à 20:06
SELECT count (user_id_visited) FROM visits WHERE user_id_visitor=$user_id AND user_id_visited=$_GET['user'];

Si je fais sa dois-je rajouter quelque chose dans ma base de donné ?

en s''moment pour les users j'ai cette base.

`user_id` int(9) NOT NULL auto_increment,
  `user_level_id` int(9) NOT NULL default '0',
  `user_subnet_id` int(9) NOT NULL default '0',
  `user_email` varchar(70) NOT NULL default '',
  `user_newemail` varchar(70) NOT NULL default '',
  `user_username` varchar(50) NOT NULL default '',
  `user_password` varchar(50) NOT NULL default '',
  `user_code` varchar(8) NOT NULL default '',
  `user_enabled` int(1) NOT NULL default '0',
  `user_verified` int(1) NOT NULL default '0',
  `user_lang` varchar(20) NOT NULL default '',
  `user_signupdate` int(14) NOT NULL default '0',
  `user_lastlogindate` int(14) NOT NULL default '0',
  `user_lastactive` int(14) NOT NULL default '0',
  `user_status` varchar(100) NOT NULL default '',
  `user_logins` int(9) NOT NULL default '0',
  `user_invitesleft` int(3) NOT NULL default '0',
  `user_timezone` varchar(5) NOT NULL default '',
  `user_views_profile` int(9) NOT NULL default '0',
  `user_dateupdated` int(14) NOT NULL default '0',
  `user_blocklist` text,
  `user_photo` varchar(10) NOT NULL default '',
  `user_privacy_search` int(1) NOT NULL default '0',
  `user_privacy_profile` int(1) NOT NULL default '0',
  `user_privacy_comments` int(1) NOT NULL default '0',

Comme je dis, j'suis pas un expert dans sa :S
0
codefalse Messages postés 1123 Date d'inscription mardi 8 janvier 2002 Statut Modérateur Dernière intervention 21 avril 2009 1
22 janv. 2008 à 20:09
une base, c'est un endroit ou tu a tes tables, ce que tu me montre c'est une table
toi du toi créer une table visits (par exemple) qui contiendra les valeurs indiquée ci-dessous (tu à déjà ta table utilisateurs donc c'est bon pour ca)

ensuite faire les requetes nécéssaires (celle que je t'ai indiqué en corrigeant le nom des tables/champs)
0
dclick07 Messages postés 43 Date d'inscription mercredi 22 novembre 2006 Statut Membre Dernière intervention 26 février 2008
23 janv. 2008 à 02:54
J'commence à comprendre un peu mais le hic ses que ma page html et tlp son pas lié directement et ce code
insert into visits {user_id_visitor, user_id_visited} VALUES {$user_id, $_GET['user']};

SELECT count {user_id_visited} FROM visits WHERE user_id_visitor=$user_id AND user_id_visited=$_GET['user'];

Je n'sais n'y l'utilliser n'y l'insérer.
0
dclick07 Messages postés 43 Date d'inscription mercredi 22 novembre 2006 Statut Membre Dernière intervention 26 février 2008
23 janv. 2008 à 04:39
J'aimerais savoir vu qu'tu t'y connais quand même bien si tu voudrais m'aider à résoudre quelques un de mes problemes ?
Si l'argent est une question pour toi jpeux payer sans probleme. Je suis pas très pro encore et mon script est asser complexe merci !
0
codefalse Messages postés 1123 Date d'inscription mardi 8 janvier 2002 Statut Modérateur Dernière intervention 21 avril 2009 1
23 janv. 2008 à 11:20
Le truc c'est que tu à l'air de mélanger template (avec tes {}) et programmation . Ce que je te demande (insert into, etc) c'est des requetes SQL, à faire avec une base de donnée, telle que mysql, donc utiliser les fonctions
mysql_query ('INSERT INTO ...');

regarde de ce coté là :

http://php.net/mysql_query
0
dclick07 Messages postés 43 Date d'inscription mercredi 22 novembre 2006 Statut Membre Dernière intervention 26 février 2008
2 févr. 2008 à 00:43
MySQL a répondu:
http://dev.mysql.com/doc/mysql/en/error-messages-server.html


#1064 - You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use
near '['user'])' at line 1

Je dois créer dans ma base de donné 
    user_id_visitor    user_id_visited  mais je met quoi dans ses table ??

Je suis sur avec un peut plus d'expliquation j'y arriverais. stp
0
codefalse Messages postés 1123 Date d'inscription mardi 8 janvier 2002 Statut Modérateur Dernière intervention 21 avril 2009 1
2 févr. 2008 à 14:42
fait voir ta requete exacte ?
tu fait un echo de ta variable qui contient la requete sql stp
0
dclick07 Messages postés 43 Date d'inscription mercredi 22 novembre 2006 Statut Membre Dernière intervention 26 février 2008
2 févr. 2008 à 16:06
le message d'erreur ses quand j'ai voulu entrer le code tu m'as donné!
0
codefalse Messages postés 1123 Date d'inscription mardi 8 janvier 2002 Statut Modérateur Dernière intervention 21 avril 2009 1
2 févr. 2008 à 18:04
Cela n'empeche qu'il me faut voir ta requete sql exacte, tu pourrais me l'afficher s'il te plait ?
0
Rejoignez-nous