[PHP] problem in PHP with ADODB connection, Microsoft JET Database
when I try to connection to the access file using Microsoft Jet Engine. it come up with following error! can anyone help me? $conn = new COM("ADODB.Connection"); $conn->Open("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=$database"); $query = "SELECT * FROM user"; $result = $conn->Execute($query) or die("fail to connection to the database!"); if ($result->RecordCount()!=-1){ //do something } -- Warning: Invoke() failed: Exception occurred. Source: Microsoft JET Database Engine Description: Syntax error in FROM clause. ----- thx -- Sincerely your; pei_world ( .::IT::. ) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: new to php, need help..
I think the problem is your php.ini setting the global_variable, by default, it is off,coz more secure,so if you want to access the variable, you need $_POST[variable] or $_GET[variable], also, $_env[HTTP_GET_VARIABLE] or $_env[HTTP_POST_VARIABLE] check out the manual on the web -- Sincerely your; pei_world ( .::IT::. ) "Jonathan" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > hi all, i've only begun learning php around 1 week ago, i'm having trouble > with this code, > > > > Untitled Document > > > > > if (isset($subject)) { echo "$subject[0]"; > echo "$subject[1]"; } > else { $subject[0] = "Enter Subject A"; > $subject[1] = "Enter Subject B"; } ?> > > > > > > > > > > > i got the body code from www.linuxguruz.org > > but i can't seem to get my input value correct, > > rather then parsing the variable subject[0] > > it passes the words "" as the value instead, > > > i'm using macromedia dreamweaver MX as my html text editor > > pls help... thanks! > > Jonathan > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] how to get the array
if my post variable is $_POST[array] How can I get the individual element of that array? I found one way to do this is $two_array=$_POST[array], but is there any other way to do so? thx -- Sincerely your; pei_world ( .::IT::. ) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Dynamic combobox in Flash with PHP
I have the following PHP code to generate output to the flash //=== $query = "SELECT currencyCode,currencyName,country,buyPrice,sellPrice FROM $CURRENCIES_TABLE order by currencyCode;"; $db_linker = db_connection(); db_selection($db_linker); $result = mysql_query($query); $num=mysql_num_rows($result); echo "&array_num=".$num; for($i=0; $ihttp://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Flash interaction with PHP
do you know how to load the variables from php automatically when the flash start? I need to stick the loadvariable into a button click action,which is not what i want. thx -- Sincerely your; pei_world ( .::IT::. ) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Variables not being received from form
cann't see any thing without your form! I think it is misstyping error, check your form variables name, specially upper case or lower case! but try $rank = $HTTP_POST_VARS[rank]; $title_new = $HTTP_POST_VARS[titles]; -- Sincerely your; pei_world ( .::IT::. ) "Peter Gumbrell" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Thanks to those who have helped me with my two other questions this > afternoon. > In the function below, the update query at the end is inserting empty values > into the database. For some reason the lines: > > > re not picking up the form values. > > Here is the complete function. I do not have a form action set so that I can > read the SQL message. The update query is working. > > > function retrieve_select_listing($link, $workshop, $session, $username) > { > $query_retrieve = "SELECT choice_ID, rank, workshop_id FROM choices_peter > WHERE workshop_ID = '$workshop' AND username ='$username'"; > $result1 = mysql_query($query_retrieve, $link) or die("display_db_query:" . > mysql_error()); > $row1 = mysql_fetch_array($result1); > $choice_id = $row1[0]; > $query_title = "SELECT title, CONCAT(sessionlet, sesnumber) AS SessionID > FROM ECOO2003 WHERE sessionlet = '$session'"; > $result2 = mysql_query($query_title, $link) or die("display_db_query:" . > mysql_error()); > while ($columns = mysql_fetch_array($result2)) > { > $column = $columns['title']; > $sessionid = $columns['SessionID']; > $selected = ""; > if ($sessionid == $row1['workshop_id']) > { > $selected = "SELECTED"; > } > $title_block .= " $selected>$column\n"; > } > > > print ""; > $selected_session = $HTTP_POST_VARS['titles']; > print "\n"; > > print "Change the rank of this workshop, or select another workshop from > this session and click the update button."; > > print ""; > print "workshopRankWorkshop Title"; > print "$row1[2] value=$row1[1]> NAME=\"titles\">$title_block\n"; > print ""; > print ""; > print "After you have made your changes, click the Update button to > confirm these."; > print ""; > print ""; > > print ""; > print ""; > > > if ($_POST['Submit']=='Update') > { > print "updated!!"; > $rank = $HTTP_POST_VARS['rank']; > $title_new = $HTTP_POST_VARS['titles']; > print "rank =$rank"; > print "title# = $title_new"; > $query_update = "UPDATE choices_peter SET rank = '$rank', workshop_id = > '$title_new' WHERE choice_ID = '$choice_id'"; > $update = mysql_query($query_update, $link) or die("display_db_query:" . > mysql_error()); > > > } > } > > Many thanks > > Peter > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Dynamic combobox in Flash with PHP
how to active the variablesLoad("test.php",0) when the flash start to play I mean auto load the variables -- Sincerely your; pei_world ( .::IT::. ) "Michiel Van Heusden" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > my experience is > that interaction between flash and php runs best through GET > so, you could try using GET instead of POST > > and in your actionscript > insert the ';' on the end of the lines for: > test = this["list_label"+i] > myItem.label = test > > grace > michiel > > > "Pei_world" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > I have the following PHP code to generate output to the flash > > //=== > > $query = "SELECT currencyCode,currencyName,country,buyPrice,sellPrice > > FROM $CURRENCIES_TABLE order by currencyCode;"; > > > > $db_linker = db_connection(); > > db_selection($db_linker); > > $result = mysql_query($query); > > $num=mysql_num_rows($result); > > echo "&array_num=".$num; > > for($i=0; $i >echo > > > "&list_label".$i."=".mysql_result($result,$i,"currencyCode").",".mysql_resul > > t($result,$i,"currencyName"); > > } > > > > > > db_close($db_linker); > > > > > > > //== > > == > > > > > > also the following code in actionscript use to receive&send data. > > but when I run the *.swf it cann't get the output from PHP, > > so anyone can help > > > > // > > loadVariables("link.php", this, "POST"); // get the data from php file > > /* > > //== > > iList = new Array(); > > myItem = new Object(); > > iList[0] = myItem; > > > > for (i=0; i > myItem = new Object(); > > test = this["list_label"+i] > > myItem.label = test > > myItem.data = i; > > iList[i+1] = myItem; > > } > > > > list_currency.setDataProvider(iList); > > > > // > > > > > > > > > > thx. > > > > -- > > Sincerely your; > > > > pei_world ( .::IT::. ) > > > > > > > > > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Flash interaction with PHP
I only found the actionscript for click button to load the varialbes. but If I want to load variable when the moive start? on (release) { gotoAndPlay(2); Status = "Beginning Login Process.. Please Hold"; loadVariablesNum ("Login.php?Name="+Name, "0"); } -- Sincerely your; pei_world ( .::IT::. ) "Pei_world" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > do you know how to load the variables from php > automatically when the flash start? > I need to stick the loadvariable into a button click action,which is not > what i want. > > thx > > -- > Sincerely your; > > pei_world ( .::IT::. ) > > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Loading var from txt or php file
I have a flash written to receive var from php file. but I found one problem, my problem is just can load the var from the file. I have following AS code from a button. when I click this button twice, it load up the var but How can I load it befor the moive is going to play? there is no point to ask user click one button before select the combo box right? again, thanks for help. // on (release) { play(); loadVariables("test.txt", this); // get the data from php file trace(array_num); test=''; for(g=0; ghttp://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] simple arithmetic problem
I have a problem in time substraction. the number print out correct, but don't know why i cann't do the substraction between them === echo (time()).">>"; echo (fgets($fp))." = "; $new=time(); $old=fgets($fp); echo ">>>".($new - $old)."<<<"; ouput ====== 1047832384>> 1047832349 = >>>1047832384<<< -- Sincerely your; pei_world ( .::IT::. ) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] number function
anyone how to write a good number valid function? regonise numbers like: real int -- Sincerely your; pei_world ( .::IT::. ) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: number function
hi thx for the last question I have following function, I use it the check all the elements in the array whether numeric or not. but I get the output : ++l++* and ++0++, the first char in the string === function check_int_float($array){ $result=true; for($i=0; $i wrote in message news:[EMAIL PROTECTED] > anyone how to write a good number valid function? > regonise numbers like: real int > > > > > > -- > Sincerely your; > > pei_world ( .::IT::. ) > > > > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] function for $array
I want to use the following function the test the array elements, if all element is number return true, otherwise false; but the command marked, it print out only the first char of every strings in the array; can help? ie: ++0++ for 0.234 function check_int_float($array){ $result=true; for($i=0; $ihttp://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php