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

[PHP-DB] (reverse) matching like LIKE?

2002-10-14 Thread Bas Jobsen
Hi, When if have the keyword 'msq' i can match the field 'mysqldata' SELECT * FROM table WHERE field LIKE "$keyword%" But how do i get a match when the keyword is 'mysqldatabase' and the field 'mysql'? (TRUE cause keyword contains 'mysql'). Thanks, Bas -- PHP Database Mailing List (http://ww

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] randomizing amounts of html displayed

2002-09-12 Thread Bas Jobsen
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 just not working :( > > > I have a HTML table with 5 rows of data. I would like to randomly > display 3 of the 5 rows when the page

Re: [PHP-DB] A Doubt

2002-08-28 Thread Bas Jobsen
Hi Manoj, > echo " document.location = 'include.php' "; 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 user came from

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 mail3.rediffmail.

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. -- P

Re: [PHP-DB] regarding date

2002-08-18 Thread Bas Jobsen
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 this accepted input into > -mm-dd format to store in database ? > > thnx and regards > > > > _

[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

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 th

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("your 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 >

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? Op maandag 25 februari 2002 10:22, schreef Nautilis: > Hi everybody > > I am wondering if there is any way to evaluate which kind of file i have on > my server. > > Explanation:

[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 -- PHP

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

2001-12-30 Thread Bas Jobsen
delete from cities where cities.province_id<>provinces.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

Re: [PHP-DB] Mysql result resource error

2001-12-19 Thread Bas Jobsen
$sql = "select Minor_Category FROM main where Page = 'wines' order by Minor_Category"; Op donderdag 20 december 2001 01:19, schreef Shannon Doyle: > Hi People, > > I am getting a Not a valid Mysql result resource error with the > following code, can someone take a look at this for me and see if

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 conta

[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]

[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

Re: [PHP-DB] mySQL Query and blank fields

2001-10-25 Thread Bas Jobsen
>I have field with value '9876' and if I do "...field=field+'5'..." the >value turns into '9881' not '98765' as I expected. make your field type "var char" - Original Message - From: "Niklas Lampén" <[EMAIL PROTECTED]> To: "Php-DB" <[EMAIL PROTECTED]> Sent: Thursday, October 25, 2001 3:0

[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 cod

Re: [PHP-DB] Question In French.

2001-10-18 Thread 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]

Re: [PHP-DB] Auto_increment field size (was: Howto make a double LEFT JOIN)

2001-10-05 Thread Bas Jobsen
Hello, > you can always reset the auto_increment value (I think that is as simlple as > "set insert_id=1;" but you may want to double check as this is off the top > of my head). I don't think i can do so cause i never delete all rows. so will get something like: 1 <- new insert her 1000 100

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

2001-10-05 Thread Bas Jobsen
Hello, > okay... 1< 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 > will be combined, as there is no difference between

[PHP-DB] bitshift

2001-10-05 Thread Bas Jobsen
Hello, bit_count(bit_or(1

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

2001-10-04 Thread Bas Jobsen
Hello Sheridan Saint-Michel, Well it works fine, tnx!!! But now i want to understand it too. bit_count(bit_or(1<999.999.999)) Now i thougth bit_count(bit_or(32< To: "Bas Jobsen" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, October 04, 2001 8:02 PM

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

2001-10-03 Thread Bas Jobsen
each count is on a row apart. Each row in this table contains a timestamp, so i could do something like "DELETE FROM Table1 WHERE time To: "Bas Jobsen" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Wednesday, October 03, 2001 6:34 PM Subject: Re: [PHP-DB] Howto make a do

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

2001-10-02 Thread Bas Jobsen
le1.id=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:

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

2001-10-02 Thread Bas Jobsen
"Rick 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 tabl

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

[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 PROTE

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

2001-09-18 Thread Bas Jobsen
esult); Does the first mysql_free_result make any sense 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]

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' (include_pa

Re: [PHP-DB] currency out of postgresql

2001-09-14 Thread Bas Jobsen
> $formatted = sprintf("%01.2f", $money); > printf ("%01.2f\n", $formatted); maybe twice, try: $formatted = sprintf("%01.2f", $money); echo "$formatted\n"; - Original Message - From: "Rick Eicher II" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, September 14, 2001 6:48 PM Su

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 sum(t

[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

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 Mail

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 ret

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"]; echo"dhdhdh".$row["store"]."blabla" would also work i should use: while (LIST($store,$jobdesc)=mysql_fetch_

[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] 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]