Search found 13 matches

by Elena Mitovska
Tue Mar 04, 2003 7:41 am
Forum: PHP coding => General
Topic: Help with a date
Replies: 2
Views: 1460

The order of parameter for mktime command is
mktime(hour, minute, second, month, day, year)
it seems you confused the palces of $month and $date

in your code $date is set to palce for $month.
Probably that is the error
by Elena Mitovska
Wed Feb 19, 2003 3:25 am
Forum: PHP coding => General
Topic: popup
Replies: 1
Views: 987

You just need to specify "target" attribute of form as "blank" for example <form action="test.php" method="post" target="_blank"> <input type=text name=text1> <input type=submit> </form> this script will submit the form to file test.phpand opens this file in another window.
by Elena Mitovska
Fri Feb 14, 2003 3:35 am
Forum: mySQL & php coding
Topic: Update multiple rows with one query?
Replies: 2
Views: 1335

Yes, you just need to use something like that:

update my_table set column_date=CURRENT_DATE();
by Elena Mitovska
Tue Feb 04, 2003 11:18 pm
Forum: mySQL & php coding
Topic: pics?
Replies: 3
Views: 1361

One of the ways to insert image: $data = ""; $userfile = $HTTP_POST_FILES['userfile']['tmp_name']; //get file $fp = fopen($userfile, "rb"); while(!feof($fp)) { $data .= fread($fp, 1024); } fclose($fp); $data = addslashes($data); $data = addcslashes($data, "\0"); //insert image into database $Query =...
by Elena Mitovska
Tue Feb 04, 2003 11:11 pm
Forum: mySQL & php coding
Topic: MySQL sorting problem with null values
Replies: 0
Views: 1079

You need to write SQL querylike this: SELECT username, last_order FROM table ORDER BY isNULL(last_order), last_order It will return: Puffball 1999-03-30 Bowser 1999-10-01 Slim 2000-02-28 Buffy NULL Fang NULL Or like this to get the result in descending order: SELECT username, last_order FROM table O...
by Elena Mitovska
Thu Jan 23, 2003 1:34 am
Forum: mySQL & php coding
Topic: My Delete query does not work, need advice.
Replies: 1
Views: 1096

The multi table delete format is supported starting from MySQL 4.0.0. The idea is that only matching rows from the tables listed BEFORE the FROM clause is deleted. The effect is that you can delete rows from many tables at the same time and also have additional tables that are used for searching. Th...
by Elena Mitovska
Wed Jan 08, 2003 11:12 pm
Forum: mySQL & php coding
Topic: mySQL Where In function
Replies: 0
Views: 1343

WHERE IN expression of MYSQL is used in queries: so use this expressione in query that you use to create variable $result, for example, $result=mysql_query("Select CategoryID, Categories from my_table where CategoryID IN (..,..,..,...) "); Write, please, if I understood your problem correctly.
by Elena Mitovska
Thu Dec 19, 2002 12:00 am
Forum: mySQL & php coding
Topic: Multiple joins on same table
Replies: 0
Views: 1505

This might work as you need:

SELECT musiccd.musiccd_name, musicgroup.group_name, musicgroup2.group_name
FROM musiccd INNER JOIN musicgroup ON
musiccd.musiccd_group1 = musicgroup.musicgroup_id
LEFT OUTER JOIN musicgroup musicgroup2 ON
musiccd.musiccd_group2 = musicgroup2.musicgroup_id
by Elena Mitovska
Thu Dec 12, 2002 11:18 pm
Forum: mySQL & php coding
Topic: "select" have the "selected" attribute r
Replies: 0
Views: 1277

In situaiton as yuors I used Javascript. I can not say that my solution is the best, but for me it worked. ALl you have to is to add script in the end of file: Here is example: ---------------------------------------------------- <select name="sel" id="sel"> <option value=Male>Male</option> <option ...
by Elena Mitovska
Mon Dec 09, 2002 12:08 am
Forum: mySQL & php coding
Topic: Query: Subtraction one set from another set in MySQL
Replies: 0
Views: 1154

One of ways you can select those IDs from one table that are not contained in other table is: select distinct A.ID from A LEFT OUTER JOIN B ON A.ID=B.ID WHERE B.ID is NULL This select statement will create pair of corresponding rows from both tables, those IDs of table A, that are not contained in t...
by Elena Mitovska
Tue Nov 26, 2002 11:17 pm
Forum: PHP coding => General
Topic: form help
Replies: 0
Views: 824

The easiest way to pass variables to third page, is to pass them using form on second page. If you don't want variables values to be edited on second page, so user can only look at what he entered, you can output variables in <input> element with readonly=true and style="border:0 none transparent". ...
by Elena Mitovska
Sun Nov 17, 2002 11:02 pm
Forum: mySQL & php coding
Topic: Newbie in need of serious help
Replies: 0
Views: 1438

To retrive data from 2 table by one select query you eed to use LEFT OUTER JOIN or INNER JOIN constractuins of MySQL. If every record in yuor Product table has its match in Supplier table use INNER JOIN, if it doesn't use LEFT OUTER JOIN. INNER JOIN fetches only those records that has its math in ot...
by Elena Mitovska
Tue Nov 12, 2002 11:16 pm
Forum: mySQL & php coding
Topic: Pulling info from MySql database HTML page
Replies: 2
Views: 1718

if you need to display data's from php file on HTML page, you can use frame or iframe elements. I prefer iframe as it is can be made invisible on page, so I load php file in there and after put data from iframe in any place on HTML page I need. For example: you insert iframe tag somewhere in the bot...