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
Nanu
bbgirl 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/
Similar Messages
-
Hello,
We are creating a cross tab report, with products as the columns, and relationship managers with direct and shared revenue displayed across the rows.
For Eg
Relationship Manager Coverage Product1 Product2 Product3 Product4
Bob Direct 100, 0, 35, 50
Shared 0, 0, 15, 0
Alex Direct 15, 25, 40, 10
Shared 5, 0, 5, 0
George Direct 0, 0, 0, 30
Shared 0, 0, 0, 5
The problem lies when either one of the products has no values, or one of the relationship managers has no direct or shared revenues. If one of the products has no revenues, it disappears, and also when one of the RMs has no direct or shared revenues, the Direct or Shared row disappears.
I have tried to create a second query just included the Coverage variable, and using this variable in Query 2 with the RM variable from query 1, along with checking the "Show Rows with Empty Measure values", "Show Rows with Empty Dimension Values" and "Show when empty", but it still does not appear to work.
It only shows rows with values in them, and shows the rows with empty values at the end with no RM.
I have not tried to solve for empty columns yet.
Help with this would be much appreciated!!!!!!!!
Thank youHi ,
I think you can resolve this issue following ways ,
you need create another query ( Ex :Qauery2 ) add Product object and RM (Direct,shared) object only without conation. So now query2 result wil have all product and RM(Direct,shared).
Merge the Product object and RM between query1 and query2
Now create table using Product and RM from query2 and measure value from query1. Now you will get row even there is no data.
If you want try this sample report using efasion unvierse.
1) Add year ,state and Discount objects and apply condition Year Not in list "2004" and state Not in list "California "
2) run this query and create the cross tab table . Now you will not get 2004 column and California row in table.
3) Create query2 add Year and State only without any condition , run the query. Now query 2 will display all state and year .
4) Merge the column Year and State between query1 and query2
4) Create the cross table ussing Year and state from query2 and Discount from Query1
Now cross table will show 2004 and California ,even there is not in query 1.
I hope this will help you.
Ponnarasu
Edited by: ponnarasuk on Dec 7, 2011 12:48 PM -
How could I replace hard coded value in my sql query with constant value?
Hi all,
Could anyone help me how to replace hardcoded value in my sql query with constant value that might be pre defined .
PROCEDURE class_by_day_get_bin_data
in_report_parameter_id IN NUMBER,
in_site_id IN NUMBER,
in_start_date_time IN TIMESTAMP,
in_end_date_time IN TIMESTAMP,
in_report_level_min IN NUMBER,
in_report_level_max IN NUMBER
IS
bin_period_length NUMBER(6,0);
BEGIN
SELECT MAX(period_length)
INTO bin_period_length
FROM bin_data
JOIN site_to_data_source_lane_v
ON bin_data.data_source_id = site_to_data_source_lane_v.data_source_id
JOIN bin_types
ON bin_types.bin_type = bin_data.bin_type
WHERE site_to_data_source_lane_v.site_id = in_site_id
AND bin_data.start_date_time >= in_start_date_time - numtodsinterval(1, 'DAY')
AND bin_data.start_date_time < in_end_date_time + numtodsinterval(1, 'DAY')
AND bin_data.bin_type = 2
AND bin_data.period_length <= 60;
--Clear the edr_class_by_day_bin_data temporary table and populate it with the data for the requested
--report.
DELETE FROM edr_class_by_day_bin_data;
SELECT site_to_data_source_lane_v.site_id,
site_to_data_source_lane_v.site_lane_id,
site_to_data_source_lane_v.site_direction_id,
site_to_data_source_lane_v.site_direction_name,
bin_data_set.start_date_time,
bin_data_set.end_date_time,
bin_data_value.bin_id,
bin_data_value.bin_value
FROM bin_data
JOIN bin_data_set
ON bin_data.bin_serial = bin_data_set.bin_serial
JOIN bin_data_value
ON bin_data_set.bin_data_set_serial = bin_data_value.bin_data_set_serial
JOIN site_to_data_source_lane_v
ON bin_data.data_source_id = site_to_data_source_lane_v.data_source_id
AND bin_data_set.lane = site_to_data_source_lane_v.data_source_lane_id
JOIN (
SELECT CAST(report_parameter_value AS NUMBER) lane_id
FROM report_parameters
WHERE report_parameters.report_parameter_id = in_report_parameter_id
AND report_parameters.report_parameter_group = 'LANE'
AND report_parameters.report_parameter_name = 'LANE'
) report_lanes
ON site_to_data_source_lane_v.site_lane_id = report_lanes.lane_id
JOIN (
SELECT CAST(report_parameter_value AS NUMBER) class_id
FROM report_parameters
WHERE report_parameters.report_parameter_id = in_report_parameter_id
AND report_parameters.report_parameter_group = 'CLASS'
AND report_parameters.report_parameter_name = 'CLASS'
) report_classes
ON bin_data_value.bin_id = report_classes.class_id
JOIN edr_rpt_tmp_inclusion_table
ON TRUNC(bin_data_set.start_date_time) = TRUNC(edr_rpt_tmp_inclusion_table.date_time)
WHERE site_to_data_source_lane_v.site_id = in_site_id
AND bin_data.start_date_time >= in_start_date_time - numtodsinterval(1, 'DAY')
AND bin_data.start_date_time < in_end_date_time + numtodsinterval(1, 'DAY')
AND bin_data_set.start_date_time >= in_start_date_time
AND bin_data_set.start_date_time < in_end_date_time
AND bin_data.bin_type = 2
AND bin_data.period_length = bin_period_length;
END class_by_day_get_bin_data;In the above code I'm using the hard coded value 2 for bin type
bin_data.bin_type = 2But I dont want any hard coded number or string in the query.
How could I replace it?
I defined conatant value like below inside my package body where the actual procedure comes.But I'm not sure whether I have to declare it inside package body or inside the procedure.
bin_type CONSTANT NUMBER := 2;But it does't look for this value. So I'm not able to get desired value for the report .
Thanks.
Edited by: user10641405 on May 29, 2009 1:38 PMDeclare the constant inside the procedure.
PROCEDURE class_by_day_get_bin_data(in_report_parameter_id IN NUMBER,
in_site_id IN NUMBER,
in_start_date_time IN TIMESTAMP,
in_end_date_time IN TIMESTAMP,
in_report_level_min IN NUMBER,
in_report_level_max IN NUMBER) IS
bin_period_length NUMBER(6, 0);
v_bin_type CONSTANT NUMBER := 2;
BEGIN
SELECT MAX(period_length)
INTO bin_period_length
FROM bin_data
JOIN site_to_data_source_lane_v ON bin_data.data_source_id =
site_to_data_source_lane_v.data_source_id
JOIN bin_types ON bin_types.bin_type = bin_data.bin_type
WHERE site_to_data_source_lane_v.site_id = in_site_id
AND bin_data.start_date_time >=
in_start_date_time - numtodsinterval(1, 'DAY')
AND bin_data.start_date_time <
in_end_date_time + numtodsinterval(1, 'DAY')
AND bin_data.bin_type = v_bin_type
AND bin_data.period_length <= 60;
--Clear the edr_class_by_day_bin_data temporary table and populate it with the data for the requested
--report.
DELETE FROM edr_class_by_day_bin_data;
INSERT INTO edr_class_by_day_bin_data
(site_id,
site_lane_id,
site_direction_id,
site_direction_name,
bin_start_date_time,
bin_end_date_time,
bin_id,
bin_value)
SELECT site_to_data_source_lane_v.site_id,
site_to_data_source_lane_v.site_lane_id,
site_to_data_source_lane_v.site_direction_id,
site_to_data_source_lane_v.site_direction_name,
bin_data_set.start_date_time,
bin_data_set.end_date_time,
bin_data_value.bin_id,
bin_data_value.bin_value
FROM bin_data
JOIN bin_data_set ON bin_data.bin_serial = bin_data_set.bin_serial
JOIN bin_data_value ON bin_data_set.bin_data_set_serial =
bin_data_value.bin_data_set_serial
JOIN site_to_data_source_lane_v ON bin_data.data_source_id =
site_to_data_source_lane_v.data_source_id
AND bin_data_set.lane =
site_to_data_source_lane_v.data_source_lane_id
JOIN (SELECT CAST(report_parameter_value AS NUMBER) lane_id
FROM report_parameters
WHERE report_parameters.report_parameter_id =
in_report_parameter_id
AND report_parameters.report_parameter_group = 'LANE'
AND report_parameters.report_parameter_name = 'LANE') report_lanes ON site_to_data_source_lane_v.site_lane_id =
report_lanes.lane_id
JOIN (SELECT CAST(report_parameter_value AS NUMBER) class_id
FROM report_parameters
WHERE report_parameters.report_parameter_id =
in_report_parameter_id
AND report_parameters.report_parameter_group = 'CLASS'
AND report_parameters.report_parameter_name = 'CLASS') report_classes ON bin_data_value.bin_id =
report_classes.class_id
JOIN edr_rpt_tmp_inclusion_table ON TRUNC(bin_data_set.start_date_time) =
TRUNC(edr_rpt_tmp_inclusion_table.date_time)
WHERE site_to_data_source_lane_v.site_id = in_site_id
AND bin_data.start_date_time >=
in_start_date_time - numtodsinterval(1, 'DAY')
AND bin_data.start_date_time <
in_end_date_time + numtodsinterval(1, 'DAY')
AND bin_data_set.start_date_time >= in_start_date_time
AND bin_data_set.start_date_time < in_end_date_time
AND bin_data.bin_type = v_bin_type
AND bin_data.period_length = bin_period_length;
END class_by_day_get_bin_data; -
How to force readObejct query with PK value to go to DB?
The default behaviour for read-object queries with a PK value is to use the cache and not go to the database. How can we change this behaviour?
We have cases that a row was deleted by some other process not through toplink, but the corresponding object still in the cache and if you use the readObject query with PK value, the object will be returned as result.
Thanks in advance,There are several mechanisms to disable caching in TopLink. Note that disabling caching will affect your performance.
In 9.0.4 you can use:
- You can configure you cache type to use a WeakIdentityMap to ensure that only referenced objects are cached.
- On descriptor you can call disableCacheHits() and alwaysRefreshCache() in code or click these options on the Caching/Identity tab in the Mapping Workbench.
- Or to explicitly remove a deleted object from the cache uses session.removeFromIdentityMap(), but you must ensure there are no other objects referencing it.
In 10.1.3 you can also use:
- On descriptor you can call setIsIsolated(true) in code, or select isolated in the Caching tab in the Mapping Workbench.
- Alternatively you can set a CacheInvalidationPolicy on your descriptor to ensure objects are not cached for longer than a specified time, or invalidated daily.
- Or to explicitly invalidate a deleted object use, session.getIdentityMapAccessor().invalidateObject() -
Records with a picklist field with empty values can't be seen from a report
Records with a picklist field with empty values can't be seen from a report. I've created a report that have a picklist as a column. When there is no values the record(s) associated to this picklist don't appear. Do you know what are the common causes for this event?
Regards
ArturoHi samrat chakraborty ,
go to SUIM > roles > roles by complexselection criteria>
under the selection according to authorization values give the object's form SU53 screen and press enter it will asks the values for given object pass the values as per the SU53 and execute it will give the list of roles.... capture the roles. The user gets access if you give the any one of the listed roles is assigned, assign the role as per your approval process.
Check with the below link for more assistence:
http://help.sap.com/saphelp_erp2004/helpdata/EN/71/8fba30840c6e4d90da3526971cc684/frameset.htm
Regards,
S.Manu. -
Php mysql integration with workgroup manager
Hello,
I run a non-profit arts organization. We have active and inactive members that are tracked with a php mysql web app that I wrote. I was wondering how I could query the workgroup manager from php to make the inactive members not be able to login to our computers. Also, it would be great if we could just add new members into the php web app and then send that new member's info to the workgroup manager.
Is this possible?
Thanks
AlexYes, I have an OS X 10.4.3 server - which is also integrated in the AD. If i log on locally on the server with an account from the AD, then the workgroup manager works perfectly.
Guess my main problem is that i don't know where in the process things goes wrong.
- Is it on the client, that it is not able to sent the right requests
- Is it on the OS X Server, where something is misconfigured
- Is it security settings in the AD that prevents the server and client from getting the right information
I have the possibility on both the server and client to do ldap requests through the address book - this tells me that i do have some sort of connection. And that is also verified by actually being able to login with AD accounts.
Is there any logs i should pay special attention to? All the logs i can see through server admin doesn't contain usefull information. The logs on the client located in /var/log only tells me about some minor issues with mcxd (something about the uid being 1325883267 - which confuses me a bit - i thought uid's on unix was between 1 and 65535 :/ )
/Martin -
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 -
Infoset query with cero values
Hi
I have an infoset query that reads the information from an infoset. The infoset query is able to read the values, because it shows me values, but everything is cero, although I have values different from 0.
But if it didn`t find values it would tell me a different message as "No application data found" or something like this.
Then the problem is, my infoset read values, but everything that shows me is cero, and that´s not true.
Thanks and regards
SEM SEMHi,
What do you mean with the join condition ?
I have an infoset query with only one ODS inside. I didn´t want to build a query directly to the ODS as I did´t want to mark the flag available for reporting in the ODS, as it already had very importat data and I didn´t want to damage the ODS data. That´s why I have built and infoset query with one ODS inside, and in this case I don´t understand the join condition....
Regards
SEM SEM
Does anybody know something ????
Regards
SEM SEM
Message was edited by:
SEM SEM -
Smartform table with empty value in cell
Hi,
in my smartform i´ve got a table with four fields:
e.g. MATERIAL QUANTITY BAGS TEXT
the question is that if value of field BAGS is initial the smartform displays
the value of field TEXT in the cell of field bags,
that is, if BAGS = INITIAL i would get:
MATERIALl QUANTITY TEXT
(the value of field TEXT has been shifted to the left)
What do i have to do in order to avoid the shifting of values to the left if one
of the cells has an empty value?
Best regards.Hi,
I guess you are using tabs to print the four fields of tables.
As those are fields of tables make use of TABLES concept in smartform instead of tabs. Then it will print in the exact location.
Give each field as one cell in the table.
Br,
Laxmi. -
Error In MySQL Query With DATE_FORMAT
this produses an empty query when it shouldn't. I've made some error when using DATE_FORMAT and filtering by MONTH and YEAR but not sure how to fix it:
mysql_select_db($database_VALUATIONS, $VALUATIONS);
$query_valuations = sprintf("SELECT val_Trans_id, DATE_FORMAT(val_Date '%d-%m-%Y'), val_Company_Name, val_Company_Ref, val_Manufacturer, val_Model FROM valuations WHERE val_Company_Ref = %s AND MONTH(val_Date) = %s AND YEAR(val_Date) = %s ORDER BY val_Date DESC", GetSQLValueString($colname_valuations, "text"),GetSQLValueString($colname2_valuations, "text"),GetSQLValueString($colname3_valuations, "text"));
Thanks if anyone knows the answer ......I think that works as you say but I still can't get it to work with WHERE clauses for month and year, this tst works:
<?php require_once('Connections/tallon_admin.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
return $theValue;
mysql_select_db($database_tallon_admin, $tallon_admin);
$query_Recordset1 = "SELECT DATE_FORMAT(val_Date, '%d-%m-%Y') as Date, val_Company_Name FROM valuations";
$Recordset1 = mysql_query($query_Recordset1, $tallon_admin) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Web Site</title>
</head>
<body>
<?php echo $row_Recordset1['Date']; ?> <br>
<br>
</body>
</html>
<?php
mysql_free_result($Recordset1);
mysql_free_result($mysql);
?>
I just can't get it working with a where clause to filter by month, this example returns an empty query when it shouldn't - also tried MONTH(val_Date) = %s
<?php require_once('Connections/tallon_admin.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
return $theValue;
$colname_Recordset1 = "-1";
if (isset($_GET['month'])) {
$colname_Recordset1 = $_GET['month'];
mysql_select_db($database_tallon_admin, $tallon_admin);
$query_Recordset1 = sprintf("SELECT DATE_FORMAT(val_Date, '%d-%m-%Y') as Date, val_Company_Name FROM valuations WHERE MONTH(Date) = %s", GetSQLValueString($colname_Recordset1, "date"));
$Recordset1 = mysql_query($query_Recordset1, $tallon_admin) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Web Site</title>
</head>
<body>
<?php echo $row_Recordset1['Date']; ?> <br>
<br>
</body>
</html>
<?php
mysql_free_result($Recordset1);
mysql_free_result($mysql);
?> -
UILoader won't display images from PHP/MYSQL query
I'm working on an online photo catalog, it works in straight PHP/HTML http://www.buckleyphotos.com/search/index.php but the photos are too easy to grab (Facebook and myspace are loaded with my photos). I know anything on screen can be grabbed, I just want to make it a little harder.
I've got a version of the ordering page with a SWF on it that will hopefully display the photos, http://www.buckleyphotos.com/searchtest/showpic.php?num=1&showpic=21_71909_6908.jpg&el=200 9-07-19+NEMX+Crow+Hill&riderno=21, but so far no luck.
Here's the PHP:
<?php
$page = $_GET['num'];
$el = urlencode($_GET["el"]);
$riderno = $_GET["riderno"];
$showPic = strtolower($_GET["showpic"]);
echo "$showPic";
?>
This is the Actionscript:
import fl.containers.UILoader;
var loader:UILoader = new UILoader();
loader.scaleContent = false;
loader.source = "showPic.php";
addChild(loader);
The SWF is in the same folder as the images.
Any help will be much appreciated.I'm stil woking on this one,
http://www.buckleyphotos.com/wsp5706/source/image/showpic.php?num=1&showpic=21_71909_6487. jpg&el=2009-07-19+NEMX+Crow+Hill&riderno=21
Here's the PHP code
<?php
$page = $_GET['num'];
$el = urlencode($_GET["el"]);
$riderno = $_GET["riderno"];
$showPic = strtolower($_GET["showpic"]);
echo "$showPic";
?>
You can see the file name of the photo above the light gray SWF, that's the result of the PHP query, echo "showPic"
This is the AS 3 code:
import fl.containers.UILoader;
var loader:UILoader = new UILoader();
loader.scaleContent = false;
loader.source = "showPic";
addChild(loader);
This is the HTML:
<param name="movie" value="http://www.buckleyphotos.com/wsp5706/source/image/Main2.swf">
<param name="quality" value="high">
<param name="wmode" value="opaque">
<param name="swfversion" value="6.0.65.0">
<param name="expressinstall" value="../Scripts/expressInstall.swf">
<param name="allowScriptAccess" value="always">
<param name="loader.source" value="$showPic"> -
Issue with empty value of LOV of first row after clicking on add row button
JDeveloper 11.1.14
I have a page with table-form layout.
In the form I have two detail tables on the same page (tabbed).
I have an issue with using model-choicelist LOV's in the detail tables.
I am able to add a new row in the detail table, select a value from the model-choiceList LOV (which is required) and save the new row.
After adding another row in this table the value of the model-choiceList LOV in the previous row is suddenly empty on the screen. It is not empty in the database,
I have checked it in the datbase. Only the value of the LOV of the first row on the page is being cleared after clicking on the add row button.
After saving the new row I get the following error on the screen:
Error: a selection is required. --> first row
Does anyone have a suggestion how to solve this issue?After adding another row in this table the value of the model-choiceList LOV in the previous row is suddenly empty on the screen. It is not empty in the database, Is the complete LOV blank or only the selected value .. can you try putting autoSubmit=true in the LOV and try ? Also check if you have any partialTriggers on the LOV from the add button ?
-
MYSQL Query with Session Variable
I would like to log in and after login success php will
automatically query records using my username as the parameter.
How can it be done in dreamweaver?
How can I insert multiple values dependent on what I selected
on a list/menu?
Thank you!yeow Start by using PreparedStatement in your code.
-
I HAVE HOST ON YAHOO AND THIS SCRIPT DOSN'T WORK WITH YAHOO
can u help me ....
<?php
# FileName="Connection_php_mysql.htm"
# Type="MYSQL"
# HTTP="true"
$hostname_midcommerce = "localhost";
$database_midcommerce = "DATABASE";
$username_midcommerce = "USER";
$password_midcommerce = "PASSWORD";
$midcommerce = mysql_pconnect($hostname_DATABASE,
$username_DATABASE, $password_DATABASE) or
trigger_error(mysql_error(),E_USER_ERROR);
?>Hung Kuen Kung Fu wrote:
> MYSQL is not listed under the phpinfo page. MMM. Not
sure how to enable this in the php.ini so i will have to look.
Remove the semicolon from the beginning of these lines in the
Windows
extensions section:
;extension=php_mbstring.dll
;extension=php_mysql.dll
Also add this line after them:
extension=php_mysqli.dll
David Powers
Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
http://foundationphp.com/ -
CAML Query with Javascript value
Hey everyone,
I am building an Sharepoint 2013 app (SharePoint-Hosted) and using a CAML Query to get the current Item.
The Current Item ID is 1 and i stored it in AccountID, but i want that variable inserted in the CAML Query so i get the proper information.
var AccountID = 1
camlQuery.set_viewXml('<View><Query><Where><Eq><FieldRef Name=ID LookupId="TRUE"/><Value Type="Text">1</Value></Eq></Where></Query></View>');
But instead of putting the '1' value in the CAML Query, i want the variable AccountID in it... but how?
Already tried this, but that didn't work:
camlQuery.set_viewXml('<View><Query><Where><Eq><FieldRef Name=ID LookupId="TRUE"/><Value Type="Text">' + AccountID + '</Value></Eq></Where></Query></View>');
Can someone help me with this?
In forward, many thanks!Right, you have to use single quotes in a string literal inside double quotes. Just making sure it didn't have NO quotes, as your initial post showed.
Is the ID field actually a lookup field? Or is it just the built-in ID field of the list? If it isn't a field of TYPE Lookup, try this:
camlQuery.set_viewXml("<View><Query><Where><Eq><FieldRef Name='ID' /><Value Type='Number'>" + AccountID + "</Value></Eq></Where></Query></View>");
Danny Jessee
MCPD - SharePoint Developer 2010
MCTS - SharePoint 2010, Configuring
dannyjessee.com/blog
Maybe you are looking for
-
How can I get my iPhone 5s to work in my 2015 outback
How can I get my iPhone 5s to work in my 2015 outback?
-
File Sharing Only One-Way Now Since Soft Crash
Greetings! Several months ago my 1.25 10.4.11 eMac suffered not a physical hard drive crash but some kind of software crash that scrambled directories. Disk Warrior made the system functional again, save an occasional prefs or cookie glitch caused by
-
No selection with SIGN = 'I'; OPTION 'GE' allowed
Hello All, I have added an ABAP routine in one of the InfoPackage to filter a field CREATDATE(char,8). Whenever I am executing the InfoPackage I am getting the following error:- For sel. field 'CREATDATE', no selection with SIGN = 'I'; OPTION 'GE' al
-
Wifi Does Not detect my network but does others
Hi there, I managed to get great responses last time I had an issue and now I'm back. Here's the issue and I will also say what I've tried so far to fix it. ISSUE On-and-off my laptop cannot detect (and hence join) my own Wi-Fi network, even when rig
-
MyDAQ university project basic help needed
Hi, I am looking to set up a myDAQ in Labview to take in audio waves, and control a vibration motor if a certain decibel limit is reached. I have used the daq assistant to manage an audio input and have this setup so voltages from a mic are read cont