Location: PHPKode > scripts > SODA > soda/exemples/01_utilisation_simple.html
<p><h1>Exemples d'utilisation simple de la Classe SODA:</h1></p><p><h2>Exemple 1 :</h2></p><pre class='xdebug-var-dump' dir='ltr'>
<b>object</b>(<i>Array_Object</i>)[<i>7</i>]
  
    <b>array</b>
      'long_ip' <font color='#888a85'>=&gt;</font> <small>string</small> <font color='#cc0000'>'214549523'</font> <i>(length=9)</i>
      'host' <font color='#888a85'>=&gt;</font> <small>string</small> <font color='#cc0000'>'threezprinting.com'</font> <i>(length=18)</i>
      'type' <font color='#888a85'>=&gt;</font> <small>string</small> <font color='#cc0000'>'3'</font> <i>(length=1)</i>
  
    <b>array</b>
      'long_ip' <font color='#888a85'>=&gt;</font> <small>string</small> <font color='#cc0000'>'418549946'</font> <i>(length=9)</i>
      'host' <font color='#888a85'>=&gt;</font> <small>string</small> <font color='#cc0000'>'mermony.com'</font> <i>(length=11)</i>
      'type' <font color='#888a85'>=&gt;</font> <small>string</small> <font color='#cc0000'>'3'</font> <i>(length=1)</i>
  
    <b>array</b>
      'long_ip' <font color='#888a85'>=&gt;</font> <small>string</small> <font color='#cc0000'>'211550389'</font> <i>(length=9)</i>
      'host' <font color='#888a85'>=&gt;</font> <small>string</small> <font color='#cc0000'>'allianceabroad.net'</font> <i>(length=18)</i>
      'type' <font color='#888a85'>=&gt;</font> <small>string</small> <font color='#cc0000'>'3'</font> <i>(length=1)</i>
  
    <b>array</b>
      'long_ip' <font color='#888a85'>=&gt;</font> <small>string</small> <font color='#cc0000'>'417550322'</font> <i>(length=9)</i>
      'host' <font color='#888a85'>=&gt;</font> <small>string</small> <font color='#cc0000'>'nxane.com'</font> <i>(length=9)</i>
      'type' <font color='#888a85'>=&gt;</font> <small>string</small> <font color='#cc0000'>'3'</font> <i>(length=1)</i>
  
    <b>array</b>
      'long_ip' <font color='#888a85'>=&gt;</font> <small>string</small> <font color='#cc0000'>'203550569'</font> <i>(length=9)</i>
      'host' <font color='#888a85'>=&gt;</font> <small>string</small> <font color='#cc0000'>'molecular.com'</font> <i>(length=13)</i>
      'type' <font color='#888a85'>=&gt;</font> <small>string</small> <font color='#cc0000'>'3'</font> <i>(length=1)</i>
</pre><pre class='xdebug-var-dump' dir='ltr'>
<b>object</b>(<i>request</i>)[<i>1</i>]
  <i>public</i> '_sql' <font color='#888a85'>=&gt;</font> <small>string</small> <font color='#cc0000'>'SELECT * FROM `DNSEARCH` WHERE `type`=3 LIMIT 0, 5 '</font> <i>(length=51)</i>
  <i>public</i> '_data' <font color='#888a85'>=&gt;</font> 
    <b>object</b>(<i>Array_Object</i>)[<i>7</i>]
      
        <b>array</b>
          'long_ip' <font color='#888a85'>=&gt;</font> <small>string</small> <font color='#cc0000'>'214549523'</font> <i>(length=9)</i>
          'host' <font color='#888a85'>=&gt;</font> <small>string</small> <font color='#cc0000'>'threezprinting.com'</font> <i>(length=18)</i>
          'type' <font color='#888a85'>=&gt;</font> <small>string</small> <font color='#cc0000'>'3'</font> <i>(length=1)</i>
      
        <b>array</b>
          'long_ip' <font color='#888a85'>=&gt;</font> <small>string</small> <font color='#cc0000'>'418549946'</font> <i>(length=9)</i>
          'host' <font color='#888a85'>=&gt;</font> <small>string</small> <font color='#cc0000'>'mermony.com'</font> <i>(length=11)</i>
          'type' <font color='#888a85'>=&gt;</font> <small>string</small> <font color='#cc0000'>'3'</font> <i>(length=1)</i>
      
        <b>array</b>
          'long_ip' <font color='#888a85'>=&gt;</font> <small>string</small> <font color='#cc0000'>'211550389'</font> <i>(length=9)</i>
          'host' <font color='#888a85'>=&gt;</font> <small>string</small> <font color='#cc0000'>'allianceabroad.net'</font> <i>(length=18)</i>
          'type' <font color='#888a85'>=&gt;</font> <small>string</small> <font color='#cc0000'>'3'</font> <i>(length=1)</i>
      
        <b>array</b>
          'long_ip' <font color='#888a85'>=&gt;</font> <small>string</small> <font color='#cc0000'>'417550322'</font> <i>(length=9)</i>
          'host' <font color='#888a85'>=&gt;</font> <small>string</small> <font color='#cc0000'>'nxane.com'</font> <i>(length=9)</i>
          'type' <font color='#888a85'>=&gt;</font> <small>string</small> <font color='#cc0000'>'3'</font> <i>(length=1)</i>
      
        <b>array</b>
          'long_ip' <font color='#888a85'>=&gt;</font> <small>string</small> <font color='#cc0000'>'203550569'</font> <i>(length=9)</i>
          'host' <font color='#888a85'>=&gt;</font> <small>string</small> <font color='#cc0000'>'molecular.com'</font> <i>(length=13)</i>
          'type' <font color='#888a85'>=&gt;</font> <small>string</small> <font color='#cc0000'>'3'</font> <i>(length=1)</i>
  <i>public</i> '_type' <font color='#888a85'>=&gt;</font> <small>string</small> <font color='#cc0000'>'assoc'</font> <i>(length=5)</i>
  <i>public</i> '_ltype' <font color='#888a85'>=&gt;</font> <small>int</small> <font color='#4e9a06'>0</font>
  <i>public</i> '_result' <font color='#888a85'>=&gt;</font> <small>boolean</small> <font color='#75507b'>true</font>
  <i>public</i> '_lengths' <font color='#888a85'>=&gt;</font> <small>int</small> <font color='#4e9a06'>528</font>
  <i>public</i> '_fields' <font color='#888a85'>=&gt;</font> <small>int</small> <font color='#4e9a06'>3</font>
  <i>public</i> '_rows' <font color='#888a85'>=&gt;</font> <small>int</small> <font color='#4e9a06'>5</font>
  <i>public</i> '_vars' <font color='#888a85'>=&gt;</font> 
    <b>object</b>(<i>Array_Object</i>)[<i>4</i>]
  <i>public</i> '_parent' <font color='#888a85'>=&gt;</font> 
    <b>object</b>(<i>driver_mysql</i>)[<i>10</i>]
      <i>protected</i> 'read_only' <font color='#888a85'>=&gt;</font> 
        <b>object</b>(<i>Array_Object</i>)[<i>9</i>]
          <i>public</i> '_persistant' <font color='#888a85'>=&gt;</font> <small>string</small> <font color='#cc0000'>'X3BlcnNpc3RhbnQ=L91zOKzSz38CD8pMVHfAUAvnGTrviebtcPFBGEZQHTUto8Z+zOhFaXHXBG4UyA+2bzoTpDwUCc9286+gNBOlltETisscwbmaHSkrmuIMPdXUiBLwOIGcvyeckOTTybOotFgoEZ0VRP4DBHZEq7QwLSOj0kW4SMWN+7nGEupialg='</font> <i>(length=188)</i>
          <i>public</i> '_driver' <font color='#888a85'>=&gt;</font> <small>string</small> <font color='#cc0000'>'X2RyaXZlcg==HLoxKZ0gG/nIUldxIF3t5kI0KDaLCJt6I4euZKWZ2TsmGxGbwQQNvf6mQCCx/6nUEIANBvz5xWbc6YxmQuvmmdqRszCPW08bL+fZoB+j8dhcSU6TtHrmqPqyc2GT5dEyGuQ8T7riuVTx50OdttMP6XaZl4GT35yThQFIakDBAM4='</font> <i>(length=184)</i>
          <i>public</i> '_dbtype' <font color='#888a85'>=&gt;</font> <small>string</small> <font color='#cc0000'>'X2RidHlwZQ==lWWx1befsLnKtsCG9+0waK0E5NToYtUvr42EmNV3IZH+rnTtTrJEuwbXpk3lqY6NopbSfj9tJN0xPyjhj83sQtt5kM9FI45CPg37/VDgzvkFVvx3kcbeU1EA/yqrBUii63GLz3/8MvnTXci0g/6RhZkSi9856pEoToVXc+3z+aE='</font> <i>(length=184)</i>
          <i>public</i> '_connected' <font color='#888a85'>=&gt;</font> <small>string</small> <font color='#cc0000'>'X2Nvbm5lY3RlZA==rVf/OXLSx3buCrG9eccT2mDHOw+mGqDaFUAFtt+3yOnuVkVlRxSHmW3U4u5YC5P5KmDOTO/94ZEEVBueQYHpyjEQ0BrXjWiVA5XzZVJ5lL9a2u+I7gzuuVq9J1Q2kvyrZJjJ3FrdxfxgydpMVEggDPZs086DqjCN3KN49MO6HL8='</font> <i>(length=188)</i>
          <i>public</i> '_select_db' <font color='#888a85'>=&gt;</font> <small>string</small> <font color='#cc0000'>'X3NlbGVjdF9kYg==AyBLKY6IHSDJl8vOXrc7iw0xWWaGrunmr+5UYQElu8t4bmcnocCBRqtsYZy985qU1rBX1v7KQiGUGvvVH3Anl8910KIb6gWf5k4AWQ8jauolpnEqZO91p8QI5JSKaiz3+p38K8L8CbaLElcIpqbemnNDI8EAY50AIC00G+Umqj0='</font> <i>(length=188)</i>
          <i>public</i> '_requests' <font color='#888a85'>=&gt;</font> 
            <b>object</b>(<i>Array_Object</i>)[<i>14</i>]
              ...
          <i>public</i> '_errors' <font color='#888a85'>=&gt;</font> 
            <b>object</b>(<i>Array_Object</i>)[<i>16</i>]
              ...
      <i>protected</i> 'write_only' <font color='#888a85'>=&gt;</font> 
        <b>object</b>(<i>Array_Object</i>)[<i>11</i>]
          <i>public</i> '_persistant' <font color='#888a85'>=&gt;</font> <small>string</small> <font color='#cc0000'>'X3BlcnNpc3RhbnQ=L91zOKzSz38CD8pMVHfAUAvnGTrviebtcPFBGEZQHTUto8Z+zOhFaXHXBG4UyA+2bzoTpDwUCc9286+gNBOlltETisscwbmaHSkrmuIMPdXUiBLwOIGcvyeckOTTybOotFgoEZ0VRP4DBHZEq7QwLSOj0kW4SMWN+7nGEupialg='</font> <i>(length=188)</i>
          <i>public</i> '_user' <font color='#888a85'>=&gt;</font> <small>string</small> <font color='#cc0000'>'X3VzZXI=Yvk8de+P2eioZO+e/rbJebPxfuRBKIy/qgA6aXGUVjW2WkEka5OatqiwWaoZt8PcLHhW6fQ38OUQsNHhmFvq6Q0BDRE1FSRba+uNMc1CWL+S2tDZL33dX6pQEkLy8m+rSPTHgo/Lu7JZpo1/aPnbhpZvz5y9d9FS9bT8A4LZDrQ='</font> <i>(length=180)</i>
          <i>public</i> '_pwd' <font color='#888a85'>=&gt;</font> <small>string</small> <font color='#cc0000'>'X3B3ZA==Vr0iLA7UUXikaDvw/l7xK92uPYZaMUKLsoF6q6ClcdWCdorSNfptTLXSKDoO5FPJp8v5V1b6XbySOMJFl2BZYEPAYeLpzcNDjJlkPt1JdyyzINOpIQ8eKItdt6Q4QeLl8+s414hs0v/laeiH9vyiShi6gsedb2Ky48tQ/UYdqB0='</font> <i>(length=180)</i>
          <i>public</i> '_server' <font color='#888a85'>=&gt;</font> <small>string</small> <font color='#cc0000'>'X3NlcnZlcg==GL6d1QcUd//FZcxqVs6GkLFBRpO9PaZqSOjWRCtK8hO4kLD3Ow25Vy0PfMrKms/WyPh4N4Ry5gPLkCoqRVJTFPpYz5AMX8aLz/fHIPgZ8EDfmUAKm+66g1vdDVy04MQ/6lemwIzO0FE7wsWH4YMdamVRJW6U07DfENQCAEuaQdQ='</font> <i>(length=184)</i>
          <i>public</i> '_dbname' <font color='#888a85'>=&gt;</font> <small>string</small> <font color='#cc0000'>'X2RibmFtZQ==OsATxw9bowjMgM2xqxGm5uliIxX0c/CiQS8J307Nnl+vfkjLABvVokcTkfrsQnz0mIvNhZBxjh6OfI+MtXYiCqr8OwXTzFbJl3OtXAqPJ65LIsUxvlX0qQ/eEkLC4IKJqb/fdPb/XD74lJSdFsyHgBE6nHrOCNPbXtScKm09Ij8='</font> <i>(length=184)</i>
          <i>public</i> '_requests' <font color='#888a85'>=&gt;</font> 
            <b>object</b>(<i>Array_Object</i>)[<i>14</i>]
              ...
      <i>protected</i> 'protected' <font color='#888a85'>=&gt;</font> 
        <b>object</b>(<i>Array_Object</i>)[<i>12</i>]
          <i>public</i> '_connection' <font color='#888a85'>=&gt;</font> <b>resource</b>(<i>21</i><font color='#2e3436'>,</font> <i>mysql link</i>)
          <i>public</i> '_vecteur' <font color='#888a85'>=&gt;</font> <small>string</small> <font color='#cc0000'>'HLN68SvcZ9IIxMgzDOLZfw=='</font> <i>(length=24)</i>
          <i>public</i> '_certificate' <font color='#888a85'>=&gt;</font> <small>string</small> <font color='#cc0000'>'Xg84taTkUBMp3Ls4XmPwIqDiI38f30IVMy9il193LU/uvXQEty+lHLxqwShtkyIEtE8OMA+k2IyMi8T6zqVqzziMhsiUqfQUJTTX1oEkB8pC4czU+fYDfYWF+KIWZO/K503D27NF7EMt/Ak9ov4Ni0QafWluQrKNP75M1Y9PTnL4z37hzruCetDEcUHsjcbtfRElse2IiGPGJ2MkAqj+6KOufcorzzAy/TW/eg60siKySIu8qx+FJoWVneG0Qqav9L/mGcRdOK6qvNtZB0F3uRDlfwaL+AJzo/NsN0wZYVpeoXQDPDcJkN+IK85y5d/KmkmQWOHHCc1ApgpZY+0A0PaEWbHFQdLfJDgs1oVTCXR02ReICcflZDkNmyE2RNLky2J55ZHF/5beeowrChj5pfvGyCwRzV7DVxeVmSS/s1Heguvo6xpXSlemWyflAEkZA2QRIbLhGfs08yMhuSxWWLW/VYv6TrkQIdrUO0ZvYXOvX1IOzUGpgxJcFhkHRiTa'...</font> <i>(length=1856)</i>
          <i>public</i> '_private_key' <font color='#888a85'>=&gt;</font> <small>string</small> <font color='#cc0000'>'MU5zzkMefZLZ+fS6apw1jxJqJeyHT+60AWPIVqhFLTpWU36ZhhErZwMK1To+ekbemP4ZgQIbuJ5uTOAZ5p7gEHnal8TFMJwn/S4f/PpSzDoq5U9QnvTaaJF85GEW4TIPnRH2MzeNrTF6UL4O7l/EGyK65kskCTCeV+r/eOP9y6oGrN8EO7vdfcErYYeqUA5zinDL0gNEqimmPR8RpcHcjAbmiWjG5hamWxXj3T23n52g31qQkG0F28E/IWebOMLBVN4c07ID0wEkDhn3mP2TIq3IoBSFCutD6+/GoFw5BqKySqAA6jmmlAbtnDDI3gm7/uNpCSSKhRyoW4PmWRmeK1AKEBwme3ZtNlHVSqpwtZHuD6DZ6X3FsF8uP3hVjw2En0ZXQCEGvyB1yfF4QdngNxFyPIq5Ut4HHcL7MCzCbQd7tgD0+2t0wc0ZZIJLwQ8ahMRu7HM8JbxwekLH/SCjT45iFvPl+3v53g+d/PF1F8M73V3q2bfwv6n+VY+U1aE/'...</font> <i>(length=1284)</i>
          <i>public</i> '_basedir' <font color='#888a85'>=&gt;</font> <small>string</small> <font color='#cc0000'>'/var/www/framework/SODA'</font> <i>(length=23)</i>
          <i>public</i> '_driver_file' <font color='#888a85'>=&gt;</font> <small>string</small> <font color='#cc0000'>'/var/www/framework/SODA/drivers/driver_mysql.php'</font> <i>(length=48)</i>
</pre><pre class='xdebug-var-dump' dir='ltr'><small>string</small> <font color='#cc0000'>'Uptime: 13358  Threads: 1  Questions: 136  Slow queries: 0  Opens: 13  Flush tables: 1  Open tables: 7  Queries per second avg: 0.010'</font> <i>(length=133)</i>
</pre>
Return current item: SODA