-
Posts
4,362 -
Joined
-
Last visited
-
Days Won
11
Everything posted by Zane
-
You need "x" instead of "w" at the end If you want to write to this file, then use x+, though you really only need to do this once.. IMO it's better to just use UNIX's touch command..assuming you're running Linux PHP's touch() function. $newfile = `touch cheese/file.txt`; $newfile = touch("cheese/file.txt"); $handle = fopen("cheese/file.txt", "w");
-
put a comma in here "re".($c+1).$ like so "re".($c+1),$ and don't forget your semicolon "re".($c+1).":",$ OR.. if you really wanted to get fancy with the regex... $message->reply['topic'] = preg_replace("/(re)([0-9]):/i", "$1". ($2+1) , $message->reply['topic']);
-
because preg_replace take three arguments and you only have two.
-
$pattern[67] = "/\:\D/"; Why do you escape the D? Would that be a pattern for something like :54 or anything with a colon followed by a digit? Also, I don't see a reason to escape the colon either, but maybe I'm just ignorant. I'm not exactly the top Regex person around.
-
In order to include dynamic options, the options MUST be in a database.
-
You simply add selected to the option tag Female If there's any HTML validity problems then you'll have to give selected a value of selected. Female
-
IMO, Wordpress, Drupal, Joomla, etcetera are all just a way to get the job of webmastering done more quickly and.... lazily. Most that decide to use Wordpress and such fall into one of either categories - The person is intelligent enough to click through steps to create a website - The person is too lazy to reinvent the wheel and suckers for a prefinished one. And lastly, If you haven't the slightest clue of what HTML is, you most likely have no understanding of the descriptions above
-
Those burning flames smell like a good lawsuit. @dreamwest: dude, you're totally fuckin' up the integrity of intellectual speak amongst this place. We can't have trolls masturbating to threads in Misc... that's really creepy.
-
Valuable knowledge is only a few well crafted questions away.
-
If you just recently received a bunch of blank emails, it's because all someone has to do, to do that, is navigate to your mail script. Then they can hit F5 to their hearts content and you'll get an email for everyone one. I didn't receive any errors when i went to your script and I don't understand why not. You're calling a $_POST variable without even checking to see if it exists first. Meanwhile, you're sending the email without even checking if the form's submit button was clicked. I'd say that is the reason
-
The best way I can think of..... is to have a chats table. One: The Chat Table (of course) consisting of: - id - message - fromUser - toUser - time In which, fromUser and toUser are just foreign keys of the table Users. and from that just store each message....
-
Yeah,.. I did think of that later. Taking the first, last or middle as the default in the sql trickery .... process, but in the end I persuaded the client to delete all the entered items and start from scratch. It seemed the easiest way to reset a database schema, especially when there were only 23 rows.
-
That did it Pica, 'preciate it. I knew there had to be some kind of SQL trickery to fix that.
-
It's only one trailing number.. I made an admin panel for someone thinking an SKU was unique. So they simply added a number to the end of the SKU and griped about it later. He only got up to as high as 4 in most cases so it's not too complex.
-
I wish I could just do that, but unfortunately some SKUs have 4 characters, some have 6, some 5, etc.. and that's excluding the trailing number.
-
I have one more MySQL situation at hand. This one involves taking off the trailing number of similar entries. Suppose, in my table... in some column.. lets say it's called SKU, I have the following entries. - SOSW SOSW1 SOSW2 SOSW3 SBIO SBIO1 SBIO2 SBIO3 Is there a quick query that I can use to change all those to SOSW SOSW SOSW SOSW SBIO SBIO SBIO SBIO
-
I got a MySQL situation here that I'm wondering if it has a simple solution before I got all manual labor data entry on it. At the moment, I have three tables... - defects - id (int) - name (varchar) - pallets - id (int) -a bunch of other pallet related fields - defected - id (int) - defect (int) - pallet (int) As you can see, that third table is a joining table for pallets with multiple defects. My problem now is that apparently I didn't have to go through all this multiple defect stuff because a pallet can only have one. My question is... Is there a simple query where I can Select the pallet id and defect id from defected... and use those to update a new defect column I'm gonna put into the pallets table?
-
you could perform a simple regex on the variable and get rid of eveything not INT $yourvariable = "something555somethingblah___!!###!@@3... and another 3"; $yourvariable = preg_replace("#([^a-z_-\.])#i", "$1", $yourvariable);
-
What Are Reasons to Learn Actual JavaScript When I have jQuery?
Zane replied to chaseman's topic in Javascript Help
Yeah, there are a few functions in JS that a debugger just can't do without.. such as alert() & confirm() and there are a few others I'm sure, but in all sincerity, at this point in time, when jQuery is so dominant, JS is only great for debugging. I can't see myself entering jQuery commands to check variables in a debugger. -
SELECT Notes.*, (SELECT Users.UserFirstName AS OnBehalfOfUserFirstName, Users.UserLastName AS OnBehalfOfUserLastName, FilesAndBillableRates.BillableRate FROM Users LEFT JOIN FilesAndBillableRates ON Users.UserID = FilesAndBillableRates.UserID WHERE UserID = Users.UserID) FROM Notes WHERE FileID = '{$_SESSION['FileID']}'" Perhaps a subquery SELECT would work.
-
Ok, let me get this right. You have a Form.. FormA which POSTs to info.php info.php displays a list of stuff dependent upon a text file and the username? and sendinfo2.php .... adds to the text file? Maybe it's the excess of forms, but I'm slightly confused. What exactly is wrong?
-
If nothing is being inserted and the query doesn't fail, it is most likely a datatype issue. Make sure the field isn't set to INT while you're trying to add words to it and vice versa.
-
SELECT A.user_id, A.ticketnumber, A.date, A.airline, A.commission, A.notes, B.department, B.id, SUM(A.commission) AS comTotal FROM ticket A, user B WHERE A.user_id = B.id ORDER BY A.airline
-
If you make it a string first then yeah. Otherwise, with your current code... no. example $sql = "SELECT * FROM table WHERE memberID = ".$User['memberID']; $query = mysql_query($sql); echo $sql;