close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Mysql-link resource error

Thread began 3/18/2010 3:51 am by tyler815351411 | Last modified 3/27/2010 1:42 am by tyler815351411 | 1676 views | 6 replies |

tyler815351411

Mysql-link resource error

I have produced a section for adding jobs to my website using data assist, but I have used dynamic lists so that i can select from a list that is stored in a database. On the insert page i keep getting the following two errors:

Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /home/ukrecrui/public_html/admin/UKJobs/Jobs_Insert.php on line 41

Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/ukrecrui/public_html/admin/UKJobs/Jobs_Insert.php on line 44

--------------------------------

mysql_select_db($database_Connection, $Connection);
$query_WADADynListSpeciality = "SELECT Value, Speciality FROM Speciality";
$query_limit_WADADynListSpeciality = sprintf("%s LIMIT %d, %d", $query_WADADynListSpeciality, $startRow_WADADynListSpeciality, $maxRows_WADADynListSpeciality);
$WADADynListSpeciality = mysql_query($query_limit_WADADynListSpeciality, $Connection) or die(mysql_error());
$row_WADADynListSpeciality = mysql_fetch_assoc($WADADynListSpeciality);

-------------------------------------

please can someone help point me in the right dirrection

Kind Regards

Brian

Sign in to reply to this post

Eric Mittman

Do you have the require once line of code for you connection before the query on the page? If not this could be the problem. When you get this error it is telling you that the variable that is being referenced in the mysql_select_db is not valid. This variable should be set in the connection file that you have, so long as it is included on the page before this code you should not get this error.

Sign in to reply to this post

tyler815351411

Hi,

I have the require once line of code at the start of the page. When I create all the pages using Dataassist the insert page is the only one that populates this error. I have been using Dataassist for a long time now and never had this error before.

The connection file works fine for all the other pages (Update etc, but does not for the Insert page). I have ran the wizzard several times and even with no template and it still produces the error.

I have attached the inset page code if this helps

Kind Regards

Brian

Attached Files
insertpage.txt
Sign in to reply to this post

Eric Mittman

Are you getting this error on this page currently? The lines of code that are referenced in the error you first posted are not in this file. In the error you posted the line of code that was causing the error looked like this:

php:
mysql_select_db($database_Connection, $Connection);



In the file you posted that line of code is not present, instead you have a select db that looks like this:

php:
mysql_select_db($database_localhost, $localhost);



By the looks of your connection file it seems that the $localhost reference is the correct one. If you continue to have problems with this please also post back with a copy of any of the other DataAssist pages that are not giving you an error.

Sign in to reply to this post

tyler815351411

Hi,

I have tried to re produce the insert page with dataassist, it works fine when you do not use a template or my own template a have created with sculptur.

But when I use the Power CMS admin template it throws up the following error:

Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /home/ukrecrui/public_html/admin/AddJob/Jobs_Insert.php on line 20

Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/ukrecrui/public_html/admin/AddJob/Jobs_Insert.php on line 24

It seems to move the <?php require_once('../../Connections/localhost.php'); ?> down to line 38.

I have attached the admin code and the new insert page that has the above error.

Kind Regards

Brian

Attached Files
admintemplate.txt
insertpage.txt
Sign in to reply to this post

Eric Mittman

It looks like DataAssist is just putting in it's code at the very top of the page, this probably has to do with how the code is crafted and the order that the code and template are applied to the page.

The fix for this page is to move the other include lines up to the top of the page, I have made this update so you can see the difference. When the include lines are above the code that makes use of them you should not get errors relating to the variables or other values in the include files.

Attached Files
insert.zip
Sign in to reply to this post

tyler815351411

Many thanks, I move the code on the insert page to the top of the page, but still got an error. I then noticed that all other dataassist pages had the same problem. So I move the lines to the top on all the other pages like the results page and all works fine.

Thanks again for you help with this.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...