Jump to content

jvrothjr

Members
  • Posts

    299
  • Joined

  • Last visited

Everything posted by jvrothjr

  1. They have choose not to do it this we so no need to solve
  2. check your user at the server valid information
  3. $query_Recordset1 = sprintf("SELECT * FROM info WHERE date between '".$date_Recordset1."' and '$".date2_Recordset1."' ORDER BY `date` ASC");
  4. http://us2.php.net/manual/en/function.substr.php
  5. Its defined when the user is set in mysql not in the config file
  6. change HOST in the user ID to % this will allow user connection remotelly
  7. Hay I know a few people have done this and just looking for a lil advice or code snippits I have the code to display the tables in Access now I need to take the data from access and replace the data in mysql The Access DB is the master and controled via are Doc Mang software blah blah The day-to-day users and testing Equi.... us the mysql DB. I have all the code to trigger the script for update once the DB is changed now just working on the mysql update side. I was thinking of placing the data from Access (at the same time it is being displayed) into an array then take that array and dump it into mysql <?php Step1("MCOVDutyCycle"); Step1("tdeviations"); Step1("typespecs"); Step1("unitspecs"); Function Step1($table) { $con = odbc_connect('northwind','',''); if (!$con) {exit("Connection Failed: " . $conn);} $sql="select * from ".$table; echo "Q String: ".$sql."<br>"; $rs=odbc_exec($con,$sql) or die("Select failed"); $myUtil = new Utilities(); $myUtil->standard_table($rs); odbc_close($con); echo "Complete<br>"; } class Utilities { function standard_table($result) { // Create field names for table header row $i = 0; $fieldCount = odbc_num_fields($result); echo "<table border=5 bordercolor=gray>"; echo "<tr>"; while ($i < $fieldCount) { $i++; $fieldName = odbc_field_name($result, $i); echo "<th>$fieldName</th>"; } echo "</tr>"; // Create table data rows for query result while (odbc_fetch_row($result)) { $i = 0; echo "<tr>"; while ($i < $fieldCount) { $i++; $fieldData = trim(odbc_result($result, $i)); if ($fieldData == "") echo "<td> </td>"; else echo "<td>$fieldData</td>"; } echo "</tr>"; } echo "</table>"; } } ?>
  8. One thats going to kill your bandwidth so smaller thumbnails with help with that. Then link the photo to a hlink so the user can select the photo and see the full imiage <img src='options/getpicture.php?id=".$id."&Thumb=Thumb' Width='100' height='60' target='PHOTO1' onclick=window.open>
  9. Where is a function is use to do this Pass the table use wish to query and the field that holds that data Function Queryselectdisplay($tablename,$fieldname) { $QSdist = "select Distinct ".$Fieldname." from ".$tablename." ORDER by ".$fieldname." ASC"; echo "<select name=".$fieldname.">"; echo "<option echo value=''>Make Selection</option>"; $options=mysql_query($QSdist); while($data = mysql_fetch_array($options)) { echo "<option value='".$data[$fieldname]."'>".$data[$feildname]."</option>"; } echo "</select>"; }
  10. phpadmin or sqlyog do a google search for it
  11. create a header fuction and call that at the top of every page.
  12. MAC Address is basicly the ID of your NIC card and is not changable unless you change your card out. IP's can be reset.
  13. thanks this worked $querystring = "Select * from ".$DB; $result=mysql_query($querystring); while(($field = mysql_fetch_field($result))) { ${"{$field->name}"} = $data22[$field->name]; }
  14. MAC Address logging would ban the PC..... manners is the best way to ask a question no matter where your at and yes the wrong wording with get u kicked before ban. If your reading logs then there are so many other better way to learn then viewing chat logs...........
  15. Nope no luck on that one Catchable fatal error: Object of class stdClass could not be converted to string in [$$field->name = $data22[$field->name];]
  16. http://www.graphscharts.com/
  17. Opps there is one thing if your storing the ID and not the Description displayed // Used to create a list of distinct values from field to display as search options // 1 - Working Table Name $tbl // 2 - Field Name $fn // 3 - Field Name for where clause $fnd // 4 - Value $vl Function QSDLA($tbl,$fn,$fnd,$vl) { echo "<td>"; $QSdist = "select Distinct ".$fn.",".$fnd." from ".$tbl." where ".$fnd." != 'Null' ORDER by ".$fnd." ASC"; echo "<select size='1' style='width:200' name='".$fn."'>"; $QSdist_a = "select ".$fn.",".$fnd." from ".$tbl." where ".$fn." = '".$vl."'"; $options_a=mysql_query($QSdist_a); while($data_a = mysql_fetch_array($options_a)) { echo "<option value='".$data_a[$fn]."'>".$data_a[$fnd]." - ".$data_a[$fn]."</option>"; } $options=mysql_query($QSdist); while($data = mysql_fetch_array($options)) { echo "<option value='".$data[$fn]."'>".$data[$fnd]." - ".$data[$fn]."</option>"; } echo "</select>"; echo "</td>"; } The red text will query for the information for that record and display it as the first selection
  18. is each field part of the same record within the same table if so yes.
  19. This second option does not use an if statement just defaults the first value to the defined value thus that value will show up twice in the list. Meaning in stead of and if clause just display the defined value as the default then create the list box below it. // Used to create a list of distinct values from field to display as search options // 1 - Working Table Name $tbl // 2 - Field Name $fn // 3 - Field Name for where clause $fnd // 4 - Value $vl Function QSDLA($tbl,$fn,$fnd,$vl) { echo "<td>"; $QSdist = "select Distinct ".$fn.",".$fnd." from ".$tbl." where ".$fnd." != 'Null' ORDER by ".$fnd." ASC"; echo "<select size='1' style='width:200' name='".$fn."'>"; echo "<option echo value='".$vl."'>".$vl."</option>"; $options=mysql_query($QSdist); while($data = mysql_fetch_array($options)) { echo "<option value='".$data[$fn]."'>".$data[$fnd]." - ".$data[$fn]."</option>"; } echo "</select>"; echo "</td>"; }
  20. maybe some kind of combo of the Magic Number and the Number of records (Numbers [8]) say (1 * 25 * 100) * (2 * 52 * 100) * (3 * 16 * 100) ........
  21. Is this what your looking for? IF ($vl1 == "YES" AND $vl2 = 'YES') { $querystring = "select * from tblname"; } IF ($vl1 == "YES" AND $vl2 = 'YES') { IF ($vl3 == "OK" AND $vl4 = 'CHECK') { $querystring = "select * from tblname"; } }
  22. <?php $agent = $_GET['agent']; if ($agent == "blah") {echo "Have a nice weekend!";} ?> OR As akitchin stated <?php if ($_GET['agent'] == "blah") {echo "Have a nice weekend!";} ?>
  23. could use where date like '2006%'
  24. <?php echo $_GET['agent']; if ($agent == "blah") { echo "Have a nice weekend!"; } ?> [\code]
  25. $QSdist = "SELECT * FROM Tblname Order By Field_Name Desc";[\code]
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.