Hello,
Wondering if there is any php script out there which takes an sql db and diagramatically shows the entire thing (along with relationships)? Similar to what most mysql tools offer for desktop.
Thank you very much.
...
My next web application project will make extensive use of Unicode. I usually use PHP and CodeIgniter however Unicode is not one of PHP's strong points.
Is there a PHP tool out there that can help me get Unicode working well in PHP?
Or should I take the opportunity to look into alternatives such as Python?
...
Hi
My team is developing a large music portal in PHP. It is hoped that the portal will have 1 million+ users within a year of its launch. The portal will allow users to create playlists, stream and download music.
Till now, we have developed applications that have been used by a maximum of about a 1000 simultaneous users. This portal ...
Hi Everyone,
My script is generating a very long URL just like the one below and I wonder how this can be shorten with an algorithm or technique?
This is the long URL:
http://example.com/script.php?param1=value1&param2=value2&param3=value3&param4=value4&param5=value5
I want to shorten it to something like this:
http://...
I am looking at using an ORM in PHP for the first time. Until now my PHP projects have been fairly small and an ORM seemed like overkill.
I really like NHibernate so I was hoping that there is an ORM out there for PHP that works and is configured similarly to NHibernate. If there is one with a fluent interface like Fluent NHibernate tha...
We have a website built in PHP and are trying to enable it to talk to couple of services that are going to be written in WCF and follow REST Style architecture for web services.
Anybody have any best practices? issues?
...
Currently in my PHP scripts, I redirect the user to a custom 404 not found error page when he/she tries to access content that doesn't exist or doesn't belong to that user. Like so:
header('Location: http://www.mydomain.com/error/notfound/');
exit;
I realize the above header() call sends a 302 redirect status code by default.
What I ...
I use Notepad++ and Aptana for editing my CakePHP code? Is there any way to get basic html syntax highlighting for CakePHP's .ctp template files? It's a lot harder for me without any coloring going on. Any ideas?
...
For a long time in the Java/JSP world I used to use the Display Tag library to generate a table that would allow you to sort a table, and export the table as a CSV file.
Is there anything like this in a PHP library that I could use?
...
How do i add items into a multidimensional array? Basically i am making an application which calculates what people are buying in a suppermarket and how much of it.
Sue buys 2 tubs of butter and 1.
toothpaste
John buys 1 peach and 1 banana.
I think the array would look something like this
$sue[butter] = array();
$sue[butt...
I got the following code from this question: http://stackoverflow.com/questions/539920/what-is-the-best-way-to-clean-a-string-for-placement-in-a-url-like-the-question
$str = strtolower(
preg_replace( array('/[^a-z0-9\- ]/i', '/[ \-]+/'), array('', '-'),
$urlPart ) );
This code works for me with PHP, its making clean and SEO'd ur...
Hi!
I'm trying to update my current project from 1.7 to 1.8. What do I have to change so that it does not break?
...
I am working in PHP.
Please what's the proper way of inserting new records into the DB, which has unique field.
I am inserting lot of records in a batch and I just want the new ones to be inserted and I don't want any error for the duplicate entry.
Is there only way to first make a SELECT and to see if the entry is already there before...
Hi, normally, the practice or very old way of displaying some profile page is like this:
www.domain.com/profile.php?u=12345
where u=12345 is the user id.
recent years, I found some website, their url very nice, its like:
www.domain.com/profile/12345
How do I do this in php? Please teach me, thanks
EDIT:
Just a wild guess, is it some...
After I authenticate user login info, i create this session for them:
$_SESSION['username']= $userName;
Then, I redirect them like this:
header('Location:www.domain.com/profile/' . $_SESSION['username'];
I want my website to have a beauty URL, something like: www.domain.com/profile/userName
Thus, in all my redirect links (HTML <a...
I'm escaping all the string parameters I receive from a php form like this:
$usr_name = mysql_real_escape_string($_REQUEST['usr_name']);
to avoid a few problems with SQL Injection. But when I my string back from the function, I end up with nothing.
Also I keep getting this weird warning in my PHP log:
PHP Warning: mysql_real_escap...
Because the float data type in PHP is inaccurate, and a FLOAT in MySQL takes up more space than an INT (and is inaccurate), I always store prices as INTs, multipling by 100 before storing to ensure we have exactly 2 decimal places of precision. However I believe PHP is misbehaving. Example code:
echo "<pre>";
$price = "1.15";
echo "Pri...
Im having a small problem with storage of special characters like quotes, double quotes and ampersands. I put every POST request through mysql_real_escape_string(), and when I add a string like "That '70s Show" it gets stored as "That '70s Show" in the mysql DB. When I echo it out, it works fine... but when I try to run a % $string ...
I've got a model (Listings) that has and belongs to a few different models, I'd like to find all of this model where it's related model (Openhouses) have a condition. The 'has and belongs to' are setup in the model files. Listings hasmany Openhouses and Openhouses belong to Listings. (And listings has many and blongs to a few other model...
I have a big problem opening http://localhost/ on Windows 7 (beta). I installed this os and everything went great; when I installed Wamp I saw that localhost is not working at all. I just see this error:
Failed to Connect
Firefox can't establish a connection to the server at localhost.
in Mozilla and Explorer.
I removed Wamp ...