Jump to content

Search the Community

Showing results for tags 'or'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • HTML/XHTML
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • XSLT/XSL-FO
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

Found 4 results

  1. iwato

    var a = a || [ ];

    BACKGROUND: Earlier I posted a script from Matomo that serves as a counter for page hits and various other bits of information gleaned from a user's behavior on a webpage that bears the script. Although I now understand what the code does, I would like to understand its purpose. In particular, I would like to understand the probable reason for assigning to a variable another variable with the same name. The full code is given as: <!-- Matomo --> <script type="text/javascript"> var _paq = _paq || []; _paq.push(['trackPageView']); _paq.push(['enableLinkTracking']); (function() { var u="//{$PIWIK_URL}/"; _paq.push(['setTrackerUrl', u+'piwik.php']); _paq.push(['setSiteId', {$IDSITE}]); var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s); })(); </script> <!-- End Matomo Code --> The code of interest is var _paq = _paq || []; I find this piece of code problematic for three reasons: It assumes that this variable could already exist, but I have no idea where it could come from. It it does already exist what happens to the pre-existent with the same name. How does it know which value to choose? Is there a latent selection mechanism that tells the assignment operator to choose the second value when the first is undefined? Please advise. Roddy
  2. westman

    using OR in MySQLi

    how do I use "OR" in MySQLi? Here is what I have $i = 0; $Db1 = "1"; $Db2 = "2"; $stmt = $conn->prepare("SELECT id, user, title, date, show_post FROM post WHERE show_post = ? ORDER BY id DESC"); $stmt->bind_param("s", $Db1); $stmt->execute(); $stmt->store_result(); //if($stmt->num_rows === 0) exit('No rows'); $stmt->bind_result($idRow, $userRow, $titleRow, $dateRow, $showRow); while ($stmt->fetch()) { $post_id[] = $idRow; $user[] = $userRow; $title[] = $titleRow; $date[] = $dateRow; $post_show[] = $showRow; $i++; // run a while loop } $stmt->close(); $conn->close(); I would like to use OR to look for $Db1 = "1"; $Db2 = "2"; in my DB. How do I use OR?
  3. fikiwan

    about field dabatabe ...

    hello I thinking about wht is the best create many or just litle field in table a database : ex: I want create this : ---------------------------------------------------------------------------------------------------------------------------- | ID_U | firsname | lastName | email | biograp | comment | status_res | activatio | aim | jabber | ---------------------------------------------------------------------------------------------------------------------------- | 1 | fekke1 | laldjajdd | e@d.dcom | ndndn | blalalalal | a,ama | ,,,,,,,,, |....... | kakdd | 2 | dekj4 | jdhkhjdh | d@d.dcom |kskksk |blalalalal | a,amnka |,,,,,,,,,,, | ,,,,,,,,| ksjdhd |------------------------------------------------------------------------------------------------------------------------------ you can look in above I create 10 field in my table , Now I thingking only will make 4 field look ex below : -------------------------------------------------------- | ID_MG | ID_UMG | KEY_MG | VALUE_KEY | -------------------------------------------------------- | 1 | 1 | firsname | blalalalal | | 2 | 1 | lastName | blalalalal | | 3 | 1 | email | blalalalal | | 4 | 1 | biograp | blalalalal | | 5 | 1 | comment | blalalalal | | 6 | 1 | status_res | blalalalal | | 7 | 1 | activatio | blalalalal | | 8 | 1 | aim | blalalalal | | 9 | 1 | jabber | blalalalal | --------------------------------------------------------- you could look both example at above , first table with many field and second just with 4 field , now , in two way that, what the best way for on use database .. thanks for explain to me regards
  4. I have an xml blog and a javascript file i am trying to use to publish this blog to a website with. I am just testing to see if AJAX is working at all because i have been having issues with this for a day now. Here is the Javascript code: function blog(){var xhr = new XMLHttpRequest(); xhr.onReadyStateChange = function(){if(xhr.readyState == 4 && xhr.status == 200){var xmldom = xhr.responseXML;alert(xmldom.documentElement);}} xhr.open("GET","blog.xml",true);xhr.send();} Here is the xml code: <?xml version="1.0" encoding="UTF-8"?><rss version="2.0"><channel><item><title>hello</title> <link>www.google.com</link> <description>world</description></item><item><title>hello</title> <link>www.google.com</link> <description>world</description></item><item><title>hello</title> <link>www.google.com</link> <description>world</description></item></channel> </rss> Finally, here is the HTML code: <div id="blog"><h4>News Updates</h4><script type="text/javascript" src="blog.js" async></script><button type="button" onclick="blog()">click me</button></div> I have it set up to where the button in the HTML code has the onclick event listener that calls the javascript "blog()" function. the problem is that i never does anything NO MATTER WHAT I DO. it is always unresponsive. I never get a single alert box no matter what i make the script do inside the onreadystate function.
×