dcsimg

Search:

Type: Posts; User: youngnoviceinneedofh

Page 1 of 10 1 2 3 4

Search: Search took 0.46 seconds.

  1. Replies
    2
    Views
    1,124

    explode undefined offset

    I am getting an undefined offset when using an explode. Usually it works however on one instance it fails. It is the second explode here that is failing, because there was no instance of " v " in the...
  2. Re: check if its one hour before time

    Ok my worry is it wouldnt have any regard for the day either. I.e if the game is on the 27th at 4.00pm would it know that today at 5pm is still before that game?
  3. Re: The last entry causes an error

    Actually your first solution solves the error probel:


    if ( (count($dayKeys) == $a+1) || ($tournKeys[$c] > $dayKeys[$a] && $tournKeys[$c] < $dayKeys[$a + 1]) )

    However when it is the last one...
  4. Re: The last entry causes an error

    Hmm, it still gives me an Undefined offset: error.
    This is more irratating than I thought it would be. There is a command next() for arrays isnt there? should I be using that or something? What...
  5. check if its one hour before time

    So I am trying to check if the current time is one hour before a variable time:


    $date_game=$dt->format('Y n j'.$pieces[2]);
    echo $date_game;
    echo date('Y n j H');

    if (date('Y n j H') <...
  6. SQL insert into with mysql_real_escape_string

    I am trying to insert variables into a database, some of which potentially could hold apostrophes.
    I know about mysql_real_escape_string so I generate this sql statement:



    $sql = ("INSERT INTO...
  7. Re: The last entry causes an error

    Thanks but I still get the error if I replace my condition with yours.
  8. hidden html new line or space?

    Hi I am trying to generate a string from some html and other bits and bobs, however I can see what looks like a space when I echo it to the page. However when I save that string to a database, and...
  9. The last entry causes an error

    hi Guys. So I have a list of football matches, that are in certain tournaments, on certain dates - like this:
    date
    tournament
    match
    match
    date
    tournament
    match
    date
    tournament
  10. Replies
    14
    Views
    1,370

    Re: search lines in array

    I tried stipping the tags, which has actually almost worked:


    if (preg_match('/(Sunday|Monday|Tuesday|Wednesday|Thursday|Friday|Saturday)/', $v)){
    $dayKeys[] = $k;//array position of days of...
  11. Replies
    14
    Views
    1,370

    Re: search lines in array

    Yeah the monday one is different:
    Monday 12 December 2011 becomes:
    17004ba9b938c7ee3904543e33bb7256

    also I tried your code above and that works, so its not a problem with php its a problem with...
  12. Replies
    14
    Views
    1,370

    Re: search lines in array

    Really?
    5.3.8 I think.
    This code:


    foreach ($matches as $k => $v)
    {
    if (preg_match('/(Sunday|Monday|Tuesday|Wednesday|Thursday|Friday|Saturday)/', $v)){
    $dayKeys[] = $k;//array...
  13. Replies
    14
    Views
    1,370

    Re: search lines in array

    Ok cool, set the default time zone, and my code is checking whether it differs from the php.ini set timezone. It does - and do I have to worry about that if i have set it as i have set the default?...
  14. Replies
    14
    Views
    1,370

    Re: search lines in array

    Cool That worked perfectly. Thank you very much. It now displays just the dates of the matches:
    Thursday, 8 December 2011
    Friday, 9 December 2011
    Saturday, 10 December 2011
    Sunday, 11 December...
  15. Replies
    14
    Views
    1,370

    Re: search lines in array

    And then I can do something like $matches[$dayKeys] to see what line that was. Yeah I get you, cheers.
  16. Replies
    14
    Views
    1,370

    search lines in array

    So Ive managed to split text into an array no problem. when I print_r the array to the browser, I can see each array entry stores a line of text.
    Now I want to search each line of text for days of...
  17. Replies
    1
    Views
    474

    Re: replicating this table

    Actually this is producing something closer, except it also has the stuff at the end, but the list is like the real one now.
    Can anyone improve on it at all?
    Really I would like the information...
  18. Replies
    1
    Views
    474

    replicating this table

    Hi Guys quite new to php, but getting along roses. I am a big football fan and on my homepage I want to replicate the football fixtures for the week. Its really an learning exercise, but I need...
  19. not echoing drop menu selection

    Im pretty sure this code should echo the selection of the drop down box. The function showOptionsDrop, populates the drop down box from a multidimensional array extracted from a csv file:


    <?php ...
  20. Replies
    2
    Views
    1,424

    Finding record in array

    So I have a drop down box that displays all the entries in a column or a multidimensional array.
    I want to be able to select one of the Teams (this is football related) from the drop down menu,...
  21. Replies
    2
    Views
    2,342

    Re: array column to drop down box

    Thanks alot your changes worked perfectly.
    I realised the 2d array probably wasnt being passed correctly to the function.
  22. Replies
    2
    Views
    2,342

    array column to drop down box

    Hi I have a large array that is generated from a csv file. The data is football results from last year, and my code so far converts the csv into a multi dimensional array
    That part works well, and...
  23. Replies
    9
    Views
    915

    Re: SQL not updating database

    So I added


    myOleDBCommand.CommandText = SQL

    before the line


    myOleDbCommand.ExecuteNonQuery()
  24. Replies
    9
    Views
    915

    Re: SQL not updating database

    make_me_rain, I dont know what
    means

    I have a listview, I want the user to be able to edit fields within the listview, click update and it stores that info to my access database in the relevent...
  25. Replies
    9
    Views
    915

    Re: SQL not updating database

    Ok so I rant the sql as a new query within the database and it worked perfectly - for some reason its just not updating from the vb.net. Could it not have enough time or something?
  26. Replies
    9
    Views
    915

    SQL not updating database

    I have the following sql query that on debugging contains what looks like the right thing however the database is not being updated, but the code runs fine:



    con.Open()
    For i = 8 To...
  27. Replies
    8
    Views
    798

    Re: listview column2 value

    Still doesnt update. Any ideas why?
  28. Replies
    8
    Views
    798

    Re: listview column2 value

    Sorry yeah, silly error - i starts at 8 therefore index is (i-8)...
    It runs through fine now but it doesnt seem to successfully save to the database. When I reload the program, the old value is...
  29. Replies
    8
    Views
    798

    Re: listview column2 value

    event_night is reading correctly from the database, however the line

    event_num = xx.Items(i).SubItems(1).Text
    is coming out as zero every time. Is it definately reading from the second column of...
  30. Replies
    8
    Views
    798

    Re: listview column2 value

    Cheers. That compiled fine, however on run, I get an error. I have attached the error:
  31. Replies
    8
    Views
    798

    listview column2 value

    So I have a custom listview called xx. It has two columns
    I want to save the value of the second column to a database, based on the first column

    For i = 8 To...
  32. Replies
    4
    Views
    728

    Re: Conditional SQL update

    Yeah Access. Can I not do it uing SQL? I have never ued an IFF statement
  33. Replies
    0
    Views
    352

    Editable Listview

    Hi
    I have a custom control of a listview that allows you to edit any column not just the first one. I found the class on here.
    Anyhow I want the user to be edit the values in a column and update an...
  34. Replies
    4
    Views
    728

    Re: Conditional SQL update

    Sorry maybe I wasnt clear, the Phone parameter will never be N/A that is the entry i want to edit, however the field FirstName maybe N/A, so I only want to update that field if its current value is...
  35. Replies
    4
    Views
    728

    Conditional SQL update

    I want to update contacts in a database from VB, where the field value is N/A.
    The following will update all fields where phone = @Phone, however I want to update those fields IF they have N/A in...
  36. Re: Argument Length Must be Greater than or Equal to Zero

    Woops that wasnt supposed to be names the same thread as the last one. Dunno how that happened. Moderator want to change it?
  37. Argument Length Must be Greater than or Equal to Zero

    I disabled an exception because it was bugging me i couldnt find an intermittent error.
    My program reads textmessages from a phone, however a problem sometimes arises, and I am slowly pinpointing...
  38. Re: Argument Length Must be Greater than or Equal to Zero

    Guys sorry for the multiple posts,

    I have rearranged the function so that it does this before the loop, is this not a simpler solution, or have i missed a point somewhere:


    Shared Function...
  39. Re: Argument Length Must be Greater than or Equal to Zero

    Hi Guys. Thanks for responses. What you are saying is making complete sense. The code is part of a bigger piece of code trying to decode a PDU sms message. Sometimes it could be odd in length and...
  40. Re: Argument Length Must be Greater than or Equal to Zero

    I have discovered that if I comment out the code in my last post, when the error happens it says that the index is outside of the bounds of the array in this line:


    result +=...
Results 1 to 40 of 369
Page 1 of 10 1 2 3 4



Featured


Click Here to Expand Forum to Full Width