Re: [PHP-DB] Joinging two different mySQL result?

2004-08-15 Thread Kim Steinhaug
, company as name, 1 as fromtable FROM blabla) UNION (SELECT id, name, 2 as fromtable FROM blabla) Its not an optimal query thats for sure, but it makes the PHP code 10 times easier and the result is just marvelous. To think that I forgot all abou the UNION command, a shame, :D -- Kim Steinhaug

Re: [PHP-DB] Joinging two different mySQL result?

2004-08-14 Thread Kim Steinhaug
resultsset but this will work like a charm, :D Kim Steinhaug - There are 10 types of people when it comes to binary numbers: those who understand them, and thos

[PHP-DB] Re: Joinging two different mySQL result?

2004-08-14 Thread Kim Steinhaug
vn` varchar(50) NOT NULL default '', `ladresse` varchar(100) NOT NULL default '', `lpbox` varchar(100) NOT NULL default '', `lpostnummer` varchar(10) NOT NULL default '', `lpoststed` varchar(3

[PHP-DB] Joinging two different mySQL result?

2004-08-14 Thread Kim Steinhaug
from cache table Anyone have some points on this? I would maby think alternative 3 would be best, or maby alternative 2? Maby you have some other alternatives? -- Kim Steinhaug - There are 10 types of people when it come

Re: [PHP-DB] Mysql and rollbacks

2004-07-13 Thread Kim Steinhaug
I was about to suggest the same, the latest builds of MySQL have theese functions from what I knew... I think youll find what you need there. -- Kim Steinhaug - There are 10 types of people when it comes to binary numbers

[PHP-DB] Re: addslashes replacement?

2004-06-30 Thread Kim Steinhaug
Take a look at the php website on the function addslashes. You will find an example with the functions reslash and reslash. You might have some problems regarding magic_quotes. Ive been using the reslash and deslash for some time now without any problems. It might solve your problems. -- Kim

[PHP-DB] Re: problem....

2004-06-23 Thread Kim Steinhaug
rname FROM RuneRunner WHERE User_ID=3; -- -- Kim Steinhaug -- There are 10 types of people when it comes to binary numbers: those who understand them, and those

[PHP-DB] Re: Multiple Inserts

2004-06-22 Thread Kim Steinhaug
#x27;,'$TimesheetDate','$ProspectiveOrRetr ospective')"; echo 'Query : ' . $sql . "\n"; $result_timesheet=mysql_query($sql)or die("Insert Error: ".mysql_error()); It would atleast give you a good feeling on the data getting passed to mySQL if yo

Re: [PHP-DB] value error in PHP form

2004-06-20 Thread Kim Steinhaug
t;buggers" of programming PHP - so do it now, :) You wont regret it I promise you. -- -- Kim Steinhaug -- There are 10 types of people when it comes to binary numbers: those who unders

Re: [PHP-DB] content managment systems

2004-06-20 Thread Kim Steinhaug
I love that site, really the best way to get familiar with the common systems out there. -- -- Kim Steinhaug -- There are 10 types of people when it comes to binary numbers: those who understand them, and those who don&#

[PHP-DB] Re: mysql and indexes

2004-06-20 Thread Kim Steinhaug
should be avoided since there are no reason to have them. -- -- Kim Steinhaug -- There are 10 types of people when it comes to binary numbers: those who understand them, and those who don&#

Re: [PHP-DB] Re: HTTP header information

2004-06-12 Thread Kim Steinhaug
rinted out before my validation of the login, and the user accually got the content he wasnt allowed to see, :) This is abit off topic, but you never know. Headers are headers, and small things are small things... Good luck. -- -- Kim

[PHP-DB] Re: Count unique visits in PHP/MySQL

2004-06-09 Thread Kim Steinhaug
; and browsersession = '" . $browsersession . "'"; 3If (!mysql_affected_rows()){ // Update the Unique visitor table // Insert new entry with IP, Browsersession and time() into the online database } As

Re: [PHP-DB] Combining 2 queries into 1?

2004-05-30 Thread Kim Steinhaug
. -- -- Kim Steinhaug -- There are 10 types of people when it comes to binary numbers: those who understand them, and those who don't. -- www.steinhau

[PHP-DB] Re: Combining 2 queries into 1?

2004-05-30 Thread Kim Steinhaug
sekunder, 2x queries. 500x Test 2 in 0.3949 sekunder, combo query. -- -- Kim Steinhaug -- There are 10 types of people when it comes to binary numbers: those who understand them, and those who don&#

[PHP-DB] Re: Combining 2 queries into 1?

2004-05-30 Thread Kim Steinhaug
into one. Thanks in advance. -- -- Kim Steinhaug -- There are 10 types of people when it comes to binary numbers: those who understand them, and those who don&#

[PHP-DB] Combining 2 queries into 1?

2004-05-30 Thread Kim Steinhaug
is NULL for anonymous and 1 for user if this makes is easier to group the the query in some wmart way I havnt figured out at the moment. -- -- Kim Steinhaug -- There are 10 types of people when it comes to binary numbers: those

[PHP-DB] Re: another strange MYSQL problem

2004-05-09 Thread Kim Steinhaug
What I suggest you do, run phpMyAdmin (Or whatever you use) and dump the table structure for your table. Also give us a few lines of typical data from your table. Your queries looks correct to me. -- -- Kim Steinhaug -- There

Re: [PHP-DB] Procedure for submitting an order via email

2004-05-09 Thread Kim Steinhaug
looking for. -- -- Kim Steinhaug -- There are 10 types of people when it comes to binary numbers: those who understand them, and those who don&#

[PHP-DB] Re: merging a table from multiple servers

2004-05-09 Thread Kim Steinhaug
this script so that it doesnt run on every pageload, maby once an hour or something. I hope you got the the hang of it. -- -- Kim Steinhaug -- There are 10 types of people when it comes to binary numbers: those who

[PHP-DB] Re: merging a table from multiple servers

2004-05-07 Thread Kim Steinhaug
connections on their MySQL from your host, which I would think would be alot of work to accomplish. Preparing datasets on the different servers with a script sounds much more simple in my opinion, after all this script will only be "updated" at given intervals. -- -- Kim

[PHP-DB] Re: Optimize Tables

2004-05-07 Thread Kim Steinhaug
. Gives you larger tables, but no overhead. I guess you have made indexes for your database if you have a lot of select in it, thats far more important than optimizing at the moment. -- -- Kim Steinhaug -- There are 10 types of

[PHP-DB] Re: get rid of the HTML tags

2004-04-14 Thread Kim Steinhaug
This is probably the wrong forum, since it isnt DB related. However look at this : http://se2.php.net/manual/en/function.strip-tags.php -- -- Kim Steinhaug -- There are 10 types of people when it comes to binary numbers: those

Re: [PHP-DB] How to get only 2nd row in result set ???

2004-04-05 Thread Kim Steinhaug
DOH! - A private message arrived read below When you mention it, ofcourse this is the correct (and sane sollution). I guess I was giving more flesh to the bone that the previous poster posted. Looping through when limit is there is plain and simple stupid... Shame on me! :) Kim Steinhaug

Re: [PHP-DB] How to get only 2nd row in result set ???

2004-04-04 Thread Kim Steinhaug
I would say the same, do the query and then a loop through the results. Skip the first one and output the second, eg. $levels = mysql_query("SELECT levelID from hf_levels ORDER BY levelorder > RB> DESC LIMIT 2") or die('Unable to get levels'.mysql_error()); for($i=0;$i wrote in message news:[EMAI

[PHP-DB] Re: Newbie question

2004-03-30 Thread Kim Steinhaug
would be, on the second page, and I also prefer echo instead of print. echo "Hello " . $_POST["name"] . "!"; or echo 'Hello ' . $_POST["name"] . '!'; -- -- Kim Steinhaug -

[PHP-DB] Re: Tree structure - how to show only current branch ??

2004-03-30 Thread Kim Steinhaug
s was just swada.. :) -- -- Kim Steinhaug -- There are 10 types of people when it comes to binary numbers: those who understand them, and those

[PHP-DB] MySQL MaxDB mode

2004-02-20 Thread Kim Steinhaug
. -- -- Kim Steinhaug -- There are 10 types of people when it comes to binary numbers: those who understand them, and those who don't. -- www.steinhau

[PHP-DB] Re: Selecting between using letters

2003-12-30 Thread Kim Steinhaug
for. Remember ofcourse that you wuld need to use the regex syntax. The page on mySQL covering the topic has a lot of examples. -- Kim Steinhaug --- There are 10 types of people when it comes to binary numbers: those who understand them

[PHP-DB] Re: Downloading PHP source from a PHP filename, possible?

2003-12-01 Thread Kim Steinhaug
What you do is, if my logic is correct... Read the entire file in to a variable and send it back to the browser with another header information, typicall TEXT. Just like the force download method for a PDF file, or other files. This should work very well. -- Kim Steinhaug

Re: [PHP-DB] Empty Table command?

2003-11-27 Thread Kim Steinhaug
As said yes, you just launch your old fashioned delete from statement, without any where clause, mySQL will interpret this as everything (which is infact what it does, it maches everything and therefor deletes everything). -- Kim Steinhaug

[PHP-DB] Re: send email

2003-11-25 Thread Kim Steinhaug
run into problems using it, :) -- Kim Steinhaug --- There are 10 types of people when it comes to binary numbers: those who understand them, and those who don't. --- &q

[PHP-DB] Re: Validating a Session value

2003-11-25 Thread Kim Steinhaug
ion_fee; Have another go! -- Kim Steinhaug --- There are 10 types of people when it comes to binary numbers: those who understand them, and those who don't. --- "

Re: AW: [PHP-DB] image resizing

2003-11-25 Thread Kim Steinhaug
GD just released on phpclasses.org by the way. You need however to reprogram some og the scaling functions, as they are a bit "unfinnished". I use GD as a "backup", in case ImageMagick isnt present on the server. But then I get those blurry ones I dont like..

Re: [PHP-DB] PHP problem

2003-11-24 Thread Kim Steinhaug
4 words! i dont believe you! -- Kim Steinhaug --- There are 10 types of people when it comes to binary numbers: those who understand them, and those who don't. --- &qu

[PHP-DB] Re: Mail problem

2003-11-24 Thread Kim Steinhaug
u should be just fine. Happy programming! -- Kim Steinhaug --- There are 10 types of people when it comes to binary numbers: those who understand them, and those who don't. ---

[PHP-DB] Re: sendmail

2003-11-24 Thread Kim Steinhaug
You should check out phpmailer at sourceforge. It solved all my problems, and will probably solve all yours to. As a bonus, you get a mailer that has a lot of more functions, like attachements and HTML mail and such. -- Kim Steinhaug

[PHP-DB] Re: Quering the mySQL DB for statistics results - best way of doing

2003-11-24 Thread Kim Steinhaug
ou do: > > SELECT COUNT(*) count, ip, FROM stats GROUP BY ip > > Justin Patrin wrote: > > > You can do it all in one query, just as you're already doing it: > > > > SELECT COUNT(*) AS count FROM stats GROUP BY ip > > > > Kim Steinhaug wrote: >

[PHP-DB] Quering the mySQL DB for statistics results - best way of doing this

2003-11-24 Thread Kim Steinhaug
r way? This is just one problem, other reports may dig further into the database and require more queries if using the above method. By the way, if you know of any recourses for report making and such I would love to see them, :) -- Kim Steinhaug ---

[PHP-DB] Re: debugging / help required urgently.

2003-11-21 Thread Kim Steinhaug
alter 1 line and everything is online again. mail() function may be more than good enough, but you might want to check out the phpmailer which is quite awesome! -- Kim Steinhaug --- There are 10 types of people when it comes to binary

Re: [PHP-DB] Optimal mySQL query for next prev page system

2003-11-19 Thread Kim Steinhaug
Thanks for the replies. Its time for me to start do some patching for my SQL statement, :) -- Kim Steinhaug --- There are 10 types of people when it comes to binary numbers: those who understand them, and those who don&#

[PHP-DB] Optimal mySQL query for next prev page system

2003-11-18 Thread Kim Steinhaug
surtain work other than what you preferr yourself? Why repair things that already work is the thing I say all day long, but I do think however its time to start optimizing my work before my machinery are all buildt upon old rusty cogs, :) -- Kim Steinhaug

Re: [PHP-DB] using code for multiple sites

2003-11-14 Thread Kim Steinhaug
more, but same directory) that I have to update. This makes it easy in my opinion, just connect with FTP - > Update the files and Im down. -- Kim Steinhaug --- There are 10 types of people when it comes to binary numbers: those who un

[PHP-DB] Re: Applications using multiple databases

2003-11-14 Thread Kim Steinhaug
which encrypts the code and renders it useless for reverse engineering. :) You might want to do the same. Kim Steinhaug --- There are 10 types of people when it comes to binary numbers: those who understand them, and those who don't. -