Forum: PHP Mar 31st, 2008 |
| Replies: 2 Views: 2,420 There's nothing like posting a question to find the answer yourself shortly after...
I solved my problem by adding this at the beginning of my script:
putenv("PATH=" .$_ENV["PATH"].... |
Forum: PHP Mar 28th, 2008 |
| Replies: 2 Views: 2,420 Hi all,
I'm using exec() to launch external commands from a web application under OS X Leopard. To put my problem in context, when I launch this:
exec ("export", $output);
I get this:
... |
Forum: PHP Mar 11th, 2008 |
| Replies: 35 Views: 2,674 Actually, mysql is connect to PHP, not to Apache and no, they don't have to be in the same directory. The php.ini file on your system must have a line like this:
extension=mysql.so (or mysql.dll... |
Forum: PHP Mar 11th, 2008 |
| Replies: 35 Views: 2,674 I remember having connection problems when I started which I resolved by appending the mysql socket address to the host.
mysql_connect (host:socket, username, password)
I can't remember... |
Forum: PHP Mar 11th, 2008 |
| Replies: 35 Views: 2,674 Try opening a command window and check if you can connect with the root user and 'password' as a password:
> mysql -u root -p
Enter password: password
(make sure the mysql command is in your... |
Forum: PHP Mar 11th, 2008 |
| Replies: 35 Views: 2,674 Since it's the only place left with no error detection, how about trying:
if (!mysql_select_db("users", $con))
die ("Database 'users' not found"); |
Forum: PHP Mar 11th, 2008 |
| Replies: 2 Views: 1,885 Do you have any knowledge of web programming? Database design?
I suggest you buy yourself a good book to get started, something like this (http://www.oreilly.com/catalog/webdbapps2/) or this... |
Forum: PHP Mar 10th, 2008 |
| Replies: 15 Views: 1,152 |
Forum: PHP Mar 10th, 2008 |
| Replies: 15 Views: 1,152 So...
$query = "SELECT kusy FROM ciste_media WHERE medium='$medium' AND typ='$typ' AND kusy=$kusy AND obal='$obal' AND znacka like '%$vyraz%' ORDER BY kusy ASC";
die ($query); |
Forum: PHP Mar 10th, 2008 |
| Replies: 15 Views: 1,152 Oops, $kuzy should be $kusy, my mistake.
Also, %vyraz% should be %$vyraz%, my mistake again... I apologize, I don't know these words... ;) |
Forum: PHP Mar 10th, 2008 |
| Replies: 15 Views: 1,152 I'm looking at your previous reply (#7) in more detail now and I just noticed that a few things have changed since your reply #5.
Try this:
$query = "SELECT kuzy FROM ciste_media WHERE... |
Forum: PHP Mar 10th, 2008 |
| Replies: 15 Views: 1,152 Ah yes, also I never had any luck with select * from... Try selecting specific fields (for example select field1, field2 from ...). |
Forum: PHP Mar 10th, 2008 |
| Replies: 15 Views: 1,152 It appears you would need single quotes around your text litterals, like this:
select * from ciste_media where medium='CD' and typ='R' and kusy=15 and obal='rolka' and znacka like '%verbatim%'... |
Forum: PHP Mar 10th, 2008 |
| Replies: 15 Views: 1,152 A good way to debug this is to run this command before you run the mysql_query:
die ($query);
It will list the content of the $query variable and stop the script. Could you post the result? |
Forum: PHP Mar 10th, 2008 |
| Replies: 8 Views: 847 Did you give you file a .php extension or .htm? It needs .php in order to work. |