Php mysql select query executes twice
I have a select query running in a page that returns an image array and when it executes Firefox is returning the results twice. I have tested it in IE, and it runs fine. Just wondering if anyone would know why this is happening. I have searched many php and mySQL blogs and forums for an answer but have found nothing. This is my last hope. I also tested the query in phpMyAdmin and it executes fine with no errors. Thank you in advance for any ideas or help.
A good place to ask questions and advice about web development is at the mozillaZine Web Development/Standards Evangelism forum.<br />
The helpers at that forum are more knowledgeable about web development issues.<br />
You need to register at the mozillaZine forum site in order to post at that forum.<br />
See http://forums.mozillazine.org/viewforum.php?f=25
Similar Messages
-
Hi,
Select * into temporders
from
(select * from orders
union
select * from ordershistory) b
where updateon= (select max(updateon)from (select updateon,name,units,subunits from orders
union
select updateon,name,units,subunits from ordershistory) a
where updateon <='11/08/2008 11:18 AM' and a.name=b.name and a.units=b.units and a.subunits=b.subunits group by name,units,subunits)
order by report,subunitsorder
the above query takes more time.
So can any one give an alternate query to get the values faster.
ThanxsMaybe you can change your 'union' in 'union all'?Both are entirely different technique. UNION ALL returns all the rows of both the select statement. While UNION returns only the distinct rows. So the usage of UNION or UNION ALL is strictly defined by the requirement. And cant be replaced by on or the other to improve performance.
Thanks,
Karthick. -
Updating to 10.4.11 killed my PHP/MYSQL connections
Hi all - I use Dreamweaver CS3 for web development, and have been using some very simple PHP/MYSQL Select and Inserts. Everything was working fabulously up until this morning, when I updated to 10.4.11 (Macbook Pro, CoreDuo). As soon as I updated, I get a 'No Database Selected' message in Safari, Firefox and IE. I can see the database and work with it in DWeaver, just can't get it to go live in browsers.
I'm running PHP 5.2.4, MYSQL 5.1.8 and whatever version of Apache is bundled in OS X (I think it's 1.x - but can't find how to get that number!)
Just for record, I have stopped/restarted Personal Web Sharing, Personal File Sharing, OS X, MYSQL to just check whether something wasn't working there.
I'm about to close out, zap the PRAM and then come back in.
Any ideas?
VinceThanks - A couple of additional points. This is OS X 10.4.11, not OS X Server, so I had installed MYSQL and PHP as fresh installations. MYSQL has not changed since I installed and is running fine through direct client (Navicat).
For PHP I was running 4 and it had been running fine. When the update to OSX came through, PHP 4 didn't work - no change had been made to any configuration file that was working already. These are the httpd.conf instructions I had followed to set-up PHP 4:
+1 Launch Terminal from /Applications/Utilities.+
+2 Open the Apache configuration file and edit the UNIX shell prompt:+
+sudo pico /etc/httpd/httpd.conf+
+3 When prompted for a password, enter the Mac OS X administrator account password.+
+4 Uncomment the following lines:+
+LoadModule php4_module libexec/httpd/libphp4.so+
+AddModule mod_php4.c+
+5 Add the following lines (add these lines above: AddType application/x-tar .tgz):+
+AddType application/x-httpd-php .php+
+AddType application/x-httpd-php-source .phps+
+Note: All the commands for the pico editor display on the screen and you can start any commands with the Control key. Use the arrow keys to move around. Pico is a text editor, mostly for UNIX users to use at the UNIX command line. The pico text editor resides in /usr/bin/ directory.+
+6 Add a new index page for PHP (index.php) so that the web server will recognize it as the first page to load:+
+<IfModule mod_dir.c>+
+DirectoryIndex index.html index.php index.htm+
</IfModule>
+7 Save the httpd.conf file by pressing ^X (control & x keys). When the screen asks "Save Modified buffer?", press "Y". When prompted for "File Name to write : httpd.conf", press Return once to accept it. This will return you to the UNIX shell prompt.+
When PHP 4 stopped working, I took the decision to upgrade to 5 and then fix the breakdown (by now, I was convinced it was an Apache change (nothing in config had changed at all). So, upgraded to PHP 5 and, to do so, had to reverse the directions above. Since then, I've tried reenabling the above, replacing with PHP5 wherever PHP4 appears, all to no avail (in fact, it just froze the Personal Web Sharing that turns Apache on/off).
Right now, running the phpinfo check detailed above tells me the PHP 5 is successfully installed and running. The text from the test copied here:
+System Darwin Vincet-MacBook-Pro.local 8.11.1 Darwin Kernel Version 8.11.1: Wed Oct 10 18:23:28 PDT 2007; root:xnu-792.25.20~1/RELEASE_I386 i386+
+_Build Date_ Aug 31 2007 23:38:11+
+_Configure Command_ './configure' '--prefix=/usr/local/php5' '--with-apxs' '--with-config-file-scan-dir=/usr/local/php5/php.d' '--with-iconv' '--with-openssl=/usr' '--with-zlib=/usr' '--with-gd' '--with-zlib-dir=/usr' '--with-ldap' '--with-xmlrpc' '--with-iconv-dir=/usr' '--with-snmp=/usr' '--enable-exif' '--enable-wddx' '--enable-soap' '--enable-sqlite-utf8' '--enable-ftp' '--enable-sockets' '--enable-dbx' '--enable-dbase' '--enable-mbstring' '--enable-calendar' '--enable-bcmath' '--with-bz2=/usr' '--enable-fastcgi' '--enable-cgi' '--enable-memory-limit' '--enable-zip' '--enable-pcntl' '--enable-shmop' '--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg' '--with-curl=shared,/usr/local/php5' '--with-mysql=shared,/usr/local/php5' '--with-mysqli=shared,/usr/local/php5/bin/mysql_config' '--with-pdo-mysql=shared,/usr/local/php5' '--with-libxml-dir=shared,/usr/local/php5' '--with-xsl=shared,/usr/local/php5' '--with-pdflib=shared,/usr/local/php5' '--with-imap=../imap-2004g' '--with-kerberos=/usr' '--with-imap-ssl=/usr' '--with-jpeg-dir=/usr/local/php5' '--with-png-dir=/usr/local/php5' '--enable-gd-native-ttf' '--with-freetype-dir=/usr/local/php5' '--with-iodbc=shared,/usr' '--with-pgsql=shared,/usr/local/php5' '--with-pdo-pgsql=shared,/usr/local/php5' '--with-t1lib=/usr/local/php5' '--with-gettext=shared,/usr/local/php5' '--with-ming=shared,/usr/local/php5' '--with-mcrypt=shared,/usr/local/php5' '--with-mhash=shared,/usr/local/php5' '--with-mssql=shared,/usr/local/php5' '--with-fbsql=shared,/Users/liyanage/svn/entropy/universalbuild/src/FBDeveloper Libraries/Library/FrontBase' '--with-json=shared' '--enable-memcache' '--enable-openbase_module'+
+_Server AP_I Apache+
+_Virtual Directory Suppor_t disabled+
+_Configuration File (php.ini) Path_ /usr/local/php5/lib+
+_Loaded Configuration File_ /usr/local/php5/lib/php.ini+
+_Scan this dir for additional .ini files_ /usr/local/php5/php.d+
+_additional .ini files parsed_ /usr/local/php5/php.d/10-extension_dir.ini, /usr/local/php5/php.d/50-extension-curl.ini, /usr/local/php5/php.d/50-extension-fbsql.ini, /usr/local/php5/php.d/50-extension-gettext.ini, /usr/local/php5/php.d/50-extension-json.ini, /usr/local/php5/php.d/50-extension-mcrypt.ini, /usr/local/php5/php.d/50-extension-mhash.ini, /usr/local/php5/php.d/50-extension-ming.ini, /usr/local/php5/php.d/50-extension-mssql.ini, /usr/local/php5/php.d/50-extension-mysql.ini, /usr/local/php5/php.d/50-extension-mysqli.ini, /usr/local/php5/php.d/50-extension-odbc.ini, /usr/local/php5/php.d/50-extension-pdf.ini, /usr/local/php5/php.d/50-extension-pdo_mysql.ini, /usr/local/php5/php.d/50-extension-pdo_pgsql.ini, /usr/local/php5/php.d/50-extension-pgsql.ini, /usr/local/php5/php.d/50-extension-xsl.ini+
+_PHP API_ 20041225+
+P_HP Extension_ 20060613+
+_Zend Extension_ 220060519+
+_Debug Build_ no+
+_Thread Safety_ disabled+
+Zend Memory Manager enabled+
+_IPv6 Support_ enabled+
+_Registered PHP Streams_ zip, php, file, data, http, ftp, compress.bzip2, compress.zlib, https, ftps+
+_Registered Stream Socket Transports_ tcp, udp, unix, udg, ssl, sslv3, sslv2, tls+
+_Registered Stream Filters_ string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, convert.iconv.*, bzip2.*, zlib.*+
I don't know if any of this helps, but it's what I find. From my online troubleshooting and reading, I believe all of the above looks right and that things should work. So, I'm still left with an informed gut decision that something in the set-up of Apache changed (location in file structure, configuration file, etc.) Could it be looking at a second copy of httpd.conf somewhere else? That would seem to make sense - however I haven't managed to turn up how to assess which version of Apache is loaded (I think 1.3) or where it's located.
If anyone can confirm what PHP5 code should be included in httpd.conf given the above, that would be a great next step.
Thanks for all your assistance!
Vince -
Can I just check I have some of this right? It's fairly
basic, but just want to check I'm setting about it the right way,
as I'm new to the coding. (have in the past used Access a lot).
Basically I have tables for companies and contacts - in a one
to many relationship, as any given company may have many contacts -
which as far as I can tell is how you should do this rather than
have a single contacts table? (normalisation?)
So if the tables are :
Companies :
CompanyID (INT, auto increment)
Company
Address
etc
Contacts :
ContactID (INT, auto increment)
FirstName
LastName
etc
CompanyContacts :
CompanyID (INT)
ContactID (INT)
what should the SQL be for the page to display a company's
details along with each contact ?
I thought it might be something fairly simple like :
SELECT *
FROM Companies, CompanyContacts, Contacts
WHERE Company.CompanyID=CompanyContacts.CompanyID
But the Access flavour query comes out as :
SELECT *
FROM ([Companies] INNER JOIN [CompanyContacts] ON
[Companies].CompanyID = [CompanyContacts].CompanyID) INNER JOIN
[Contacts] ON [CompanyContacts].ContactID = [Contacts].ContactID;
If someone could translate the Access flavour query into
PHP/mySQL flavour that I could use as a reference that would be a
great help.
Cheers,
IainThanks David.
Thinking about it, do I even need the interlinking table -
can I get away with :
Companies
CompanyID (primary key)
Company
etc
Contacts
ContactID (primary key)
CompanyID (foreign key)
FirstName
LastName
etc
And have
SELECT *
FROM Companies, Contacts
WHERE Companies.CompanyID = Contacts.CompanyID
Which would keep it relatively straightforward adding in new
companies and new contacts using DWs insert record behaviour, ie
wouldn't have the complication of populating the CompanyContacts
table?
Also - I've ordered your book from Amazon this week - so once
I get this project completed the plan is to work through it and
firm up some of the stuff I've been doing.
Iain -
How to optimize the select query that is executed in a cursor for loop?
Hi Friends,
I have executed the code below and clocked the times for every line of the code using DBMS_PROFILER.
CREATE OR REPLACE PROCEDURE TEST
AS
p_file_id NUMBER := 151;
v_shipper_ind ah_item.shipper_ind%TYPE;
v_sales_reserve_ind ah_item.special_sales_reserve_ind%TYPE;
v_location_indicator ah_item.exe_location_ind%TYPE;
CURSOR activity_c
IS
SELECT *
FROM ah_activity_internal
WHERE status_id = 30
AND file_id = p_file_id;
BEGIN
DBMS_PROFILER.start_profiler ('TEST');
FOR rec IN activity_c
LOOP
SELECT DISTINCT shipper_ind, special_sales_reserve_ind, exe_location_ind
INTO v_shipper_ind, v_sales_reserve_ind, v_location_indicator
FROM ah_item --464000 rows in this table
WHERE item_id_edw IN (
SELECT item_id_edw
FROM ah_item_xref --700000 rows in this table
WHERE item_code_cust = rec.item_code_cust
AND facility_num IN (
SELECT facility_code
FROM ah_chain_div_facility --17 rows in this table
WHERE chain_id = ah_internal_data_pkg.get_chain_id (p_file_id)
AND div_id = (SELECT div_id
FROM ah_div --8 rows in this table
WHERE division = rec.division)));
END LOOP;
DBMS_PROFILER.stop_profiler;
EXCEPTION
WHEN NO_DATA_FOUND
THEN
NULL;
WHEN TOO_MANY_ROWS
THEN
NULL;
END TEST;The SELECT query inside the cursor FOR LOOP took 773 seconds.
I have tried using BULK COLLECT instead of cursor for loop but it did not help.
When I took out the select query separately and executed with a sample value then it gave the results in a flash of second.
All the tables have primary key indexes.
Any ideas what can be done to make this code perform better?
Thanks,
Raj.As suggested I'd try merging the queries into a single SQL. You could also rewrite your IN clauses as JOINs and see if that helps, e.g.
SELECT DISTINCT ai.shipper_ind, ai.special_sales_reserve_ind, ai.exe_location_ind
INTO v_shipper_ind, v_sales_reserve_ind, v_location_indicator
FROM ah_item ai, ah_item_xref aix, ah_chain_div_facility acdf, ah_div ad
WHERE ai.item_id_edw = aix.item_id_edw
AND aix.item_code_cust = rec.item_code_cust
AND aix.facility_num = acdf.facility_code
AND acdf.chain_id = ah_internal_data_pkg.get_chain_id (p_file_id)
AND acdf.div_id = ad.div_id
AND ad.division = rec.division;ALSO: You are calling ah_internal_data_pkg.get_chain_id (p_file_id) every time. Why not do it outside the loop and just use a variable in the inner query? That will prevent context switching and improve speed.
Edited by: Dave Hemming on Dec 3, 2008 9:34 AM -
How to execute a select query stored in variable
Hello helpers ,
I have some "select queries" stored in the database . Now I can derive this query in some variable . How do I execute this query from the variable .
example :
Data Query type char50 .
QueryVar = 'Select MATNR from MBEW where BWKEY = '0001' . '
How do I execute this Query stoored in variable QueryVar in ABAP program ?
Thanks a lot for helping .
Regards
ShashankShashank,
It is also possible to use (column_syntax) and (dbtab_syntax) together with (cond_syntax) when using SELECT statements in ABAP. For more info on (column_syntax) and (dbtab_syntax) just have a quick look at ABAP Keyword documention on SELECT statement (hit F1 on SELECT then scroll down to Select->Select result->Select Columns....)
So in your case, you need to separate out (split) the value in 'wa_itab-query' into other variables or append into separate internal tables using common keys etc. - then looping at those tables with the common key (READ TABLE WITH KEY....) use the following syntax at the time of triggering the SELECT query:
SELECT (column_syntax)
FROM (dbtab_syntax)
WHERE (cond_syntax).
Also worth a look at this example below:
PARAMETERS: p_cityfr TYPE spfli-cityfrom,
p_cityto TYPE spfli-cityto.
DATA: BEGIN OF wa,
fldate TYPE sflight-fldate,
carrname TYPE scarr-carrname,
connid TYPE spfli-connid,
END OF wa.
DATA itab LIKE SORTED TABLE OF wa
WITH UNIQUE KEY fldate carrname connid.
DATA: column_syntax TYPE string,
dbtab_syntax TYPE string.
column_syntax = `c~carrname p~connid f~fldate`.
dbtab_syntax = `( ( scarr AS c `
& ` INNER JOIN spfli AS p ON p~carrid = c~carrid`
& ` AND p~cityfrom = p_cityfr`
& ` AND p~cityto = p_cityto )`
& ` INNER JOIN sflight AS f ON f~carrid = p~carrid `
& ` AND f~connid = p~connid )`.
SELECT (column_syntax)
FROM (dbtab_syntax)
INTO CORRESPONDING FIELDS OF TABLE itab.
LOOP AT itab INTO wa.
WRITE: / wa-fldate, wa-carrname, wa-connid.
ENDLOOP.
Hope this helps.
Cheers,
Sougata. -
Runtime error(Time limit exceeds)after executing select query
Dear experts, whenever i executing the select query in this zprogram i am getting runtime error that time limit exceeds.i am using inner join and into table.after that also i am geetting error. how can i resolve it??
SELECT LIKP~VBELN LIKP~WADAT_IST LIKP~VEHICLE_NO LIKP~TRNAME
LIKP~VEHI_TYPE LIKP~LR_NO LIKP~ANZPK LIKP~W_BILL_NO
LIKP~SEALNO1 " Seal NO1
LIKP~SEALNO2 " Seal NO2
LIPS~LFIMG
VBRP~VBELN VBRP~VGBEL VBRP~MATNR VBRP~AUBEL VBRP~FKIMG
VBAK~AUART
VBRK~FKART VBRK~KNUMV VBRK~FKSTO
FROM LIKP INNER JOIN LIPS ON LIKP~VBELN EQ LIPS~VBELN
INNER JOIN VBRP ON LIKP~VBELN EQ VBRP~VGBEL
INNER JOIN VBAK ON VBRP~AUBEL EQ VBAK~VBELN
INNER JOIN VBRK ON VBRP~VBELN EQ VBRK~VBELN
INTO TABLE I_FINAL_TEMP
WHERE LIKP~VSTEL = '5100' AND
LIKP~WADAT_IST IN S_WADAT AND
VBRP~AUBEL IN S_AUBEL AND
VBAK~AUART IN ('ZJOB','ZOR') AND
VBRK~FKART IN S_FKART AND
* VBRK~FKART IN ('ZF8','ZF2','ZS1') AND
VBRK~FKSTO NE 'X'.
When I am debugging the select query.the cursor will not go to next step.after 15-20 minutes i am getting runtime error(time limit exceeds).
how can i resolve it for that scenario??Looks like whole SD flow you trying to fetch in single query
First you check the database statistic of these table are upto date in system ( Check with basis team )
if this query was working fine earlier.
Most of table involved are huge volume tables which queried with any primary key
Any secondary index on created for LIKP on VSTEL WADET ?
My suggestion would be split the selection queries and make use of primary or existing secondary index to fetch the desired result if possible. For testing purpose split the queries and find which is taking more time and which needs index by taking squel trace in ST05.
Also take ST05 trace of this query in debugger ( New debugger -> special tool -> trace > ST05/SE30) -
Hi Friends,
my code is :
itab-vbeln = bseg-vbeln.
if not itab-vbeln is initial.
select single vbeln inco1 inco2 into ( itab-vbeln itab-inco1 itab-inco2)
from vbrk where vbeln = itab-vbeln.
appned itab.
note : here inco1 inco2 are incoterms
my question is can we direct move the values of bseg-vbeln into itab-vbeln. ???
and i am generating the report with one varient , when i debug this report the
there is no value in bseg-vbeln. it is showing null value.thats why my select query is not working..but i want execute this select query final.
in output i want display the inco1 inco2 data.(incoterms)
any help please.
urgent.
regards,
vijay.Hi Vijay,
First you need to check it out whether <b>itab-vbeln = bseg-vbeln</b> is in with in LOOP or not (<b>if ITAB is intenal table</b>)
if itab is internal table you should write above statement with in loop, and also check it out in debug mode why bseg-vbeln value is not coming.
and one more thing you need to make small correction in ur code use ',' .
select single vbeln inco1 inco2 into ( <b>itab-vbeln, itab-inco1, itab-inco2</b>)
from vbrk where vbeln = itab-vbeln
Note: when ever use select single u should pass values into work area, dont use internal table .
<b>if you have more doubts just send your entire code then i will rewrite it.</b>
<b>Reward with points if useful.</b>
Regards,
Vijay Krishna -
NullPointerException on System.arraycopy command while executing select query in Oracle 10
I'm getting this error below while trying to execute some select query.
java.lang.NullPointerException at java.lang.System.arrayCopy(Native Method) at
oracle jdbc.driver.T4CNumberAccessor.saveDataFromOldDefineBuffers(T4CNumberAccessor.java:276) at
oracle.jdbc.driver.T4CPreparedStatement.saveDefineBuffersIfRequired(T4cPreparedStatement.java:486) at
oracle.jdbc.driver.OracleStatement.prepareAccessors(OracleStatement.java:919) at
oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(T4CPreparedStatement:836) at
oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1124) at
oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3286) at
oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3329) at
I've already downloaded the latest ojdbc5.jar file to access Oracle 10 database.
This is my java version:
bash$java -version
HEAP_DUMP_OPTIONS= -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=../Logs -XX:+PrintClassHistogram
java version "1.5.0_22"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_22-b03)
Java HotSpot(TM) Server VM (build 1.5.0_22-b03, mixed mode)
Any idea of what may cause this problem?No one can debug code that they can't see.
You need to SHOW US (not just tell us):
1. WHAT you are doing
2. HOW you are doing it
3. WHAT result you are getting
4. WHAT result you expected to get.
The latest JDBC jar that can access Oracle 10 DBs is the 12.1.0.2 driver and is available here:
JDBC/UCP Download Page -
Variable has SELECT query how to execute it
hi all
question may be odd one but guide me on that.
requirement is as , i have a BAPI which have a STRING type INPUT parameter let P1, P1 contain a SELECT query as its value.
now i want to execute the select query which P1 contain in my BAPI , how i can do it.
e.g.
P1 = 'Select single * from MARA .'
now either i have extract the P1 OR have to do something to get this query executed .
please guide me.Hi
We can use the FM
Earlier WS_QUERY was there but it is obsolete. we need to check for the new one.
Or try to use the FM
GUI_EXEC to run it.
Thanks & Regards,
Chandralekha. -
Daily morning 8 o clock , we need to execute a select query
Hi,
daily morning 8 o clock , we need to execute a select query.
How we can do this using dbms_scheduler? or any other ways?
db version : 10g
Thanks,
Kumar.
Message was edited by:
user548258Use daily and byhour parameters as shown in below link.
http://www.dba-oracle.com/t_dbms_scheduler_examples.htm -
Error while executing Select Query
Hi All,
I am getting following error in Sender JDBC Channel.
u201CDatabase-level error reported by JDBC driver while
retrieving the result set metadata for the select Query. Error message returned by the
JDBC driver: 'java.sql.SQLException: Closed Statement: getMetaDatau201D.
What might be the actual cause of this problem? please reply.Hi Sudeep,
Please check the SQL query that you are trying to execute on the DB. Also, check if it gives a correct result. The problem seems to be with the SQL query or the result of this SQL query.
I would suggest you to run the same query on the DB & see the result first and then try executing the same query via the JDBC adapter.
Regards, Gaurav. -
How to execute SQL SELECT QUERY using VB in FDMEE
Hi Experts,
We are struggling with converting some of the FDM VB Scripts to FDMEE. While in FDM it was possible to simply create a RS Object, it doesnt seem to work in FDMEE. Can you please help me with some code samples that will help me execute SELECT Query and taking the output of the Query to Appropriate Variables.
Also it seems that the Accelerators in erstwhile FDM are no longer available in FDMEE. So we have to re-write our entire code all over again
ThanksThere are plenty of code examples in the FDMEE guide and al of the API methods are documented for both Visual Basic and Jython. Personally, I think, if you are having to re-factor your code because you have migrated from FDM to FDMEE I would look at doing it in Jython not the VB API. Jython is the scripting language that will be the mainstream choice going forward and athough the VB API is present to ease the move from FDM to FDMEE I wouldn't be sure how long it will be supported and you therefore may have to perform another code migration not too far down the line. Jython is a very powerful and easy to use if you spend a bit of time familiarizing yourself with the syntax and also opens up the opportunity to leverage the myriad of Java classes out there. Also all of your import scripts have to be in Jython with no VB alternative.
One other piece of advice is do not try and replicate allyour old code line for line. Look at what you were trying to achieve, assess whether it is still relevant or can it be faciliated by the new extended out of the box constructs and functionality FDMEE offers over classic FDM. -
Executing Select query using JDBC Receiver Adapter
I created couple types in Oracle and also new function instead of procedure
Can I execute the above query using JDBC Receiver Adapter.
select *
from the ( select cast( apr.get_distribut('', '', '', 'hdfcgd', 'CAN') as dsrTable )
from dual );
If possible how my message structure should look like...Hi vikram,
If you use JDBC as Receiver Adapter you can only post the data to the data base I do no think so we can select the records from the data base.
If you use JDBC as Sender hope,we can the select query in the sender communication channel.
Hope I am clear.
Thanks and Regardds,
Chandu. -
PHP+MySQL query with empty value
Hi!
Software is DW8 with Apache 2.0.48, MySQL ver. 4.0.15a, PHP
4.2.3.
We had problem when a submitted value for 'regionID' in the
submit page
was left blank and the following error message appears in the
result page:
"You have an error in your SQL syntax. Check the manual that
corresponds
to your MySQL server version for the right syntax to use near
'LIMIT 0,
3' at line 1"
The problem was solved by adding at the top of the page:
<?php
if (isset($_POST['regionID']) &&
empty($_POST['regionID'])) {
$_POST['regionID'] = '0';
?>
How to change the above code to retrieve ALL records when an
empty \
blank value is submitted for 'regionID'?
TIA
Nanubbgirl wrote:
> Something I picked up at a PHP/MySQL seminar...
$_REQUEST works in place of
> either $_GET or $_POST. It basically means use either
get or post. But it is
> less precise because it can pick up either variable and
has to think about the
> request...
I'm afraid you've picked up rather poor information.
$_REQUEST relies on
register_globals being turned on. Since register_globals is
considered a
major security risk, the default setting has been off since
April 2002.
Many hosting companies have turned register_globals on, in
spite of the
security problems, because so many poorly written scripts
rely on it.
The PHP development team has decided to resolve this security
issue once
and for all by removing register_globals from PHP 6.
Forget $_REQUEST. Use $_POST and $_GET always. It's safer,
and it's
futureproof.
David Powers
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
Author, "Foundation PHP 5 for Flash" (friends of ED)
http://foundationphp.com/
Maybe you are looking for
-
after upgrade to mavericks: time machine keeps asking for my back up disk and won't open unless i plug in the disk. any solutions? before the upgrade, i could open time machine without the need for having the back up disk plugged in.
-
Sandbox differences between CS6 and CC on Mavericks?
Colleagues, I have a CS Extension for InDesign that does authentication with a web service using OAuth2. The extension works perfectly in InDesign CS6 in OS X Mavericks, but fails in InDesign CC on the same system. The extension *sends* the login req
-
Nokia n8 hang - battery removal query - plz help
Whenever the nokia n8 hangs, will I have to remove the battery everytime with a screw driver ?. if it is so won't it be irritating ?
-
Why does my Safari 8.0.2 on Yosemite drop some image on html web pages ?
Problem: Some images on the web(HTML) page not displayed. (images are dropped and displays as "?" marks) When I used OS X Mavericks, there was no problem. After updating OS X Mavericks to Yosemite, this problem has occur until now. I did do safe boot
-
Beginner - need help with custom profiles
I've got 30-day demo versions of both Aperture and Lightroom trying to work out which is best for printing using custom profiles I've had done for a selection of textured art papers for use on my Epson R2400. I've read the printing documentation for