Re: [PHP-DB] table structure question

2003-12-29 Thread Mihail Bota
I would do it a little bit different: 1. I would add ID's for each of the tables. 2. I would split teams in 2 tables; the captain stuff would be in a separate table (captain_team let's say), simply because I would have different players as captains in different games. If you keep the structure as

Re: [PHP-DB] need help with a query

2003-12-31 Thread Mihail Bota
I do not think it is going to work, you may want to stick with the PHP script. MySQL says that is going to enable subqueries from version 4.1 and the most recent release is 4.0.16 or 4.0.17. A question and 2 comments: q: the teams are fixed within league? c1: it is not clear how you record the goa

Re: [PHP-DB] Creating a pdf document

2002-01-24 Thread Mihail Bota
Thanks a lot guys! This really helps a lot. MySql is not installed on my machine, so it would take a while to install all the necessary libraries. I'll stick with the material given by Daniel, for the moment. Mihai -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [E

Re: [PHP-DB] if variable is equal to 2 through 4

2002-02-06 Thread Mihail Bota
try this: if ($v>=2 && $v<=4) { echo "..."; } mihai On Wed, 6 Feb 2002, Jay Fitzgerald wrote: > i am currently using this code: > > if ($variable == 2) || ($variable == 3) || ($variable == 4) > { > echo "hello"; > } > > how would I write it if I wanted to say this: > > if $variable == 2 throu

Re: [PHP-DB] protecting

2002-02-11 Thread Mihail Bota
put some javascript validation form. if the value of the form cntains .jpg, etc. don't allow the user to go further. On Mon, 11 Feb 2002, CrossWalkCentral wrote: > How can I help protect people form modifying a form that submits data to php file >that stores the data in a database > > for exam

RE: [PHP-DB] protecting

2002-02-11 Thread Mihail Bota
> easily circumvent javascript validation > > // -Original Message- > // From: Mihail Bota [mailto:[EMAIL PROTECTED]] > // Sent: Tuesday, 12 February 2002 12:19 PM > // To: CrossWalkCentral > // Cc: [EMAIL PROTECTED] > // Subject: Re: [PHP-DB] protecting > // > // &

Re: [PHP-DB] Ranking in MySQL

2002-08-09 Thread Mihail Bota
David, Your question is a little bit unclear. First, if it is rank, you do not need decimal, but integer (tinyint will do it). Then you need a little bit of statistics to rank the picture against the others, so, anytime each picture is ranked, you have to run the statistics and update the table (

Re: [PHP-DB] Categorized list?

2002-09-26 Thread Mihail Bota
Leif, You may want to look over the system I am creating. It is for neurobiology, but it uses categories. The URL is http://brancusi.usc.edu/bkms I am using both trees and colors. Regarding your specific problem, you have to have an indexing table, which will make the necessary relations between

Re: [PHP-DB] Pedigree question

2002-10-06 Thread Mihail Bota
Yes, there are. There is a pretty good php code, called HTML Tree which can make trees, dynamically. Regarding the coding itself...you can have a simple table that records who is ancestor of who. This is a solution. Another one, which is not so neat is to create a table with 5 columns...one per g

Re: [PHP-DB] Pedigree question

2002-10-06 Thread Mihail Bota
No, that is not the link. I am using this code: http://pear.php.net/package-info.php?pacid=77 There are many tree codes out there. Just try to use one. On Sun, 6 Oct 2002, Russell Griechen wrote: > > Mihail Bota" <[EMAIL PROTECTED]>wrote: > > > > Yes, there are. Th

Re: [PHP-DB] Inserting checkbox data

2002-10-25 Thread Mihail Bota
Graeme, first, extend the for loop over the "if" and the query for insertion of data. As you have it now, it just inserts the last element of the array. second, I think that the for loop should be $a<$number. if you put <=, then the loop is processing the array with the last value not assigned by

RE: [PHP-DB] URGET HELP : Logic Help - for first record do_this f oreach record after do_that

2002-10-25 Thread Mihail Bota
Why not use the for loop to post the values? for ($i=0; $i<$num_rows, $i++) { if ($i==0) { bla bla } else { bla2 bla2 } } $i=0 ensures that the first record of his query is retrieved. On Fri, 25 Oct 2002, Hutchins, Richard wrote: > What about wrapping your logic in a counter? Set $count=1, > if($

Re: [PHP-DB] Dealing with Unchecked Checkboxes

2002-10-26 Thread Mihail Bota
Try to assign a value for each of these variables, or elements of array. If it is checked let's say is =1,otherwise=0. Then grab the whole set of variables with GET_VARS or something like this. Create the new array in the page where you insert data, and then use if's to insert data in your tables.

Re: [PHP-DB] Dealing with Unchecked Checkboxes

2002-10-26 Thread Mihail Bota
<$j; $i++) { > echo "Pick $pick[$i] is Checked"; } > } > ?> > > > > Painting > Plumbing > Electric > > > > > > > > Cheers, > > Graeme :) > > - Original Message - > From: "Mihail Bota" <[EMA

Re: [PHP-DB] Polls?

2002-11-08 Thread Mihail Bota
Leif, off the wall...what if you have a table for question, identified with an unique ID, and another where you store the results? BTW: how are the questions? Yes/No, or multiple choices, or combination of these two styles? On Fri, 8 Nov 2002, Leif K-Brooks wrote: > The problem is, I need to ma

Re: [PHP-DB] php, DB and arrays

2002-11-09 Thread Mihail Bota
did you try "select max(v) as max_v from your_table where year=..." ? and put this query in a loop for years. mihai On Sun, 10 Nov 2002, Martin Allan Jensen wrote: > Hi evryonei have a problem that i hope you can help me with. > > Here it goes! > > I have two arrays returned from my DB one c

Re: [PHP-DB] If conditional behaviour

2002-11-15 Thread Mihail Bota
Did you try $city=="Victoria" ? On Fri, 15 Nov 2002, Bradley Crockett wrote: > AT http://crockett.ca/joinoptional.php I have a page posted. PHP isn't set up on the >server, so I've posted a screenshot of what it looks like at >http://crockett.ca/joinoptionalrendered.bmp (1/2 MB, sorry). For som

[PHP-DB] problems in connecting Access database

2001-11-26 Thread Mihail Bota
Hello, I know this may be a stupid question, but I've looked everywhere for help and since I could not resolve the problem myself, I am asking your help. The problem is simple: i have an Access 2000 database (Windows 2000, IIS5.0) that i want to query it using php4.06. I've added the database at

Re: [PHP-DB] Passing parameter in Paging

2001-12-28 Thread Mihail Bota
Bogdan, in this respect, I have a question: can I pass the values of javascript variables to php variables? if yes, how? Mihai On Fri, 28 Dec 2001, Bogdan Stancescu wrote: > I don't understand why you won't use forms with buttons and hidden controls > since you know about this solution. I have

Re: [PHP-DB] Input to DB from form

2002-01-03 Thread Mihail Bota
check if all your fields are indeed strings (char, varchar) and not numbers. Mihail Bota On Thu, 3 Jan 2002, James Kupernik wrote: > I'm trying to input that data entered into a form into a table in my DB. > Here is the code I have. > > $db = mysql_connect("loca

[PHP-DB] Creating a pdf document

2002-01-23 Thread Mihail Bota
Hello, I was wondering if I could save the result of a query in a pdf document. I looked for any functions that might help, but I got confused because I could not see how/where exactly to insert the necessary .dll's. I'd like to do this (saving the output of a query) by using mysql installed on a

[PHP-DB] Images

2003-02-01 Thread Mihail Bota
Hello, I try to create a simple image from some data from a database (something like a checkerboard: if $a=1 then red, elseif $a=2 then blue etc). Everthing works fine until the assignment of colors. Whenever I use the whole set of data that I have to display, wrong colors are assigned. Whenever I

RE: [PHP-DB] Images

2003-02-01 Thread Mihail Bota
John, the code is listed below. Very cluttered, I acknoweledge:) The limit you'll see in the second query is the maximal value for which I get a good checkerboard. Mihai $q1=mysql_query("select distinct idsend from connections where publi=1 and uid=1 order by idsend"); $nu1=m

[PHP-DB] Re: Images-weird!!

2003-02-02 Thread Mihail Bota
No, this is not the problem. $i and $j start from 0, anyway. The real problem, as I see it, is the following: I have a big loop, to create something like a checkerboard, but with 13 or so colors. If the loop iterates more than 256 times, then those cells with indexes bigger than 255 (or 256, does n

[PHP-DB] Images-weird!!

2003-02-02 Thread Mihail Bota
Hello, If you have time, please run the code below. It is a very simple code which has 2 nested loops and assigns colors to a given value. If the product of $i and $j is smaller or equal to 256 (exactly the number of colors allowed), then you'll get a random pattern. If this product is bigger tha

Re: [PHP-DB] Re: Images-weird!!

2003-02-02 Thread Mihail Bota
02 Feb 2003 14:36:38 -0800 (PST) > Mihail Bota <[EMAIL PROTECTED]> wrote: > > > No, this is not the problem. $i and $j start from 0, anyway. The real > > problem, as I see it, is the following: > > I have a big loop, to create something like a checkerboard, but with

Re: [PHP-DB] Re: Images-weird!!

2003-02-02 Thread Mihail Bota
Got it. Thanks a lot, guys! On Mon, 3 Feb 2003, Pierre-Alain Joye wrote: > On Sun, 02 Feb 2003 15:29:44 -0800 (PST) > Mihail Bota <[EMAIL PROTECTED]> wrote: > > > Yeah, I had the idea with truecolor, but I do not have GD2 installed. > > I have to install it, first. >

Re: [PHP-DB] Geeky question

2007-04-06 Thread Mihail Bota
http://users.chariot.net.au/~gmarts/eastcalc.htm Mihai On Fri, 6 Apr 2007, Ron Piggott wrote: > Is there a way to find out what dates Easter will be in PHP for 2008, > 2009, etc.? Ron > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php