zq29
-
Posts
2,752 -
Joined
-
Last visited
-
Days Won
1
Posts posted by zq29
-
-
-
Best place for dedicated windows server?
Probably the bin. ;-)
Haha! I was SO coming in here to say the same thing!
What country are you in?
-
I think levenshtein(), soundex() and metaphone() are pretty bad-ass. I've not yet had a requirement for soundex() or metaphone() though.
-
I'd suggest reading up on database normalization, there is a good article over on the MySQL website: http://dev.mysql.com/tech-resources/articles/intro-to-normalization.html
-
Caps lock is cruise control for awesome!
-
The way I see it, is that a script (or collection of) is not a derivative of the interpreter in any way or form. I think they're talking about someone using the source code of PHP itself and then using "PHP" in the name for whatever it is that was built using the code.
I can't imagine that all of these packages floating around on the web with "PHP" in their title have gained permission for it, but that doesn't make it right. If "PHP" is trademarked, registered or copywritten, you should be asking to use it in any form. But I can't imagine it is, as they're not doing to well at protecting it. Did we get permission to use it in our website name? I doubt it.
-
I very much doubt this is a widespread issue.
remember there getting in the back end of the hard drive to replace the index.php file.((remember there getting into the main host's hard drives(( your not getting hacked directly throw your account or accounts...[attachment deleted by admin]
-
You might want to look into BETWEEN...
SELECT * FROM `foo` WHERE `bar` BETWEEN 0 AND 24;
-
What is PHP?
The latest thing the kids are smoking these days, isn't it?
-
"desc" is a reserved word in MySQL, you'll need to surround it in backticks (`) - It is good practice to surround your table and field names with backticks, anyway.
$insert = "UPDATE `inventory` SET `item`='$item', `desc`='$desc', `category`='$category', `qty`='$qty', `cost`='$cost', `retail`='$retail' WHERE `item`='$item'";
-
Errors are not always on the line that the PHP interpreter says they're on, it could be on a line or two above - You might be missing a semi-colon on the line above, for example.
-
Something like this?
foreach(glob("/path/to/files/*") as $f) { $acc = substr($f,0,strrpos($f,".")); $tel = mysql_result(mysql_query("SELECT `tel` FROM `table` WHERE `account`='$acc' LIMIT 1"),0); $c = file_get_contents($f); $h = fopen("/path/to/files/$tel","r"); fwrite($h,$c); fclose($h); }
This is NOT tested!
-
I use Geany for PHP, and for MySQL work I use MySQL Workbench initially for designing the database, then phpMyAdmin once the database has been built.
-
That would be to transfer the domain to another registrar, such as 123-reg or 1&1, or whatever. You will then pay the new company to renew your domain rather than BT, you'll also have more control over the settings, such as nameservers. To do this, you normally just give BT the new registrars IPS Tag, then they transfer it, you then set-up a transfer in your account with the new registrar to "receive" the transfer.
To avoid all of that though, you just need to ask BT to change the nameservers associated with your domain.
-
I wasn't totally sure how to define what it is I'm talking about, so I'll stick with "Variable foreign keys" for the time being, until someone can identify what it is!
Consider a scenario where a website is selling completely different types of product with different attributes. For this example, lets say we're selling tickets, packages and memberships. Each of these types of product have their own tables in the database - ticket, package and membership. For the sake of simplicity, there is also customer and purchase.
My dilemma surfaces when deciding how to track the purchase of any/all of these products by a user. The way I see it, I have two options. Using what I have defined as a "variable foreign key", or restructuring the database slightly.
Variable Foreign Key
This would be where I have (amongst the usual stuff) the fields type and foreign_id within the purchase table, where type would be an ENUM with the possible values T, P and M (ticket, package, membership) and foreign_id would refer to the id field within either the ticket, package or membership table. This would involve less code, logic and shorter queries, but I am concerned that this might be unconventional/frowned upon in database design.
Database Restructure
I haven't thought this through to conclusion, but I don't see why it shouldn't work - But this, I'd imagine, would require more work on the scripting / logic side. This would involve the creation of a further table, item, which contains the common fields of ticket, package and membership (potentially id, name, price) and a one-to-one relationship from item to those three tables to cover the uncommon attributes. The purchase table would then just refer to item(id).
So, are "variable foreign keys" a sensible design decision, would restructuring the database (my way, or a better suggested way) be the more conventional method, or is there a common solution to this problem that I'm just flat out missing? Is this just a silly post? I would have normally just gone with my "variable foreign keys" concoction, but I have recently been re-reading a bunch of resources on database design, relationships and normalization in the hope to get rid of some bad habits I might have picked up since I first learnt database design x years ago...
-
We had a client that bought their domain via BT a while back - I remember not being able to find these settings either. I think we phoned BT and they made the changes for us while I was on the phone to them.
-
Sorted
And for those that might have the same question - How did you resolve it?
-
I've had it returned a couple of times when searching for stuff on Google - It has never had the answer to the issues I have searched for though.
-
-
Personally, I find it a lot easier and a better use of my time to pay someone to do design work rather than piss around for hours in The GIMP (or Photoshop) and still not be happy with the results. A quick search on Google for logo designers unearthed the following sites:
-
http://www.mycustomlogo.com/
-
http://www.logodepot.co.uk/
-
http://www.uk-logo.com
-
http://www.thelogoloft.com/samples/2.html
Their portfolios look great in my opinion, and I'm sure there are thousands more of these companies around. I think it makes much more sense spending a couple of hundred Pounds / Dollars (or even less than 100 in some cases) for something that will look hundreds of times better than anything I could produce while I'm earning money by doing what I can do well.
I have no affiliation with the websites listed, they were on the first page of Google for my search term.
-
http://www.mycustomlogo.com/
-
Amazon? You can review books for sale there - And probably almost all other online book shops.
-
So if a moderator could just confirm that phpfreaks does not want such a bot then I shall mark this topic solved.
I am a moderator, and I can confirm that PHPFreaks does not want such a bot. I have marked this topic as solved for you.
-
Yes, definitely.
-
Took me a while, but I beat it in the end.
[SOLVED] need help to creat database
in PHP Coding Help
Posted
Why not post up what you have done, with an explanation of what it is doing, and what it should be doing. We can then point you in the right direction, rather than doing it for you.