(PHP/MySql) Create Recordset but no column

Thanks for reading this, I am new to PHP/MySql
I have created a website www.ritchiecraft.co.uk which uses
PHP/MySql with Dreamweaver 8. I have created recordsets on most
items pages and filtered data as neccessary. After the site was up
and running I was required to insert a new topic and when I went to
create a new page and insert the recordset no data was placed in
the columns area and the filter/sort options were greyed out. I
checked the existing pages and found that this was happening to all
pages with recordsets. The connection, table data was there.
The site still works fine but I cannot introduce new pages or
edit existing because of the recordset problem. I was advised
previously to delete the Dreamweaver cache file but this did not
help.
The site is hosted commercially and the database was created
with phpMyAdmin and dont seem to have any connection problems.
Thanks for your time and any suggestions are welcome.

sweetman wrote:
> How can I set a query so that it sounds like this:
>
> SELECT $_GET['id'] FROM mytable ORDER BY myorder ASC?
You can't do it through the Recordset dialog box. The simple
way to do
it is to create this query in the Recordset dialog box:
SELECT * FROM myTable
ORDER BY myOrder ASC
Then go into Code view and locate the following line:
$query_recordsetName = "SELECT * FROM myTable ORDER BY
myOrder ASC";
Change it to this:
if (isset($_GET['id'])) {
$col = get_magic_quotes_gpc() ? stripslashes($_GET['id']) :
$_GET['id'];
$col = mysql_real_escape_string($_GET['id']);
else {
$col = '*';
$query_recordsetName = "SELECT $col FROM myTable ORDER BY
myOrder ASC";
David Powers, Adobe Community Expert
Author, "The Essential Guide to Dreamweaver CS3" (friends of
ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/

Similar Messages

  • If DW 2014.1 cc does not support database, binding, server behavior, and PHP/MySQL require it, but using Adobe Extensions Mngr IS NOT recommended, then WHAT TOOLS do we use to develop a database with DW?

    I'm using windows DW 2014.1 cc. I'm following lynda.com tutorials to build a website database with PHP and MySQL. I learned I have to download Adobe Extension Mngr to active DATABASE, BINDING, SERVER BEHAVIOR panels, which I've done. BUT NOW I'VE BEEN ADVISED NOT TO USE THESE TOOLS for new development. If this is the truly the case, then WHAT TOOLS DO I USE to develop a website that has a database?

    then WHAT TOOLS DO I USE to develop a website that has a database?
    Besides the tools you would already need for a system using server behaviors (web server, PHP, MySQL, phpMyAdmin) the only extra tool you need is your own brain.
    A lot of people are disappointed by the lack of database tools in DW now, but really it's much better this way. You can never achieve better than a rinky-dink dynamic website using server behaviors. The code Dreamweaver dynamic behaviors create is really terrible. (I'm not insulting the fine folks who wrote the feature. It's just a consequence of automated code.) You can write better, simpler, more maintainable code yourself, and over time you will improve. With server behaviors you cannot improve. you get stuck in database kindergarten.

  • Using LIMIT function in PHP/MySQL Dreamweaver RecordSet

    I want to have a record set that skips the first record, and shows the next three. I've found several suggestions online to use the LIMIT function, but I keep getting "error in SQL syntax." What am I missing?
    mysql_select_db($database_adventcms, $adventcms);
    $query_rsSideNews = "SELECT * FROM tb_news LIMIT 1, 3 WHERE status = 'Live' ORDER BY `date` DESC";
    $rsSideNews = mysql_query($query_rsSideNews, $adventcms) or die(mysql_error());
    $row_rsSideNews = mysql_fetch_assoc($rsSideNews);
    $totalRows_rsSideNews = mysql_num_rows($rsSideNews);

    And there we go. That's the reason I need to go through PHP/MySQL training rather than relying on google searches!

  • [php+mysql] How to select a column using URL parameter?

    Hi all,
    I need to select a specific column from a mysql db.
    I have the column name in a URL parameter.
    How can I set a query so that it sounds like this:
    SELECT $_GET['id'] FROM mytable ORDER BY myorder ASC?
    I tried everything with dreamweaver but I cannot get anything
    similar
    to what I need.
    Is there a solution?
    TIA
    tony

    sweetman wrote:
    > How can I set a query so that it sounds like this:
    >
    > SELECT $_GET['id'] FROM mytable ORDER BY myorder ASC?
    You can't do it through the Recordset dialog box. The simple
    way to do
    it is to create this query in the Recordset dialog box:
    SELECT * FROM myTable
    ORDER BY myOrder ASC
    Then go into Code view and locate the following line:
    $query_recordsetName = "SELECT * FROM myTable ORDER BY
    myOrder ASC";
    Change it to this:
    if (isset($_GET['id'])) {
    $col = get_magic_quotes_gpc() ? stripslashes($_GET['id']) :
    $_GET['id'];
    $col = mysql_real_escape_string($_GET['id']);
    else {
    $col = '*';
    $query_recordsetName = "SELECT $col FROM myTable ORDER BY
    myOrder ASC";
    David Powers, Adobe Community Expert
    Author, "The Essential Guide to Dreamweaver CS3" (friends of
    ED)
    Author, "PHP Solutions" (friends of ED)
    http://foundationphp.com/

  • PHP MySQL Event Calendar that's DW friendly

    I've tried ExtCal 2.0 and I'm not satisfied. It's loaded with
    features, but I want something that I can use my own page layout
    template and drop in the calendar page code. DW can't preview
    ExtCal pages properly in Design view to edit. I know PHP MySQL
    reasonably well but I'm looking for something to automatically
    generate the month/week/day views automatically. I'm rambling here
    but anyone have any suggestions?

    I have been looking for a replacement for the old InterAKT
    calendar extension. Adobe killed it whwn the bought InterAKT. I
    need an extenstion that will help me create an event calendar for
    my CMS websites. Or, I have to keep a copy of MX 2004 around just
    to edit those pages.
    If anyone ever finds a good calendar extension for creating
    dynamic event calendars, please let us all know!!

  • PHP MySQL sites created by dreamweaver mx 2004 crash on safari

    Hello,
    The title says it all, but i will elaborate.
    I develop PHP, MySQl driven database websites, I use
    Dreamweaver MX 2004 and I work on a macintosh, using both safari
    version 2 and 3.
    i have noticed that whenever I post a database item (add,
    edit to table) my safari hangs and I get a page cannot be displayed
    error after 1 minute or so, even though the db function went
    through.
    Now, this only happens with safari and it only happens with
    pages I build with dreamweaver, any hand coded websites I build do
    not do this.
    i have posted this on the apple website with no response, I
    am hoping someone here can help me.

    On Fri, 23 Nov 2007 16:21:50 +0000 (UTC), "MacDaddy333"
    <[email protected]> wrote:
    >Hello,
    >
    > All of the sites that have this issue are secure, one is
    a shopping cart
    >
    >
    http://www.jennywrenpaperie.com
    >
    > You will need to create a user account and then log in
    to see the problem, as
    >for the code, well, there is so much code involved, many
    pages of includes, so
    >i cant post it all
    >
    > One more thing, this doesn't happen to every Safari
    user, only a few, very
    >frustrating as you can imagine
    And I should give you my email address because...
    Seriously, you want people to troubleshoot your site, create
    a dummy
    account that we can log in with.
    Win
    Win Day, Wild Rose Websites
    http://www.wildrosewebsites.com
    [email protected]
    Skype winifredday

  • 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.
    Ilse 

    You 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.

  • Creating a flash website to work with php & MYSQL for MMORPG

    Hi i have a website which is a gangster MMORPG, it using PHP,
    CSS, HTML and some javascript but however with the amount of game
    similar to mine i want to make it unique so i bought "building
    flash websites for dummies" i have read must of it and understand
    most of it. but however don't really have a clue i it could
    actually work with my website.
    what i want to know is can it work with my current PHP &
    MYSQL, so for example i want to create a logging page with flash to
    replace my old PHP/HTML one this will be my first crack at it. but
    will flash be able to check the MYSQL database and send error
    messages back to the view etc.

    Yeah, this can work... My recommendations would be to read a
    couple articles in the dev center on this topic, that should get
    you started...
    http://www.adobe.com/devnet/flash/articles/flash_databases.html
    http://www.adobe.com/devnet/flash/articles/datawizards.html
    http://www.adobe.com/devnet/flash/articles/ria_dataservices.html

  • PHP MySQL 2 column list

    I am building at site in dreamweaver using PHP/MySQL.
    I have a page that will list a bunch of categories. I would
    like to have them in a two column list instead of one. It will look
    better as far as the design goes. How can I do this. I would like
    each column to be an equal amount as possible

    On 13 Mar 2007 in macromedia.dreamweaver.appdev,
    newhorizonhosting.com
    wrote:
    > I have a page that will list a bunch of categories. I
    would like to
    > have them in a two column list instead of one. It will
    look better
    > as far as the design goes. How can I do this. I would
    like each
    > column to be an equal amount as possible
    Have a look at Tom Muck's Horizontal Looper extension:
    http://www.tom-muck.com/extensions/help/HorizontalLooper/
    Joe Makowiec
    http://makowiec.net/
    Email:
    http://makowiec.net/email.php

  • 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.
    >

  • [php+mysql] best way to integrate a tree category menu base on db?

    Hi all,
    I have a products catalog where all products are organized in
    categories.
    The category structure is something similar to this:
    category 1
    subcategory 1.1
    sub-subcategory 1.1.1
    sub-subcategory 1.1.2
    sub-subcategory 1.1.3
    sub-subcategory 1.1.4
    sub-subcategory 1.1.5
    subcategory 1.2
    subcategory 1.3
    category 2
    subcategory 2.1
    subcategory 2.2
    sub-subcategory 2.2.1
    sub-subcategory 2.2.2
    sub-subcategory 2.2.3
    sub-subcategory 2.2.4
    subcategory 2.3
    ...and so on...
    In general, I have 3 category levels.
    I manage these catagories with only one table using self
    foreign keys.
    Now I need to add a tree menu that will reflect the above
    category
    structure.
    I use php + mysql to store the tables (products and
    categories.
    I found several javascript samples that allow you to do
    something similar
    but with static data.
    I'm searching for a tree menu that is easily customizable and
    that can use
    dynamic data from mysql db.
    Is there a tutorial or smple that would do the trick?
    TIA very much!
    tony ;).

    The page I'm trying to create is here www.hollisterairshow.com/plan-results.php and the questionnaire is here www.hollisterairshow.com/helpusplan.php .
    I went ahead and created recordsets using advanced recordsets and these seem to be working, here's a sample SQL
    SELECT *
    FROM plan
    WHERE Saturday = 'Saturday' AND plan.howArriving = 'Auto'
    I created a recordset for each combination of day and transportation mode - six in all
    This selected the correct records.
    To display the count of how many records selected I then used in DW Insert/Data Objects/ Display Record Count/Total Records which generated the following code:
    <?php echo $totalRows_rsSatAuto ?>
    This worked OK - not elegant but OK and I repeated it for each combination of Day and Transportation mode!!
    So there are two problems I'm having:
    I know I can select the records I want but how do I display the sum of the column containing "How many in your party" - i.e. in the PHP code generated above what do I replace $totalRows_rsSatAuto with?
    There are two questions using radio buttons where I'd like to display the count and % for each option selected. I can select all records for these questions but what code do I put to sum the number of selections for each option and what code do I put to calculate the percentage
    I understand the arithmetic involved which is pretty simple but it's the mechanics of coding that has me stumped. It would really help if you could give me a sample for say the "Are you camping overnight" question which has a "Yes/No" option only. In my mundane way I would create two recordsets, one for "Yes" and one for "No", and use the same technique I describe above for counting Total Records in each recordset, but then I'm stuck with how do I calculate and display the percentages. I must be missing something very obvious as I'm sure there just has to be a more elegant solution.
    Thanks so much for your continued interest.
    Tony

  • Can't connect PHP/MySQL 404 error

    Wow, the learning curve is killing me. Yet another challenge. I'm using Dreamweaver CC and this tutorial http://www.adobe.com/devnet/dreamweaver/articles/setup_php.html
    I'm at this step:
    Open comments.php. You must have a PHP page open in the Document window to create a MySQL connection.
    In the Databases panel (choose Window > Databases), click the Plus button on the panel and select MySQL Connection.The MySQL Connection dialog box appears.
    Type connTest as the connection name.
    For the MySQL Server, type localhost.If you are using the MAMP default ports on a Mac, use localhost:8889.
    For the User Name, type phptestuser.
    Type the password you chose for the phptestuser account in the Password field.
    For the Database, type php_test.Note: You don't need to precede the underscore with a backslash here. It was inserted by phpMyAdmin in the previous section (see Figure 20) only because phpMyAdmin uses a query that permits wildcard characters.
    Click Test.Dreamweaver attempts to connect to the database. If the connection fails, do the following:
    Double-check the server name, user name, and password.
    Check the settings for the folder Dreamweaver uses to process dynamic pages (see Specifying a Testing Server for Dreamweaver).
    Verify that the web and MySQL servers are both running.
    Temporarily disable any firewall or security program. If the connection works, you need to configure the security program to permit communication between Dreamweaver and MySQL.
    Click OK. The new connection appears in the Databases panel.
    Expand the connTest connection, and then expand the Tables branch. You'll see the comments table in the database, which you can expand to reveal the details of the table columns (see Figure 23).
    As far as I can tell I have followed this tutorial to the letter.
    As far as I can tell, XAMPP/php mySQL are all running fine, the files are in the correct place and everything should be working. However when I hit test I get a 404 error. (Same error when I hit the select button.)
    The suggested problems on the 404 message are:
    1. There is no testing server running on the server machine.
    Pretty sure the testing server is running. Is there any way to test this, other than to note that xampp is definitely running right now and that I can log into phpMYadmin no problem?
    2. The testing server specified for this site does not map to the http://localhost/php_test/_MMServerScripts/MMHTTPDB.php URL Verify that the URL Prefix maps to the root of the site.
    Ummm...I'm pretty sure I put things where I was told to put them in the tutorial, but I'm lost at this point where I should verify what. A clue here? The files are where they are supposed to be, but maybe I entered something wrong? Except...I'm not sure what that could be or where to find it. Whatever IT is.
    Everything in local files is looking good.
    Thanks for your help!
    PS: Extra points to anyone who figures out how to make copy/pasteable error messages! These buggers are the bane of my life!

    Bgupta, you rock!
    I hope you have copied the "mysql.php" and "MMHTTPDB.php" files from "C:\Users\username\AppData\Roaming\Adobe\Dreamweaver CC\locale\Configuration\Connections\Scripts\PHP_MySQL\_mmDBScripts" to "C:\xampp\htdocs\phptest\_mmServerScripts"
    This was EXACTLY the problem. I checked the tutorial and I couldn't even find where the tutorial said to do this. (If I missed it, let me know where in the tutorial it was, please.)
    Fixed!

  • Problem Creating Recordset in Dreamweaver CS5.5

    Can you help?
    I am having with recordsets in Dreamweaver CS5.5, or rather the sudden (I don’t know why this has suddenly happened) inability to create one. 
    When I try to create a recordset query I get this error message and am prevented from creating said recordset -
    While executing onBlur in ServerBeh-PHP-SimpRS.htm the following javascript
    error occured:
    In file ServerBeh-PHP-SimpRS
    Update UI is not defined
    I have tried re-installign Dreamwear to no avail

    This worked for me.
    Step One
    Remote Server Settings
    Server Name: *Insert Name
    Connect using: FTP
    FTP Address: yourdomain.com
    Username: yourusername
    Password: yourpassword
    Root:
    Web URL: http://yourdomain.com
    Step Two
    Testing Server Settings
    Server Name: *Insert Name
    Connect using: FTP
    FTP Address: yourdomain.com
    Username: yourusername
    Password: yourpassword
    Root:
    Web URL: http://yourdomain.com
    Click on the Advanced tab
    Testing server
    Server Model: PHP MySQL
    Step Three (this is the tricky part, lol)
    Click on file, then click New.
    Create a NEW, I repeat... NEW PHP page.
    Let it sit.
    Step Four
    Now enter your remote SQL settings.
    Not sure why... but this worked for me after HOURS of:
    "An unidentified error has occurred"

  • PHP MySQL Error Code 500

    May be someone can help me out with this problem.
    I have setup a new site using PHP MySQL and Dreamweaver 8.02.
    Dreamweaver connects to the database but after creating a
    recordset the recordset cannot be used.
    instead Dreamweaver returns:
    HTTP Error Code 500 internal Server Error
    Any help will be much appriciated.
    Jos

    Hello,
    I have also had the same error - namely that whilst I could connect via ftp, upload/download files, and view database tables, any attempt to view of modify recordsets resulted in error 500.
    Having checked other potential causes (e.g. selection/non-selection use of passive FTP setting, enabling of php, etc.), on the back of posts here I contacted my host and asked if if could relate to mod security, as further investigation revealed that the issue only occurred on sites where mod security had not been disabled (I don't like to disable mod security for obvious reasons - and I'm told you can't do that site by site with apache2 anyway).
    After a few false starts, the problem was resolved - with the following response from my host: "The false positives were being generated by "/_mmServerScripts/MMHTTPDB.php" and that is what we've worked around in the rules. As such, any domain on [servername] using that script in the same way shouldn't generate a false-positive moving forward."
    So it seems the answer (assuming your on an apache server of course) may be to modify the rules to allow full access for MMHTTPDB.php.
    I hope that is of help to some.

  • PhP/MySQL Horizontal/Vertical Repeat Region

    Hi Guys,
    I'm pretty sure this question would have been asked many times before. If so, first of all my apologies for re-posting this.
    Anyway, what I'm trying to do is create a repeat region that spans for 4 columns and then repeats the rest in rows. For example, if I have 100 records in my table (MySQL), then I want to display this in a table of 4 columns and and 25 rows (in reality, the number of records would be unspecified, of course, but still the records need to be displayed on a 4 column, X row table). For example:
    name
    comment
    name
    comment
    name
    comment
    name
    comment
    name
    comment
    name
    comment
    name
    comment
    name
    comment
    name
    comment
    name
    comment
    name
    comment
    name
    comment
    name
    comment
    name
    comment
    name
    comment
    name
    comment
    name
    comment
    name
    comment
    name
    comment
    name
    comment
    At the moment, I have no issue with displaying the records either horizontally or vertically (explicitly) using the built in "repeat region" behavior. However, where I'm having the problem is with displaying the records in a table as the one I described above.
    I'm using DW CS5 with PhP/MySQL.
    Can I still do this using the built in "repeat region" server behavior, if so how?
    Otherwise, how else could I achieve this (ideally without using any extensions)?
    Thanks in advance for any help and support,
    Cheers

    I'm believe you should be able to modify the repeat region code to do what you want it to do.  With that said we will need 2 things:
    1.  To see the code from the page.
    2.  To know the order of the results is it:
    Horizontal: 1 2 3 4
                    5 6 7 8
    Or Vertical:
    1 5
    2 6
    3 7
    4 8

Maybe you are looking for

  • Artists not shown in the "Artists view" on iTunes 11

    On iTunes 11, in the "Artists view", the artists list on the left is only based on the album artists. The problem is that the artists themselves are not shown in this list if for example a track is tagged with different "Artist" and "Album artist". H

  • Settings connectivity settings for nokia N8 does...

    i have a problem with my nokia N8 that when i try to go to Settings>>connectivity>settings> its again reverts me back to the main menu.....kindly please help me how to slove this problm/ thanks in advance.

  • CP 6 Neospeech and Loquendo Speech agents

    Hi All, I recently updated to CP 6.0. Can anyone point me in the right direction to find the updated text to speech agents for NeoSpeech and Loquendo that work with CP 6? I currently have 5.5 installed. I've looked everywhere but I can't find it. Man

  • Custom IDOC changes in the IDoc structure

    HI experts, I have made some changes in the Custom IDoc Structure But when I have transported the changes like I have 5 fields in the custom IDoc I changed the data type of field 2 changing the length of that field to 132 but when i am executing that

  • Way to copy summary & review info from Store?

    I'd love to be able to copy summary and review info for tunes I get through the Music Store, and paste into, say, the Info tab comments window, to retain that information. Unfortunately, the text in the Music Store isn't selectable. Yes, I can take a