RE: stupid error, please kick me (and send me a solution)

2002-06-03 Thread domi
Hi Jule !!! This can be a socket error. Sometimes when installing PHP/Mysql as binary dist PHP does not know where mysql socket is. The default is (AFAIK) /tmp/mysql.sock Make a test: Try to connect with mysql console with exactly the same info as You use in Your PHP script. shell# mysql

RE: Re: stupid error, please kick me (and send me a solution)

2002-06-03 Thread domi
Wait a second Is this a typo or what... $link_glob = mysql_connect('$host_glob', '$un_glob', '$pw_glob'); The qoutes around mysql_connect statement makes it to a string, nothing else but a STRING !! So it will never get executed !! And '$link_glob' is either a link recource its just

RE: RE: MS Access Queries

2002-06-02 Thread domi
Hi !! uhh, this sounds really stupid to be honest :-) My first thought is, If they are so deep in MS junk why should they port to PHP/MySQL in the first place ?? I think it's definitely easier to give then a quick-course in PHP than writing these kind of workarounds... You could maybe write

RE: I need 50.000 inserts / second

2002-05-31 Thread domi
Hi !! You could maybe buffer the data in Your application and then run inserts later... like this. struct oneRow{ double timestamp; double data; etc, etc } struct oneRow rows[num_of_rows]; for (int i = 1; i num_of_rows; i++) { // collect data rows[i].timestamp = (double) i;

RE: RE: client server

2002-05-22 Thread domi
Hi Jakob !! If I install MySQL on the same server as Apache Php and only use MySQL in Php, do I then have to install the MySQL client? Technically, you don't need it. But when I am debugging PHP, I often turn to mysql client just for a sanity check on a query. If your

RE: Backslash BUG?

2002-05-22 Thread domi
Hi Bruno !! Nope, the query OK is NOT skipped but the query has not been executed at all !! And this is not a bug !!! The backslash in Your query escapes the following single quote and the query will not be terminated by ; . You should propably escape the backslash instead like this mysql

RE: Re: Insert dates with PHP

2002-05-15 Thread domi
Hi ! You said anything about connecting to mysql. You need to go through 2 steps before mysql_query(). These are mysql_connect() mysql_select_db() please check the URL below, everything is explained very clearly. http://www.php.net/manual/en/function.mysql-query.php You could also tell us

RE: Re: Qoute

2002-05-10 Thread domi
Well... This seems to be a typical tricky-goute-on-qoute thing... I recommend you to test your query in mysql client directly (if you havn't already done that). And THEN take the battle with perls quoting mechanism... Another tip is to just print the query before executing so You can see

RE: VC++ functions for mysql

2002-05-05 Thread domi
If You're using VC++ so I recommend You to test run Your app within VC++ IDE. Then You can step through your code , line by line and check for variables if they are what You think they are. A very easy and effective way to find errors !! --- =d0Mi= ,

RE: Parsing SQL statements

2002-05-04 Thread domi
It would be nice to know what You're actually trying to do... How do You want the get Your query back.. eh... parsed... ??? Or do You simply want to errocheck Your queries... ?? In this case You could run an EXPLAIN your query Query. And then check for errors if any... =d0Mi= DCS.net

RE: Re: How to Count(*) with LIMIT

2002-05-02 Thread domi
I have a Where clause like: select count(*) from table where LIMIT 100 Unfortunately the Count(*) ignores the LIMIT clause entirely. Why? Because the query returns only ONE row and LIMIT limits rows, not values. See ex. below: SELECT count(login) FROM accounts WHERE

RE: How to Count(*) with LIMIT

2002-05-02 Thread domi
Hi Again... !! It is used to set up the navigator bar buttons for the grid on the web page (PHP) so it says Page 1 of 18 with buttons on either side of it. I'm a bit confused now... You are building a pager to a webpage, right ?? But, if You select with LIMIT 100 then I assume

memory leaks in libmysqlclient.

2002-04-25 Thread domi
Hi ! I've made a quite simple program in C using libmysqlclient. The program runs as daemon in Solaris 8 (sparc) and checks some values in the database every 5 minutes. I have only ONE malloc/realloc call in my code and this code is called only when needed (when DB check is signaling it to do

RE: memory leaks in libmysqlclient.

2002-04-25 Thread domi
in libmysqlclient. dOMi writes: However, after only a week the memory usage ocf this process has been grown to 40 - 50 MB so there's have to leakage somewhere. What you *may* be seeing is standard memory fragmentation that many Unix' systems have with the standard allocator.. You don't mention what

Re: Help needen on query

2002-04-23 Thread domi
Hi all !! This is just great ! Sometimes things seem to be more complicated than they actually are. I needed (and still do) a similar solution to check if an IP adress exist in a table. And sometimes the argument in the query is a whole subnet like 192.168.0.% I guess this will do the job for