Re: [PHP-DB] Parsing Error

2001-09-05 Thread Bas Jobsen
Maybe rename your page to loose.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]

[PHP-DB] MYSQL/PHP what is the difference between unset() and mysql_free_result() ?

2001-09-05 Thread Bas Jobsen
Hello, Maybe someone can tell me, the difference b.e. $result = mysql_query ($query); unset($result); #or better mysql_free_result($result); tnx, Bas Jobsen -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e

Re: [PHP-DB] Forms Question

2001-09-05 Thread Bas Jobsen
Hello, Here is the code I have: sure, your query is something like: select ..., store, jobdesc .. FROM .. why using: $store=$row[store]; $jobdesc=$row[jobdesc]; echodhdhdh.$row[store].blabla would also work i should use: while (LIST($store,$jobdesc)=mysql_fetch_row($result))

Re: [PHP-DB] MYSQL/PHP what is the difference between unset() and mysql_free_result() ?

2001-09-05 Thread Bas Jobsen
Hello, unset() simply deletes the pointer to the data without releasing the space held by the data. mysql_free_result() releases the data storage pointed-to by the $result pointer. This is important because $result could be pointing-to a dataspace containing a large number or rows returned

Re: [PHP-DB] MYSQL/PHP what is the difference between unset() and mysql_free_result() ?

2001-09-06 Thread Bas Jobsen
And how can i free the data-space from a string or somting like that? b.e. $string=a very long string; free($string);#? #could i use mysql_free_result($string); Maybe I can use: unset($string=); or unset($array=array()); to free the data-space also -- PHP Database Mailing List

[PHP-DB] SQL combine to summations queries?

2001-09-06 Thread Bas Jobsen
Hello, I don't understand the following, who can help? I have got two queries: SELECT SUM(fielda) FROM table1 and SELECT SUM(fieldb) FROM table2 I thought this would be the same as: SELECT SUM(fielda.table1),SUM(fieldb.table2) FROM table1, table2. But, itn't, why? Tnx, Bas Jobsen -- PHP

Re: [PHP-DB] SQL combine to summations queries?

2001-09-06 Thread Bas Jobsen
To do what I think you are trying to do you would use something like: Select sum(table1.fielda),sum(table2.fieldb) from table1 LEFT JOIN table2 ON table1.id=table2.id; if table1.fielda has more rows. If table2.fieldb has more rows use: the amount of rows is the same :) Select

Re: [PHP-DB] currency out of postgresql

2001-09-14 Thread Bas Jobsen
$formatted = sprintf(%01.2f, $money); printf (td align=\center\%01.2f/td/tr\n, $formatted); maybe twice, try: $formatted = sprintf(%01.2f, $money); echo td align=\center\$formatted/td/tr\n; - Original Message - From: Rick Eicher II [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent:

Re: [PHP-DB] include_path

2001-09-17 Thread Bas Jobsen
place connect.php in teh same dir as confirmregistration.php (/mall/) - Original Message - From: its me [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, September 18, 2001 12:50 AM Subject: [PHP-DB] include_path Fatal error: Failed opening required 'connect.php'

[PHP-DB] MYSQL/PHP what is the difference between unset() and mysql_free_result() ? II

2001-09-18 Thread Bas Jobsen
here? Tnx, Bas Jobsen -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]

[PHP-DB] Howto make a double LEFT JOIN

2001-10-02 Thread Bas Jobsen
Hello, How can i make a double LEFT JOIN? Now i have got: SELECT table1.id FROM table1 LEFT JOIN (table2 LEFT JOIN table3 ON table2.id=table3.id) ON table1.id=table2.id but this gives an error Tnx, Bas -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL

Re: [PHP-DB] Howto make a double LEFT JOIN

2001-10-02 Thread Bas Jobsen
Remove the parentheses SELECT table1.id FROM table1 LEFT JOIN table2 LEFT JOIN table3 ON table2.id=table3.id ON table1.id=table2.id I still got: MySQL retourneerde: You have an error in your SQL syntax near 'LEFT JOIN table3 ON table2.id=table3.id ON table1.id=table2.id' at line 1 -- PHP

Re: [PHP-DB] Howto make a double LEFT JOIN

2001-10-02 Thread Bas Jobsen
Emery [EMAIL PROTECTED] To: 'Bas Jobsen' [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, October 02, 2001 10:19 PM Subject: RE: [PHP-DB] Howto make a double LEFT JOIN SELECT table1.id FROM table1 LEFT JOIN table2 ON table1.id=table2.id LEFT JOIN table3 ON table2.id=table3.id -Original

Re: [PHP-DB] Howto make a double LEFT JOIN

2001-10-02 Thread Bas Jobsen
=table2.id LEFT JOIN table3 ON table2.id=table3.id GROUP BY test ORDER BY tot DESC gives: test|tot|SUM(table3.no) 1|6|6 2|0|0 and i want to have: test|tot|SUM(table3.no) 1|2|3 2|0|0 Tnx, Bas - Original Message - From: Rick Emery [EMAIL PROTECTED] To: 'Bas Jobsen' [EMAIL PROTECTED

Re: [PHP-DB] Howto make a double LEFT JOIN

2001-10-04 Thread Bas Jobsen
)) should do the trick, but it doesn't? Best regards, Bas - Original Message - From: Sheridan Saint-Michel [EMAIL PROTECTED] To: Bas Jobsen [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Thursday, October 04, 2001 8:02 PM Subject: Re: [PHP-DB] Howto make a double LEFT JOIN Sheridan Saint-Michel

[PHP-DB] bitshift

2001-10-05 Thread Bas Jobsen
Hello, bit_count(bit_or(1table1.sid)) can i use this on a field char(32)? i tried bit_count(bit_or(256table1.sid)) but it doesn't seem to work. (cause i thought 32byte is 8x32 bits) Best regards, Bas -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL

Re: [PHP-DB] Howto make a double LEFT JOIN

2001-10-05 Thread Bas Jobsen
Hello, okay... 1table1.sid is leftshift the number 1 table1.sid times. Your result will be a binary number... which will be the number 1 followed by table1.sid 0's. Once you have this you do a bitwise or of all the numbers you have shifted. This means any two rows where sid was the same

Re: [PHP-DB] Question In French.

2001-10-18 Thread Bas Jobsen
? switch($colonne[LIV_TYPE_EVT]) { case 21:$couleur = yellow; break; case 1:$couleur = 009933; break; default: $couleur = FF; } ? -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact

[PHP-DB] it works but i don't uderstand

2001-10-24 Thread Bas Jobsen
Hello, I'm building some database class, so i can reuse my code when using a not mysql database system. I'm implementing a free_result now; some code of my class class database { function free_result($result) { mysql_free_result($result); return; } .. } ? some of the

[PHP-DB] select take (too) much time

2001-10-30 Thread Bas Jobsen
hello, i have got a table table1: CREATE TABLE table1 ( id bigint(20) unsigned DEFAULT '0' NOT NULL auto_increment, refer varchar(255) NOT NULL, aantal int(9) DEFAULT '1' NOT NULL, time int(10) DEFAULT '0' NOT NULL, PRIMARY KEY (id), UNIQUE id (id) ); now i insert about 200

[PHP-DB] automated processes in mysql

2001-10-30 Thread Bas Jobsen
Hello, Can i use mysql for automated processes? do $query every hour. Tnx, Bas -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]

Re: [PHP-DB] automated processes in mysql

2001-10-30 Thread Bas Jobsen
Hello, Thank for all your soon responses. Well, oke, I know about corntab. But someone told me myslq can do the job itself. Tnx again, Bas -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To

Re: [PHP-DB] How to write this querry?

2001-12-30 Thread Bas Jobsen
delete from cities where cities.province_idprovinces.province_id Op zondag 30 december 2001 21:55, schreef Andy: Hi guys, I am trying to get rid of not needed data. There is a table called provinces containing country_codes and province_id Another table contains the cities with the field

[PHP-DB] what is the result index? (Mysql)

2002-01-14 Thread Bas Jobsen
Hello, I'm running a select-query and getting this warning: -- Warning: Unable to jump to row 100 on MySQL result index 2 -- I know the reason for the warning, but what exactly does this number two mean? The query is in een for-loop and the resultnumber rises by 2. Best regards, Bas --

Re: [PHP-DB] evaluate file type

2002-02-25 Thread Bas Jobsen
I create a list with readdir so i can show a list of files that user can download. you already have the filename? ? List($file,$extension )=explode(.,$filename); ? Op maandag 25 februari 2002 10:22, schreef Nautilis: Hi everybody I am wondering if there is any way to evaluate which kind of

Re: [PHP-DB] I'm really stuck!

2002-02-28 Thread Bas Jobsen
if($id) { $id = $pet; you first check for $id and then set it? while(list($pet)= mysql_fetch_row($ret)) print(BRyour pet id is $pet); So if $pet will print the id from the wt_users (has a value of 3) and I assign $id = $pet (id also has a value of 3 in image_data) why doesn't it show

Re: [PHP-DB] GREATEST, LEAST

2002-03-11 Thread Bas Jobsen
I want to look through the last 15 records ORDER BY ?? LIMIT 0,15 d find the highest and/or lowest number SELECT MAX(field),MIN(field) Op dinsdag 12 maart 2002 03:19, schreef u: Could anyone give me an example of how to use GREATEST and LEAST in a MySQL query. I want to look through the

[PHP-DB] Re: [PHP] Auto Increment Problems....

2002-07-29 Thread Bas Jobsen
Op dinsdag 30 juli 2002 05:44, schreef Georgie Casey: So I've 2 questions INSERT TABLE id values(''); leave it empty 1) Can the next auto_increment value be 'set' by a SQL query 2) Can I get a SQL query to INSERT INTO the first 'hole' it finds in the ID column?? I don't think so. You can

Re: [PHP-DB] regarding date

2002-08-18 Thread Bas Jobsen
? $datum=07-11-76; $date=explode('-',$datum); echo date('Y-m-d',mktime(0,0,0,$date[1],$date[0],$date[2])); ? Op zondag 18 augustus 2002 09:53, schreef Smita Manohar: hii i'm using php with my sql. i wanted to take date input in the dd-mm-yy format from user. is there any function to convert

Re: [PHP-DB] A Doubt

2002-08-28 Thread Bas Jobsen
Hi, The reason is, I need to check everytime the file abcd.php is loaded, I should be able to determine that it was loaded by mnop.php If you include abcd.php in mnop.php $_SERVER['SCRIPT_NAME'] equals /mnop.php for both scripts. So you can test in abcd.php for this. -- PHP

Re: [PHP-DB] A Doubt

2002-08-28 Thread Bas Jobsen
Hi Manoj, Your reply adrress seems to be wrong: - The following addresses had permanent fatal errors - [EMAIL PROTECTED] (reason: 553 sorry, your envelope sender is in my badmailfrom list (#5.7.1)) - Transcript of session follows - ... while talking to

Re: [PHP-DB] A Doubt

2002-08-28 Thread Bas Jobsen
Hi Manoj, echo SCRIPT document.location = 'include.php' /SCRIPT ; I think i could also use: header('Location: include.php'); // you shouldn't print anything else before the header Now your flag thing. I the first place you could check $_SERVER['HTTP_REFERRER'] gives you the page the

Re: [PHP-DB] randomizing amounts of html displayed

2002-09-12 Thread Bas Jobsen
? $numbers = range (0,4); srand ((float)microtime()*100); shuffle ($numbers); for($i=0; $i3; $i++) echo 'row'.$numbers[$i].\n; ? Op donderdag 12 september 2002 20:58, schreef Aaron Wolski: Hi All.. Quick question and perhaps a suggestion/solution requst to the above topic. My brain is

Re: [PHP-DB] Separating content from style

2002-10-09 Thread Bas Jobsen
Op woensdag 09 oktober 2002 18:29, schreef u: One of the most popular template engines is Smarty. Search on google for it. http://smarty.php.net/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] upload script filename checking

2002-10-14 Thread Bas Jobsen
Op maandag 14 oktober 2002 15:41, schreef Michael Knauf/Niles: (because of the space)... so I want to replace any occurrence of with _ $filename=str_replace(' ','_',$filename); -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php