Update record problem PHP MYSQL
hi all,
I have a problem with DW 8's update server behaviour. I'm not
sure if its that or a MYSQL problem:
I have one page: upload2.php and there is an option for the
user to change their password.
But when I enter the user details, and the new password, the
database does not change at all.
Where am I going wrong?
The_FedEx_Guy wrote:
> Which header information is this? I have never come
across this.
It's probably the most common beginner's mistake in PHP after
forgetting
such things as semicolons or matching quotes:
"Remember that header() must be called before any actual
output is sent,
either by normal HTML tags, blank lines in a file, or from
PHP. It is a
very common error to read code with include(), or require(),
functions,
or another file access function, and have spaces or empty
lines that are
output before header() is called. The same problem exists
when using a
single PHP/HTML file."
http://uk.php.net/manual/en/function.header.php
David Powers, Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/
Similar Messages
-
Best way to update images using PHP / MySQL?
HI
I want to update images using PHP/MySQL, so users can update their images and maybe some other files but mainly images.
thanksHow messed up is this code?!
<?php
//connect to database
$con = mysql_connect("testhost","testuser","pass");
// file properies
$file = $_FILES['image']['tmp_name'];
if (!isset($file))
echo "please select an image";
else {
$id = $_REQUEST['id_display'];
$image = ($_FILES['image']['tmp_name']) ? file_get_contents ($_FILES['image']['tmp_name']) : '';
$image_name = ($_FILES['image']['name']) ? addslashes($_FILES['image']['name']): '';
$image_size = ($_FILES['image']['tmp_name']) ? getimagesize($_FILES['image']['tmp_name']): '';
if ($image_size == FALSE)
echo "You have not selected an image.";
else {
mysql_select_db("test_display", $con);
mysql_query("UPDATE testtable SET image = '$image', imagename = '$image_name' WHERE id_display='$id'");
?>
And the upload page....
/*Update code */ /*End update code */ -
Hello! I want to start off by saying that I usually
use the wizards for things, and am not so great at PHP. I have
David Powers fantastic book and am using it as a bible of sorts.
However, it's not helping here.
I'm using DW CS3 - I have a PHP MySQL database set-up and
everything else seems to be working fine.
I have a section of my site that is password protected. I
have used the Dreamweaver Developer's Toolkit to create the
protected folder. That works great. I have a page in which my
site's users can "Manage Their profiles." I set up the links to the
various pages with different profiles as dynamic links with the URL
showing the user ID. That works.
I even set up so that the "Change Password" link has a
dynamic field on it that shows the users User ID - just so I know
that the information is being passed correctly. And it is. I've set
up a recordset for this page - and it can grab the appropriate
information from the users record, and only that users record. I've
tried the Update Record wizard and just about everything else I can
think of here - and NOTHING is working. The password field is never
updating. It's remaining the same. HELP!
I have spent WAY too much time trying to figure this out and
need to launch this part of the site very soon. Can anyone help me?
Is the DW Developer's Toolkit folder security thing interfering?
Thanks!
Carlenepuppet_factory wrote:
> I have spent WAY too much time trying to figure this out
and need to launch
> this part of the site very soon. Can anyone help me? Is
the DW Developer's
> Toolkit folder security thing interfering?
Without seeing the code, it's impossible to say what's wrong.
I don't
know enough about ADDT to comment on the effect it might be
having.
There's a separate forum dedicated to ADDT. You might get
better help there.
In the meantime, though, you can do some debugging yourself
by using
echo to display what's happening. For example:
if ($_POST) {
echo 'The $_POST array contains values<br />';
Use echo to display the UPDATE SQL query.
Staring at code does little to solve problems. Displaying
messages to
show what the code is doing helps isolate problem areas.
David Powers, Adobe Community Expert
Author, "The Essential Guide to Dreamweaver CS3" (friends of
ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/ -
drmwv 8; ASP.NET; access 2003
I want to make a record-update page with the wizard.
With just 1 record showing on the page, update is working.
If I add a repeated region and a navigation bar, I get this
errors:
System.Data.OleDb.OleDbException: Field 'gegevens.voornaam'
cannot be a zero-length string.
at
System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS
dbParams, Object& executeResult)
at
System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object&
executeResult)
at
System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior
behavior, Object& executeResult)
at
System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior
behavior, String method)
at System.Data.OleDb.OleDbCommand.ExecuteNonQuery()
at DreamweaverCtrls.DataSet.DoInit()
When I put all fiels "allow zero length YES", every time I
update a record, the record shows up complete empty...Your problem is a NullPointerException.
Use Blocks of try...catch in your code to find the line with problems.
Example:
<%
try {
String username = (String)session.getAttribute("username"); // get the session variable value
String oldPassword = request.getParameter("oldPassword");
String newPassword = request.getParameter("newPassword");
String confirmPassword = request.getParameter("confirmPassword");
catch(Exception e) { out.println("The NullPointerException is here!"); }
%>
A greeting. -
Delete record behaviour (PHP/mySQL)
I've just worked through this whole database thing from
scratch again after a little glitch, and it's all working pretty
well.
I do still have the issue with deleting records - I have the
search results page which is fine, and has a delete options at the
end of the row.
It was working just fine bringing up the 'confirm deletion'
page with the selected record - but it goes wrong after I add the
'delete record' server behaviour.
Basically after I do, when I click delete in the results
page, it skips the 'confirm deletion' page, going straight to the
'deletion confirmed' page. It's as tho' simply going to the
confirmation page is triggering the deletion, rather than requiring
the 'delete record' button to be pressed. Does the form / button
require an 'action'? Although as far as I can tell I followed the
instructions
correctly, but something is going wrong on the confirmation page.
It does still delete the record at least, but it would be
good to have the confirmation page.
Here's a link (if you need to log in use 'admin' and
'password'.)
link
This is all the script code in the 'confirm delete' page :
<?php require_once('../Connections/ConnHandprint.php');
?>
<?php
function GetSQLValueString($theValue, $theType,
$theDefinedValue = "", $theNotDefinedValue = "")
$theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue)
: $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;
if ((isset($_GET['recordID'])) && ($_GET['recordID']
!= "")) {
$deleteSQL = sprintf("DELETE FROM Contacts WHERE
ContactID=%s",
GetSQLValueString($_GET['recordID'], "int"));
mysql_select_db($database_ConnHandprint, $ConnHandprint);
$Result1 = mysql_query($deleteSQL, $ConnHandprint) or
die(mysql_error());
$deleteGoTo = "contactdeleted.php";
if (isset($_SERVER['QUERY_STRING'])) {
$deleteGoTo .= (strpos($deleteGoTo, '?')) ? "&" : "?";
$deleteGoTo .= $_SERVER['QUERY_STRING'];
header(sprintf("Location: %s", $deleteGoTo));
$colname_Recordset1 = "1";
if (isset($_GET['recordID'])) {
$colname_Recordset1 = (get_magic_quotes_gpc()) ?
$_GET['recordID'] : addslashes($_GET['recordID']);
mysql_select_db($database_ConnHandprint, $ConnHandprint);
$query_Recordset1 = sprintf("SELECT * FROM Contacts WHERE
ContactID = %s", $colname_Recordset1);
$Recordset1 = mysql_query($query_Recordset1, $ConnHandprint)
or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
?>
Any ideas?
CheersHello,
S. Khawar wrote:
my question is that when I execute DELETE_RECORD built in it fails due to constraint restriction and Oracle forms raise message that "Child record exist/unable to delete record " until here it's Ok but Oracle Forms still removes record from the screen/form and move up the remaining records(although record is failed to delete).Yet this is the default forms behaviour. Because when you press delete it will remove from the screen but not from the database till you use COMMIT as francois mentioned.
I want the Oracle Form to do not remove record from screen/form once it's failed to delete record actually.Yes, for this type of requirement. Why don't you check dependency of record before removing the record. What i mean is you can use the code in KEY-DELREC trigger like below (before using the DELETE_RECORD built-in) for checking if child record exists then show message otherwise remove. For example...
DECLARE
vCntRec NUMBER;
BEGIN
SELECT COUNT(*)
INTO vCntRec
FROM child_table_name
WHERE key_column = :form_key_column_name;
IF vCntRec>0 THEN -- Here means record found in child table so it will not remove from screen but message will appear.
MESSAGE('<Your error message goes here...>');
MESSAGE('<Your error message goes here...>');
RAISE FORM_TRIGGER_FAILURE;
ELSE -- Here mean there is not dependency so it will remove which is default forms behaviour.
DELETE_RECORD;
END IF;
END;So, when you will press button for delete first it will check for any child record if exsits then it will display message and will not vanish from the screen otherwise it will remove from the screen and furthor COMMIT will remove from database.
-Ammad
Edited by: Ammad Ahmed on Jul 7, 2010 8:48 AM -
Hi,
SQL> update registrant set registered=1 where (select r_id from users where co_id=1);
update registrant set registered=1 where (select r_id from users where co_id=1)
ERROR at line 1:
ORA-00936: missing expression
SQL> select r_id from users where co_id=1;
R_ID
1
SQL> Where am doing mistake?
Best regardsWhere is the column after your 'where' reserved word?
update registrant set registered=1 where ??? (select r_id from users where co_id=1); -
How to update PHP, MySQL or Apache
The Mac OS X 10.6.2 system does not include the latest versions of PHP, MySQL or Apache.
What is the recommended update procedure for PHP, MySQL or Apache:
a) automatically by Mac OS X system (is this possible?) or
b) manually by the administrator (are there any documentations?)
Many thanks.
Actual system versions:
Mac OS X 10.6.2
MySQL 5.0.82
Apache 2.2Hi, Thanks for your answer.
That sounds Apple do not seriously release updates of third party packages shipped with the system (like Apache, mySQL ...) very often.
To use month or year old packages in a web environment is a big risk, e.g. mySQL actual official version is V5.50 / mySQL Version shipped and updated by Mac OS X 10.6.2 Server is V5.0.82).
The same with Apache and PHP, both are packages included in Mac OS X Snow Leopard Server product by Apple and are included in a old version.
And when manually updates by the administrator of the server system do not work well or are not supported by the OS X Server system (as I understand your posting), the administrator can not act to improve and secure the system.
That can only lead to one conclusion: Apple's Mac OS X Snow Leopard Server should not be used in a productive, internet faced web environment.
Is this true? I do not want to believe this!?
Is there really no official supported or documented procedure by Apple to keep the integrated third party components updated?
I'd like to prefer Mac OS X Server odd Linux distribution because it seems more handy to administrate and to use, e.g. tools like Server Admin. These tools are an advantage of Mac OS X Server. -
Where can I download the latest PHP MySQL libraries?
my phpMyAdmin panel says "Your PHP MySQL library version 5.0.82 differs from your MySQL server version 5.1.45. This may cause unpredictable behavior."
I should update Leopard's PHP MySQL library to 5.1.45 or downgrade MySQL to 5.82… but I can't find any.
In the while I find MySQL 5.0.82 or an alternative fix…
Do you know where I can find those libraries?
Thanks.I found that newest php works with its own mysql (5.0.9, or so) and it's not using mine. I'd rather install back the one shipped with Leopard if I had to go versions back.
Also, I couldn't get it to work (#2002 error, sockets were there but still not working) and once I uninstalled it, it was supposed to leave the OS untouched, but Leopard's didn't come back to life. I had to add the following lines to httpd.conf, otherwise the php code was shown, instead of executed.
AddType application/x-httpd-php .php .phtml
DirectoryIndex index.html index.php
I'd think I saw the previous mysql folders somewhere and Leopard making an alias to the right one somewhere. Do you remember where? -
PHP/mySQL Insert/Update Problems
I hope someone can help because I can't find anything online
that is helping me with this problem. I can't get the Dreamweaver
controls to work when coding a PHP insert or update record page. It
looks like it creates the code correctly but when I put them out on
my webserver and then fill out the form and click submit the page
submits and tries to use a URL string of (null)/admin/index.php
where index.php is the form page not the page I told it to redirect
to. I don't know why the (null) value keeps getting inserted into
the string either. The browser obviously can't find this URL so
gives a page cannot be displayed screen and nothing get's inserted
or updated in the mySQL database.
Any help would be greatly appreciated. This problem is
driving me crazy because I want to save time not having to hand
code things. Below is a User Authentication page using the
Dreamweaver controls that does the same thing when I try to
login.tobyd wrote:
> the page submits and tries to use a URL string of
(null)/admin/index.php
> where index.php is the form page not the page I told it
to redirect to. I don't
> know why the (null) value keeps getting inserted into
the string either.
The following two lines set the URL for login success and
failure.
> $MM_redirectLoginSuccess = "../admin_index.php";
> $MM_redirectLoginFailed = "../admin/index.php";
As you can see, they are relative paths, suggesting that the
login form
is in a different subfolder, but at the same level as
admin_index.php
and the admin folder. The (null) almost certainly comes from
the fact
that your login page is in the site root. If you're typing in
the
redirect filenames manually, use the Browse button instead.
Dreamweaver
should set the correct path for you.
David Powers, Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/ -
Problems with mysql after update to php 5.3
Hi everyone,
I know I am not the only one having trouble with that upgrade but so far I still have some issues.
I have read the news about the update and the wiki. I use apache, php, mysql and phpmyadmin.
After the update, I installed php-apache, php-mcrypt and used php.ini.pacnew to do my new configuration.
Everything works fine except mysql.
I have a weird problem that is that I can access and do whatever I want to databases with phpmyadmin but as soon as I try to connect to the mysql database with php code then my browser tells me that the page can't be loaded and that "the connection terminated unexpectedly". What is the problem ? Am I the only one in this situation ?
Thanks for your time !Here it is, that's the error log of httpd:
[Sun Sep 27 17:25:07 2009] [notice] child pid 2006 exit signal Segmentation fault (11)
[Sun Sep 27 19:40:32 2009] [error] [client 127.0.0.1] File does not exist: /srv/http/favicon.ico
[Sun Sep 27 19:40:36 2009] [error] [client 127.0.0.1] File does not exist: /srv/http/favicon.ico
[Sun Sep 27 19:40:37 2009] [error] [client 127.0.0.1] PHP Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /home/yms/projects/homepage/yms/index.php on line 60, referer: http://localhost/~yms/
[Sun Sep 27 19:40:37 2009] [error] [client 127.0.0.1] PHP Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /home/yms/projects/homepage/yms/index.php on line 73, referer: http://localhost/~yms/
[Sun Sep 27 19:40:37 2009] [error] [client 127.0.0.1] PHP Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /home/yms/projects/homepage/yms/index.php on line 60, referer: http://localhost/~yms/
[Sun Sep 27 19:40:37 2009] [error] [client 127.0.0.1] PHP Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /home/yms/projects/homepage/yms/index.php on line 73, referer: http://localhost/~yms/
[Sun Sep 27 19:40:37 2009] [error] [client 127.0.0.1] File does not exist: /srv/http/favicon.ico
[Sun Sep 27 19:40:38 2009] [notice] child pid 2003 exit signal Segmentation fault (11)
[Sun Sep 27 19:40:38 2009] [notice] child pid 2577 exit signal Segmentation fault (11)
And that's the access log in case it is useful:
127.0.0.1 - - [27/Sep/2009:19:40:32 +0200] "GET / HTTP/1.1" 200 788
127.0.0.1 - - [27/Sep/2009:19:40:32 +0200] "GET /favicon.ico HTTP/1.1" 404 1085
127.0.0.1 - - [27/Sep/2009:19:40:32 +0200] "GET /icons/blank.gif HTTP/1.1" 200 148
127.0.0.1 - - [27/Sep/2009:19:40:32 +0200] "GET /icons/folder.gif HTTP/1.1" 200 225
127.0.0.1 - - [27/Sep/2009:19:40:36 +0200] "GET /~yms HTTP/1.1" 301 368
127.0.0.1 - - [27/Sep/2009:19:40:36 +0200] "GET /~yms/ HTTP/1.1" 200 1150
127.0.0.1 - - [27/Sep/2009:19:40:36 +0200] "GET /favicon.ico HTTP/1.1" 404 1085
127.0.0.1 - - [27/Sep/2009:19:40:36 +0200] "GET /icons/back.gif HTTP/1.1" 200 216
127.0.0.1 - - [27/Sep/2009:19:40:37 +0200] "GET /favicon.ico HTTP/1.1" 404 1085
And thanks for trying to help me ;-) -
Problem with update record, then link to file
Environment:
Dreamweaver 8, MySQL, PHP.
I have a repeating record from my database. I added an Update
Record server behavior for each search result for the result table.
I added a button to the form and changed "submit" to "view".
Pressing "view" is supposed to allow the user to view the detailed
record information.
The Update Record server behavior is supposed to do two
things:
1) add 1 to the 'numViews' filed of the record's database
entry when the "view" button is pressed
2) After updating the numViews field, the form is supposed to
redirect the user to the detailed record
I found that depending on how I create the record, I an do
one of the above 2 behaviors, but not both. HELP!
To add 1 to the numViews field, I created a form variable
called incNumViews, which does the following:
<?php echo $row_rsSearchResults['recipeNumViews']+1; ?>
Very simple.
The Update Record ends up changing the form action to the
following:
<?php echo $editFormAction; ?>
Looking at the code for this, I ee the following:
$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
$editFormAction .= "?" .
htmlentities($_SERVER['QUERY_STRING']);
But when the "view" (ie: submit" button for the form is
pressed, I get redirected back to the same repeating record search
result page, not to the record detail page.
However, the numViews field in the record is getting properly
incremented.
I tried to get around this by changing the Update Record
behavior "After updating, go to:" field to point to the record
detail page, and tried passing a parameter tot he recordID I want
to see details of, as a URL parameter, but that does not work.
If I change the Update Record form action from
<?php echo $editFormAction; ?>
to
record_detail.php?recordID=<?php echo
$row_rsSearchResults['recordID']; ?>
Then I am able to link to the detail page, but NOT update the
numViews field.
HOW can I fix this to both update the record, then jump to
the detail page with a URL parameter being passed, when I click the
"view" (submit) button o the form??
Thanks in advance.If the user's computer doesn't know what to do with a TIFF file, I guess that Open button would be missing. Tiff is not a web normal file format, or even a common one for graphics applications....
-
I've got a multi page form that carries values across
multiple pages with the use of Hidden Fields and then on last page
inserts the record into a MySQL database (for this I used the built
in Insert Record function of dreamweaver). My problem is that it
works well when using Internet Explorer, values are carried forward
and everything is inserted successfully to the database.
But, when using Mozilla Firefox it looks as if it works, I
get the confirmation at the end, but the record is not being
inserted to the database. I've worked through this step by step and
the values are being carried across in the hidden fields but it
just will not insert anything to the database.
Has anyone got any ideas??
Thank you in advance.Cade06 wrote:
> Thanks alot for your reply, but I am completely new to
MySQL, and I am not
> quite sure how the syntax works. When you say " WHERE
landlord_username =
> 'whatever' "I'm not sure what needs to go in the
'whatever' portion of the
> code. Do I need to insert static text here or something
else? I am totally out
> of my element here, sorry :-/
It's probably not so much MySQL syntax that's the problem for
you, but a
lack of understanding how to work with Dreamweaver
recordsets, server
behaviors, and sessions. Building database-driven sites with
Dreamweaver
isn't difficult, but there are a lot of things involved.
The Log In User server behavior automatically creates a
session variable
called $_SESSION['MM_Username']. You can use this as a
parameter to pass
to the SQL query in the Advanced Recordset dialog box. In the
SQL area
you would type (I'm guessing the name of your table and the
username
column):
SELECT landlord_id FROM landlords
WHERE landlord_username = 'col1'
Then click the plus button above the Variables area, and
create a
Parameter with the following values:
Name: col1
Default value: 1
Runtime value: $_SESSION['MM_Username']
You can then extract the result of the recordset, and assign
it to a
session variable like this:
$_SESSION['landlord_id'] = $row_recordsetName['landlord_id'];
> Also, I understand that I need to do this on the login
page, but do I need to
> define the recordset again on the add_site page as well?
I guess I'm still not
> quite clear on how I specify the session variable as the
value that needs to be
> entered in the sites table as the landlord_ID.
As long as the session is still valid (which it would be if
you use
Restrict Access to Page), you will always have access to that
landlord's
id through $_SESSION['landlord_id'].
David Powers
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
Author, "Foundation PHP 5 for Flash" (friends of ED)
http://foundationphp.com/ -
PHP MySQL data display problem
I am having trouble getting data to display on my web page.In Dreamweaver CS3, I created a new page.
Selected PHP as the type.
Saved it.
Connected a database and created a recordset (all using Dreamweavers menus. I did not write any code).
NOTE: The database is on a remote server.
The TEST button displayed the records from the recordset with no problem.
On the new page, I then typed some text.
Then dragged some fields from the Bindings tab to the page.
I saved it and then went to preview it in my browser.
The page comes up completely blank. Not even the text shows.
I then saved the page as an HTML page.
When I preview this in my browser, the text shows, but the fields and data do not.
I then tried creating a dynamic table (again, using the Dreamweaver menus.).
A similar thing happens, ie. If I save it as an HTML, the text shows and the column labels and border shows, but no data.
Nothing shows if I save it as a PHP file.
I can view the data online using files created by PHPMagic, so I know the data is there and retrievable.
It is just in pages created in Dreamweaver that don’t work.
What am I doing wrong?My web server supports PHP. I can disply PHP pages created by other software packages, just not the Dreamweaver ones.
Frank
Date: Thu, 4 Jun 2009 19:04:03 -0600
From: [email protected]
To: [email protected]
Subject: PHP MySQL data display problem
To view php pages - or pages with PHP code in them - in a browser, the page must be served up by a Web server that supports PHP. You can set up a testing server on your local machine for this purpose. Look for WAMP (Windows), MAMP (Mac), or XXAMP for some easily installed packages.
Mark A. Boyd
Keep-On-Learnin'
This message was processed and edited by Jive.
It shall not be considered an accurate representation of my words.
It might not even have been intended as a reply to your message.
> -
Problems with recordset in PHP/MySQL setting
We use Dreamweaver CS5 for creating dynamic pages (PHP pages with MySQL database). We test the site locally on a Windows 7 operating system with EasyPHP as WAMP server.
We often have a problem in managing the record set.
The following problem occurs quite often:
We take a PHP page. We create a recordset. We use a dynamic table or a repeated region to show the results of the recordset. So far so good.
Then we want to change something to the recordset for example the filter. When editing the recordset, the advanced mode is shown, it is impossible to swith to the simple mode.
By deleting the recordset the problem is not solved. By deleting and afterwards rebuilding the recordset, syntax errors occur. It seems that the php code for building the recordset didn't dissapear.
The only solutions till now seems to completely restart with a new PHP page.
Anyone has a solution for this or anyone did experience the same problem ?
Thank you very much in advance.
IlseYou cannot switch to Simple mode in the Recordset dialog box if you have made any changes to the SQL in Advanced mode.
Opening the Recordset dialog box to edit the settings does occasionally result in the code being inserted again instead of being changed. This appears to be an intermittent bug, which I have experienced myself, and know that others have complained about it, too. As far as I know, there is no solution other than to watch carefully the code that Dreamweaver generates.
If you don't understand the code, you would be well advised to learn what it means and does. Relying on Dreamweaver to do everything for you severely limits what you can do with PHP/MySQL. Adobe regards the server behaviors as quick prototyping tools, rather than for developing production websites. -
I originally posted this in the Flash Builder forum before seeing this one
Hi All.. hope someone can help.
I've started a very simple application and experiencing a problem regarding creating a new record in a MySQL database via PHP & Zend.
Here's the snippet of AS:
newLine.buy_price = cursor.current.buy;
newLine.sell_price = cursor.current.sell;
linesService.createLines(newLine);
createLineResult.token = linesService.commit();
Here's the snippet of PHP (all generated by FB):
public function createLines($item) {
$stmt = mysqli_prepare($this->connection, "INSERT INTO $this->tablename (supplier, sku, product_name, quantity, buy_price, sell_price) VALUES (?, ?, ?, ?, ?, ?)");
$this->throwExceptionOnError();
mysqli_stmt_bind_param($stmt, 'iisiii', $item->supplier, $item->sku, $item->product_name, $item->quantity, $item->buy_price, $item->sell_price);
$this->throwExceptionOnError();
mysqli_stmt_execute($stmt);
$this->throwExceptionOnError();
$autoid = mysqli_stmt_insert_id($stmt);
mysqli_stmt_free_result($stmt);
mysqli_close($this->connection);
return $autoid;
When I run the createLines() function then commit(), I get the following error popup from my application:
MySQL Error - 1064: 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 'lines (supplier, sku, product_name, quantity, buy_price, sell_price) VALUES (?, ' at line 1
#0 C:\wamp\www\XOM-debug\services\LinesService.php(119): LinesService->throwExceptionOnError()
#1 [internal function]: LinesService->createLines(Object(stdClass))
#2 [internal function]: ReflectionMethod->invokeArgs(Object(LinesService), Array)
#3 C:\wamp\www\ZendFramework\library\Zend\Server\Reflection\Function\Abstract.php(380): call_user_func_array(Array, Array)
#4 C:\wamp\www\ZendFramework\library\Zend\Amf\Server.php(359): Zend_Server_Reflection_Function_Abstract->__call('invokeArgs', Array)
#5 C:\wamp\www\ZendFramework\library\Zend\Amf\Server.php(359): Zend_Server_Reflection_Method->invokeArgs(Object(LinesService), Array)
#6 C:\wamp\www\ZendFramework\library\Zend\Amf\Server.php(553): Zend_Amf_Server->_dispatch('createLines', Array, 'LinesService')
#7 C:\wamp\www\ZendFramework\library\Zend\Amf\Server.php(629): Zend_Amf_Server->_handle(Object(Zend_Amf_Request_Http))
#8 C:\wamp\www\XOM-debug\gateway.php(69): Zend_Amf_Server->handle()
#9 {main}
As as I see it, the parameters are not being replaced by the actual values, so MySQL is freaking out as it's getting question marks in the statements. What I don't understand is how this is happening! Everything is auto-generated by FB. I created a new project from scratch and used only drag & drop from the Data/Services panel to generate a form for data entry and got the same error.
Any ideas!?
Cheers,
SteveCharles Newbury wrote:
> How can I return to a screen containing the record I
originally clicked to
> modify? (it could be way down the list)...
I answered the same question a couple of days ago:
http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=12&catid=189&threadid =1294897&enterthread=y#4687934
David Powers, Adobe Community Expert
Author, "The Essential Guide to Dreamweaver CS3" (friends of
ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/
Maybe you are looking for
-
Fed up with Adobe's customer service
I have to say that Adobe takes the cake as the most inept company in the US, along with AT&T. I filed my application for the free upgrade from CS5.5 in early May, right away they asked me for the invoice, even though I had sent them PDFs of the order
-
Long Text Editor displaying & incorrectly.
Hi Experts, Currently I am facing an issue that the & sign is not being displayed correctly in the Long text editor. It is shown as '<(>&<)>' in some places and '&' in others. I understand that the <(> symbol is used as protection for
-
now i have a problem: how to show the picture dynamicly on one point in the template? Or how to output the image blob field into the rtf template directly from the source table? Edited by: user649343 on Sep 29, 2009 7:50 PM
-
Can someone please help to recover all my music, I had a different computer before and I didnt transfer my music to my new laptop. I had all my muisc in my itouch though. I downloaded the new itunes and lost all my music, i will like to know what can
-
Does anyone out there know anyone with OBI EE (Siebel Analytics) expertise that is looking for work? I have an open position.