Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. LazyJones

    creating a variable

    I fighted with the same problem back in autumn when I was studying XSL and came to a sad conclusion: no, you can not add (or subtract or basicly anything) a value of a variable. In another words, a variable in XSL is not a variable in common programming language sense :/ For example, making a...
  2. LazyJones

    Limit Query Result Per Page MySQL

    With mysql LIMIT you can pick out the records you want to show. Then have a variable ($offset) which indicates the starting point of where you want your records to be fetched. lets say first page has $offset=0 and $onPage = 10 Then make you query like this "SELECT * FROM TABLE ORDER BY id...
  3. LazyJones

    Alternating table row colors?

    Not having the information about your CSS file, I just have to give the basic idea: foreach($tree['freerolls']['tournament'] as $k) { $color = "#E2ECFC"; if($i%2 == 0) $color="#ffffff"; $i++; ... print "<tr bgcolor=\"$color\">"; ...
  4. LazyJones

    newb help reading in config file

    If your config file is well-formed XML, I suggest simpleXML (requires PHP5)
  5. LazyJones

    ereg problem

    Thank you for the star! This was a good lesson for me too, always learning something new. The ereg's and preg's are not so familiar for me, hated them in the beginning 'cause those patterns seemed so cryptic :) So I'm glad I was able to help.
  6. LazyJones

    multiple arrays from CSV file

    I merged our bits of code and got this. Doesn't look pretty, but it works :) $openFile = "eurusd.csv"; $handle = fopen ($openFile,"r"); $array = array(); while($data = fgetcsv ($handle, 1000, ",")) { $array[] = $data; } fclose($handle); $name = "array"; $size = count($array); for($i=0...
  7. LazyJones

    ereg problem

    hmm, read this from manual: Returns the length of the matched string if a match for pattern was found in string so in this case the matched string was "," -> length 1 so the substr returns only first char.
  8. LazyJones

    xsl: nesting for-each

    found it! <xsl:for-each select="value"> <tr><td><xsl:value-of select="."/></td></tr> </xsl:for-each>
  9. LazyJones

    multiple arrays from CSV file

    First you get the CSV file into multidimensional $array (I assume you know how to do that) and then do this: $name = "array"; $size = count($array[0]) for($i=0; $i<$size; $i++) { foreach($array as $key => $value) { ${"$name"."$i"}[] = $value[$i]; } } And you have multiple arrays named...
  10. LazyJones

    inserting checkboxes into table?

    Wasn't first quite sure, were you talking about database tables and columns or HTML. But I'm quessing database. What is an array of checkboxes (this made me think of HTML...)? Are you talking about an array you receive, when multiple values are selected? Like $array = $_POST['choice']...
  11. LazyJones

    XSD Design - Element with same name, but different sub elements

    It would help, if you posted your schema also...
  12. LazyJones

    Need help to display 10 each column

    If I understand correctly, you need something like this: // queries... $resultset = array(); while ($row = mysql_fetch_array($r)) { $resultset[] = $row; } echo '<table border="1">'; for ($i=0;$i<10;$i++){ //second column index $c2 = $i+10; echo '<tr>'; echo...
  13. LazyJones

    How to execute this query?

    Desing in that table is straight from hell... May you should alter your query like this SELECT DISTINCT ID_MEMBER AS id and then count the returned id's in your code
  14. LazyJones

    How to execute this query?

    Well, sorry, that won't get the result you are after... You should follow at least the basic rules of database normalization. You should have separate table for variable where the values are stored with the memberID.
  15. LazyJones

    How to execute this query?

    variable = 'profile_domicile' AND variable = 'profile_division' There's your problem. 'variable' can't be 'profile_domicile' and 'profile_division' at the same time, same goes with 'value' use OR
  16. LazyJones

    How to execute this query?

    Get rid of "\n"'s and try again...

Part and Inventory Search

Back
Top