[PHP-DB] Re: Screen size, browser on php

2003-02-28 Thread Bastian Vogt
Is there a way of getting from php the screen size? Sorry but as php is only server-side, there is no way to get the screen size. You have to use javascript and send the result to the page again, as you suggested yourself. Regards, Bastian -- PHP Database Mailing List (http://www.php.net/)

[PHP-DB] Re: foreach problem

2003-02-07 Thread Bastian Vogt
$sql2 = INSERT INTO cal_date_map (entry_id, date) VALUES (\$entry_id\, \$val\); Where does $entry_id come from? Maybe it's unique? Bastian -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] Re: vaiable from one page to another

2003-02-05 Thread Bastian Vogt
Hi, you have to write it exactly like this: echo $_POST['fname']; HTH, Bastian echo $_post(fname) -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] Re: select from multi tables

2003-02-03 Thread Bastian Vogt
SELECT SUM(T1.F1) AS C1, SUM(T2.F1) AS C2 FROM T1, T2 Hi, T1,T2 is a join of the two tables which means that you combine each value of T1 with each value of T2. This is why you don't get the result you want. In your case I simply would do two querys as it won't make any problems: SELECT SUM

[PHP-DB] Re: Echo with extra characters

2003-01-08 Thread Bastian Vogt
Maybe you want to use urlencode()?! hth, Bastian Alex Francis schrieb: I have the following code in my page as a header. ? if ($mainarea==Language) { header(Location:add_5-14_material.php?mainarea=$mainarea); } else { } ? When I echo $mainarea I get \'Language\'. I think it is

[PHP-DB] Re: Dumping MySQL rows into a 2D array

2002-12-13 Thread Bastian Vogt
Hi, first leave out the loop with for ($i...). then use the loop with while and make sure that you create arrays. you're currently filling the same variables with different results each time. the last one always overwrites the ones bevor. so add those brackets: []: $dbRow['ev_id'][]=

[PHP-DB] Re: Final question of the week :-)

2002-12-11 Thread Bastian Vogt
Hi, you could use IN in your query: $sql = select * from. where id in (0// start your query if (count($selection) = 1) { for ($i=0;$icount($selection);$i++) { echo $selection[$i]; $sql .= ,.$selection[$i];// add each ID to your query }}; $sql .= ); // finish the

[PHP-DB] Re: adding in array

2002-12-10 Thread Bastian Vogt
Hi, I'ld suggest this: // inside your loop $array[$year] += $value; HTH, Bastian Martin Allan Jensen schrieb: Hi all, I have a problem i know you can help me with. I have this flushet out from a loop command: Year: 2000 ID: 14 Value: 300 Year: 2002 ID: 11 Value: 640 Year: 2002

[PHP-DB] Re: adding in array

2002-12-10 Thread Bastian Vogt
Lets say $year is 2000 There is not defined index 2000 at $array. It is going to be undefined offset. Hm... I think it's gonna work, but if it's one of the don'ts in progamming style, could you tell me why you shouldn't do this and how to make it better (and nice)? Regards, Bastian -- PHP

[PHP-DB] Re: Fw: Insert strtoupper

2002-12-09 Thread Bastian Vogt
Hi, in your query strtoupper is treated as a string and not as a function. You have to write this: mysql_query (INSERT INTO anagrafe (codice,nome, cognome, codicefiscale) VALUES ('.strtoupper($codicefiscale).','$NOME','.strtoupper($cognome).','.strtoupper($codicefiscale).', ... Regards, Bastian

[PHP-DB] Re: displaying duplicate records...

2002-12-04 Thread Bastian Vogt
Hi, there's an elegant way to stop people from uploading the infos more than one time. And it's easy to do. You just have to figure out which fields are not allowed to have the same values and put those fields into an unique key. ALTER TABLE projekt ADD UNIQUE(voornaam, achternaam, email) would

[PHP-DB] Re: displaying duplicate records...

2002-12-04 Thread Bastian Vogt
are already inserted. If you find some - error, if not - put them in. Ignatius is right: I forgot to mention that there mustn't be any duplicates in the fields you want to add to the unique key. HTH, Bastian Bastian Vogt [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL P

[PHP-DB] mysql - enum

2002-12-02 Thread Bastian Vogt
Hi, is it possible to get all possible values of an enum-field from a mysql-table in php? The values might be changed in the database. Now I've got an select-field in my php-app where the user can select each value of the enum-field for a new record befor saving... Thanks for any reply, Bastian

Re: [PHP-DB] Connecting to remote db securely

2002-11-25 Thread Bastian Vogt
Hi, why don't you write a script which simply gets all the data you need out of their database and puts it into some arrays. then include the page on your website and then you can work with the arrays as if they were on your server HTH, Bastian -- PHP Database Mailing List

[PHP-DB] Re: help w/Multiple Joins

2002-11-21 Thread Bastian Vogt
hi, you have to create aliases for every column you want to fetch results from. you have to change your query like this: SELECT i1.img_path AS i1_path, i2.img_path AS i2_path, i3. you can leave out the AS if you want to.. hth, bastian $result = mysql_query(SELECT * FROM photo_album as p

[PHP-DB] Re: right join

2002-11-21 Thread Bastian Vogt
hi, did you try ...FROM labor RIGHT JOIN works_orders ON labor_ord_no = works_orders_ord_no WHERE labor_qty='' ORDER BY labor_qty,$link); ? i think that should do it regards, bastian How do I get the following select to exclude records where labor_qty from labor does not have a record?