Yeah I tried searching google, but I couldnt find it...
This is exactly what I wanted thanks.
User Profile
Collapse
-
powerset and permutation
issue resolved...
see Complex Concatenation
This post was merged into current thread.Leave a comment:
-
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 -
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.Leave a comment:
-
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)
-
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 =... -
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; } }
-
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. -
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
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.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?Leave a comment:
-
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...Leave a comment:
-
[code=mysql]
/usr/bin/mysqldump --all-databases --password=_pass_ > \_path_/file.sql
[/code]...Leave a comment:
-
can anyone help with this? please? thanks
I have looked all over and I cannot seem to find out how to do thisLeave a comment:
-
-
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... -
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...Leave a comment:
-
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... -
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 => "`~!@#$^&*( )_-+=\\}]{[:;?/><",... -
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?Leave a comment:
-
so you explode them to an array by some newline delimiter? then implode them using an ordered list?Leave a comment:
No activity results to display
Show More
Leave a comment: