Jump to content

ameliabob

Members
  • Posts

    218
  • Joined

  • Last visited

Posts posted by ameliabob

  1. I am not sure whether I am formatting this correctly or there is an undocumented restriction.

     

    What I am trying to do is to do a search in subfiles to find anything with "Tab" in the contents field and then do an inner join to the filenames table to get its contents.

    SELECT subfiles.contents, subfiles.masterId, filenames.rowId, filenames.contents FROM subfiles  where subfiles.contents like'%Tab%' inner join filenames on filenames.rowId=subfiles.masterId
  2. Is there a way without doing an additional search to find the number of an inserted row immediately after it has been added?

     

    I need to reference a row with rows immediately after it when inserting data into the data base.

     

    e.g

     

    insert Header Row

    insert detail row with a link back to Header Row

    insert detail row with a link back to Header Row

    insert detail row with a link back to Header Row

     

    So the table would be

    ID Link Contents

    1 0 Header

    2 1 Detail1

    3 1 Detail2

    4 1 Detail2

     

  3. While this should be obvous if I code a box as hidden

     

    <div hidden name='test'><div>

     

    How do I unhide it?

     

    Every book I have shows me how to hide it but not the reverse

     

    Maybe I should get yet another book

     

    Thanks

  4. I have created an HTML page that will not allow me to move on to a second page. It loads correctly; but when I click on a button it goes though the routine but then reloads the original page. I have tried a number of deletions to pin this down but I am hoping a fresh pair of eyes will see the problem.

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en-US"><script type="text/javascript">      function SetStation(whichSta){          stationID = whichSta;          document.getElementById("thisFunction").value = "Input Family Name";          s = "<div id='keyNames'> ";          s += "<input style='font-size:20px'id='thisFunction'  /> ";          s += "</div>";alert(s);                    document.getElementById("myForm").innerHTML = s;      }    </script><head>    <meta http-equiv="content-type" content="text/html; charset=utf-8" />    <title>Barnabas Family Usage</title><!--    <link rel="stylesheet" type="text/css" href="barnabas.css" /> --></head><body width='100%'><div id='header'><div id="hdgline" align='center' style >Barnabas Usage</div><table width='100%' align='center' style="background:blue; color:white;">    <td width='10%'><button>Reset</button></td>    <td style='font-size:24px' id="functionToDo" width='80%' align='center'>Function To Do:       <input style='font-size:24px'id='thisFunction' value="Select Station" /></td>    <td width='10%'><button>Help</button></td></table></div><form width='100%'; style="background:#d5dcef;position:absolute; top: 85px; left:0; right:0; bottom:0;"><form id='myForm' ><div style="position:relative; left:40em;"><p class="legend">Select Station</p><fieldset align='center' id="stations"><p id="buttons"><button onclick="SetStation('11')">Crisis</button></p><p id="buttons"><button onclick="SetStation('12')">Dental</button></p><p id="buttons"><button onclick="SetStation('13')">Food Pantry</button></p><p id="buttons"><button onclick="SetStation('14')">Medical</button></p><p id="buttons"><button>Reports (Needs Password)</button></p></fieldset></div></form>  <!-- end of 'myForm' --></form>  <!-- end of main form --></body></html>
  5. I am generating a table where the element below (when clicked) calls the SetTF function. The label passed alert functions with the correct label. But the var idIndex doesn't seem to work. At least the diagnostic says "idIndex is undefined."

     

    Is there something about not being able to pass a variable into a routine or that is must be hard coded?

     

     

     

    Failing Routine: function SetTF(id){ alert('label passed is '+id); var idIndex = id.selectedIndex; var valu=id.options[idIndex].value; SendOffRequest("setprofilefield&which="+id+"&value="+valu); }  Element in table that calls the above routine: <tr><td>Follow Gaps</td><td align='right'><select size ='2' id='followGaps' onclick=SetTF('followGaps')><option value='True'>True</option><option selected value='False'>False</option></select></td></tr>
  6. I recently upgrade to mysql 5.6.12 and php 5.4.16 and now my retrievals don't allow the same labels to be used.

     

    i.e.

     

     

    Array ( [0] => 7NAMTQ [userID] => 7NAMTQ [1] => WhatIf [profileName] => WhatIf [2] => 83 [marketToView] => 83 [3] => 2009-02-21 [dateStarted] => 2009-02-21 [4] => 2011-07-01 [lastDateUsed] => 2011-07-01 [5] => 3 [riskPC] => 3 [6] => 30000 [cashValue] => 30000 [7] => 30470 [acctValue] => 30470 [8] => 30000 [marginAvailable] => 30000 [9] => 2100 [marginUsed] => 2100 [10] => 0.75 [stopPC] => 0.75 [11] => 0.75 [stop1PC] => 0.75 [12] => Y [followGaps] => Y [13] => 0.75 [addonPC] => 0.75 [14] => 6 [lastCompletedAction] => 6 [15] => 127 [oiFilter] => 127 [16] => 57 [accesses] => 57 [17] => Y [moveStops] => Y [18] => P [profileType] => P [19] => N [showZeroQty] => N [20] => 30000 [yesterdaysValue] => 30000 )	1										( ! ) Notice: Undefined index: dateLastUsed in C:wampwwwtestcomsumcomsumFunctions.php on line 97											Call Stack											#							Time							Memory							Function							Location											1							0.0020							149584							{main}( )							..comsumProcess.php:0											2							0.0720							200136							LogIn( )							..comsumProcess.php:17			

     

    This is generated from where the line $uDate = $r[dateLastUsed]; is line 97

     

                $r = mysqli_fetch_array($result);print_r($r);

     

    Have I missed a documentation change??

     

    Bob

     

     

     

     

     

    [/codebox]

     

     

  7. In my ongoing quest.

     

    In php.in the line that says extension=php_mysqli.dll does not have a ';' in front of it

     

    In php extensions display from the aetray php extensions both php_mysql and php_mysqli are checked

     

    In aetray php/PHP Setting only displays a background behind that is backlit blue "set??" and cannot be selected.

     

    Does this move the ball forward??

     

  8. Some things are getting better.

     

    But I am still getting the : Call to undefined function mysqli_connect().

     

    The dll "php_mysqli.dll is in the ../php/php.5.4.12/ext directory dated 6/23/2013.

     

    in php.ini:

    Changes in RED

    ; display_startup_errors Default Value: On Development Value: On; Production Value: Off

    ; This directive allows you to enable and disable warnings which PHP will issue; if you pass a value by reference at function call time. Passing values by; reference at function call time is a deprecated feature which will be removed; from PHP at some point in the near future. The acceptable method for passing a; value by reference to a function is by declaring the reference in the functions; definition, not at call time. This directive does not disable this feature, it; only determines whether PHP will warn you about it or not. These warnings; should enabled in development environments only.; Default Value: On (Suppress warnings) Development Value: Off (Issue warnings); Production Value: Off (Issue warnings); http://php.net/allow-call-time-pass-referenceallow_call_time_pass_reference = Off

    I restarted all services in wamp.

     

    Nothing comes up during startup.

     

    I have also tried to change the format of the command thinking that php didn't recognize the parameters hence the command.

    i.e.

    # $cxn = mysqli_connect("localhost","fredsmith","120p53E435") or die("Couldn't connect to database. ".mysqli_error($cxn));# $cxn = mysqli_connect("localhost","root","","rats") or die("Couldn't connect to database. ".mysqli_error($cxn));

     

    where the first one has no db (it is set later)

    and the second one is (gasp) root with no passwords but a db.

     

    Neither work when the # is removed.

     

    Also as someone else rebuilt the wamp, are the passwords reset on mysql when re-installing wamp?

     

    Thanks

  9. I have just started getting this message "Call to undefined function mysqli_connect() in..."

    The mysqli in php.ini is:

    extension=php_mysqli.dll without the ;

     

    mysql version is 5.6.12

    php version is 5.4.16

     

    What am I missing??

     

  10. I am trying to wirte an applicaetion that can be veiwed on phone,pad or computer. The user agent $_REQUEST[ HTTP_USER_AGENT] gives me what softwawre the browser is running but nothing about which physical device it is running on. Where can I find this?

     

    Thanks,

  11. My fault for not typing more in. This is much closer to the original code:

     

    <!DOCTYPE html><html><head><script>function PostIt(numb){    alert("in postit numb is "+numb);    var q = document.getElementById(numb).value;    alert("q's value is "+q);}</script></head><body><table border='1'><tr><th>Name</th><th>Number</th><tr><tr><td>Fred</td><td id='n63' align='center'><input type='text' size='5' value='0'onblur="PostIt('n63')" /></td></tr></table></body></html>
  12. The syntax is obviously confusing me.

     

    Here is code that I used in the W3Schools tryme

     

    [codebox}

    <!DOCTYPE html><html><head><script>function PostIt(numb){ alert("in postit numb is "+numb); var q = document.getElementById(numb).value; alert("q's value is "+q);}</script></head><body><p id='n63' align='center'><input type='text' size='5' value='0'onblur="PostIt('n63')" /></p></body></html>[/codebox]

     

    The first alert shows the n63.

    The second shows undefined

     

    So I have not grasped how the interpreter works.

     

    Thanks

  13. I have set up a table where a text box is assigned an id as in the server:

    $custNumber=n40;             // Changed to add a letter$custLimit = 55;$custName = "Fred";$x = "onblur="PostIt(' ".$custNumber. " ')" ";"<td align='center'><input id='".$custNumber."' type='text' ".$x." size='5' value='".$custLimit."'' /> </td><td>".$custName."</td>";  

    and in the browser:

        function PostIt(numb){        alert("trying to post customer "+numb);        var q = document.getElementById('"+numb+"').value;         alert("and the value is "+q);    }

    My problem is to find the correct syntax so that the "numb" parameter can get put in the getElementById correctly.

    "q" comes back as undefined??

     

    I made the change to the customer number by adding an 'n' to it. The code that is sent to the browser is :

     

     

    <tr><td></td><td>Bill Mertens</td><td align='center'>19</td><td id='n63' align='center'><input type='text' size='5' value='0'onblur="PostIt('n63')" /></td></tr>

     

    Still can't find the problem....

  14. I have set up a table where a text box is assigned an id as in the server:

    $custNumber=n40;             // Changed to add a letter$custLimit = 55;$custName = "Fred";$x = "onblur="PostIt(' ".$custNumber. " ')" ";"<td align='center'><input id='".$custNumber."' type='text' ".$x." size='5' value='".$custLimit."'' /> </td><td>".$custName."</td>";  

    and in the browser:

        function PostIt(numb){        alert("trying to post customer "+numb);        var q = document.getElementById('"+numb+"').value;         alert("and the value is "+q);    }

    My problem is to find the correct syntax so that the "numb" parameter can get put in the getElementById correctly.

    "q" comes back as undefined??

  15. I will preface this by saying I don't know whether this belongs here or in javascript I have an API for finance.yahoo.com that looks like this. http://finance.yahoo.com/d/quotes.csv?f=snl1&s=ibm+goog+msft You can plug this into the browser line to see the results It returns a csv file that has the last values of Symbol, Name, Last Value for IBM Google and Microsoft My question is how do I code this to allow me to process the file either in the browser or the server?

  16. I am trying to write a program that will set/reset the archive bit in the file attributes. I can see where there are ways to recognize hidden but not the archive bit. Is there a way to do this in either php or javascript?

  17. I have been trying to determine row effected in an update query. The code that I used is: function DoTest(){ $qry="UPDATE ib SET close='99' WHERE symbol='MCD'"; $result = mysql_query($qry) or die ("qry in dotest failed ".mysql_error()); if($result) Msg2User("Query is true"); else Msg2User("Query is false"); Msg2User ("Number or rows affected is ".mysql_affected_rows($result)); } It makes no difference whether the symbol (MCD) is in the table or not. I get the Query is true and the line with the Msg2User on affected rows says that the link resource is invalid. the update gets done but how do I know?

  18. Do the list and each functions work with multidimensional arrays? $families = array ( "Griffin"=>array ( "Peter", "Lois", "Megan" ), "Quagmire"=>array ( "Glenn", "Fred", "Melissa" ), "Brown"=>array ( "Cleveland", "Loretta", "Junior" ) ); Given this array what would " echo (each($families)); " will display each of the family names.Is there a function that allows me to see the second level? while (list($first,$second,$third) = each($families){ echo("First born is ".$first." next is ".$second);}

  19. I writing some code to make my site respond differently based on iphone/computer/tablet I point to a startup.php<?php $useragent = $_SERVER['HTTP_USER_AGENT']; $a = explode("(",$useragent); $d = explode(";",$a[1]); switch (substr($d[0],0,6)){ case "iPhone": echo("Its an iPhone."); break; case "Window": echo("Its a computer."); break; default: echo("The device called is ".$d[0]." and needs to be added."); }?> I would like to go to a routine in the same directory such as computer_startup.php oriphone_startup.php. replacing the echo statements above. Can I do this in php or do I have to go back and redo this in javascript?

×
×
  • Create New...