User Profile

Collapse

Profile Sidebar

Collapse
jgentes
jgentes
Last Activity: Mar 6 '09, 02:18 AM
Joined: Jul 2 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • jgentes
    replied to Complex concatenation
    in PHP
    Yeah I tried searching google, but I couldnt find it...

    This is exactly what I wanted thanks.
    See more | Go to post

    Leave a comment:


  • jgentes
    replied to Complex concatenation
    in PHP
    powerset and permutation

    issue resolved...

    see Complex Concatenation

    This post was merged into current thread.
    See more | Go to post

    Leave a comment:


  • jgentes
    started a topic Complex concatenation
    in PHP

    Complex concatenation

    I am looking for help creating a factorial like function, except it will take some user-defined array/list and concatenate the values into a user-defined length ... similar to substr, but not exactly that... for instance if the array given is a,b,c,d and the length is 2, the function will return and ab,bc,bd,ad ... I am not necessarily looking for someone to write it, but maybe some direction
    See more | Go to post

  • jgentes
    replied to Union based upon first query
    I tried that but it failed putting it just as a field.

    if I ran just that query though and substituted the reference value for an actual value, it worked properly.
    See more | Go to post

    Leave a comment:


  • jgentes
    started a topic Union based upon first query

    Union based upon first query

    I have a query that I would like to use a union statement in to grab the number of replies to a specific thread. The initial topic thread is in a different table, which I am grabbing in the initial query... I would prefer to do this in the single query, however I supposed I could do a separate loops and grab the number of replies with a totally distinct query

    Code:
    SELECT id,title,category,message FROM forum UNION(SELECT count(msg_id)
    ...
    See more | Go to post

  • jgentes
    started a topic Send attachment with PHP mail
    in PHP

    Send attachment with PHP mail

    I have read through the manual on php dot net, and a number of tutorials around the net, however when I create an email and attempt to attach a file, I always get the hex (textual) representation, rather then having the file be attached.

    Below is a test that I completed, hard coding all the values necessary to test if it was miscellaneous beginning reasons why i was having difficulty

    [code=php]

    $path =...
    See more | Go to post

  • jgentes
    started a topic sending array to function parameter

    sending array to function parameter

    I know its possible, but I haven't been able to get a hold of how to send the parameter as an array or string?

    Code:
    function updateHours(el, val)
    {
         if(el!=null && val!=null)
         {
              var element = document.getElementById(el);
              element.innerHTML = element.value + val;
         }
    }
    is what I have right now and it will work as long as...
    See more | Go to post

  • jgentes
    started a topic Re-arrange mysqldump

    Re-arrange mysqldump

    I dumped my database and was attempting to mirror it over to another server and I am getting an error
    [code=mysql]ERROR1217: foreign key constraint[/code]

    Since this is a dump file I do not want to restructure my entire database, so i was wondering if there was a way to re-arrange the dump so I can restore the table in a way that wont give me this error. Thanks.
    See more | Go to post

  • okay I did that and now I am getting

    Code:
    ERROR 1217 (23000) at line 243: Cannot delete or update a parent row: a foreign key constraint fails
    [code=mysql]line 243: DROP TABLE IF EXISTS 'downloads';[/code]
    I checked on the mysql dev site and I cannot seem to figure out how to solve the problem? maybe it's just my lack of expertise in this area?

    Thanks for any help in advance.
    See more | Go to post

    Leave a comment:


  • there are only 2 databases to update. the reason I chose to dump them all is because its less code, and I figured there would be a way to import the whole sql file to the mirrored server since this isnt some miracle "hack" I devised to trick the system.

    maybe it would be better just to dump each database separately I dont know :-s what do you guys think?
    See more | Go to post

    Leave a comment:


  • jgentes
    replied to Class, Connecting to mysql
    in PHP
    you have 2 variables trying to do two multiple things...
    scope wise this poses a problem, because you are declaring $db in the beginning, using it as 1 thing in your getdb() function than using it entirely different in your connect() function. if you had initiated them inside the functions it would be fine, but you are decarling it outside the function(s) thus giving it global scope to the class.

    I would first just change...
    See more | Go to post

    Leave a comment:


  • [code=mysql]
    /usr/bin/mysqldump --all-databases --password=_pass_ > \_path_/file.sql
    [/code]...
    See more | Go to post

    Leave a comment:


  • jgentes
    replied to restore multiple databases with command line
    can anyone help with this? please? thanks

    I have looked all over and I cannot seem to find out how to do this
    See more | Go to post

    Leave a comment:


  • jgentes
    replied to restore multiple databases with command line
    anyone have an idea of how to accomplish this?
    See more | Go to post

    Leave a comment:


  • jgentes
    started a topic restore multiple databases with command line

    restore multiple databases with command line

    On my site I do a weekly backup of our server and the mysql databases. The problem I am having is restoring / updating the backup server's mysql data. There are 2 databases that I need to restore / update on the new server, but only 1 sql file, and I havent been able to find a tutorial on how to restore both databases with the command line.

    and I dont think this makes a difference, but the server is running on a Ubuntu Linux Distr...
    See more | Go to post

  • jgentes
    replied to regular expression time out
    in PHP
    The code I did provide is the example... If you want I will walk through it?

    the function is attempting to generate a password.
    the configure array contains all of the values that are possible and required at minimum

    1 UpperCase Letter, 1 Lowercase Letter, 1 Digit, 1 Symbol (non word character)

    It then checks if the user selects a random length.
    defaulted at 8 characters, but if true...
    See more | Go to post

    Leave a comment:


  • jgentes
    started a topic find table name from a given record

    find table name from a given record

    I am in the process of normalizing and re-creating a database that was a total maintanence mess. Currently the database has 640 tables. each table is an assembly and contains the data of its sub parts. Now I have created a new database that will incorporate only a hand full of tables.
    1 for the part info
    1 for assembly reference
    1 for category info
    1 for category reference
    etcetc...

    What I would like...
    See more | Go to post

  • jgentes
    started a topic regular expression time out
    in PHP

    regular expression time out

    Hey, I am attempting to create a random password string, and I am getting a timeout error on the regular expression. its giving me errors on the checks. line 25/27/29/31

    [code=php]
    function gen_secure($ran d_len = false)
    {
    $config = array(
    0 => "EXDHKFRLACYZJS WMPVGBNUT",
    1 => "jhwzqbgkmadovr snxyftpicue",
    2 => "47358926",
    3 => "`~!@#$^&*( )_-+=\\}]{[:;?/><",...
    See more | Go to post

  • jgentes
    replied to can anyone give me idea of PHP framework?
    in PHP
    no matter what framework you use, there is going to be a learning curve. what you really should be asking yourself rather is, how much PHP do I know, and which option best suits my needs / knowledge base. you can also check out Smarty and Sourdough... the other thing, is if it is for a class, are you sure that you are supposed to be using a pre-built framework? or are you supposed to be writing your own code?
    See more | Go to post

    Leave a comment:


  • jgentes
    replied to numbered code lines
    in PHP
    so you explode them to an array by some newline delimiter? then implode them using an ordered list?
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...