Search Results

Showing results 1 to 15 of 15
Search took 0.01 seconds.
Search: Posts Made By: LeBurt ; Forum: PHP and child forums
Forum: PHP Mar 31st, 2008
Replies: 2
Views: 2,420
Posted By LeBurt
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
Posted By LeBurt
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
Posted By LeBurt
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
Posted By LeBurt
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
Posted By LeBurt
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
Posted By LeBurt
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
Posted By LeBurt
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
Posted By LeBurt
You're welcome!
Forum: PHP Mar 10th, 2008
Replies: 15
Views: 1,152
Posted By LeBurt
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
Posted By LeBurt
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
Posted By LeBurt
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
Posted By LeBurt
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
Posted By LeBurt
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
Posted By LeBurt
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
Posted By LeBurt
Did you give you file a .php extension or .htm? It needs .php in order to work.
Showing results 1 to 15 of 15

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC