close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Let's start a discussion about PHP versions

Thread began 10/12/2023 3:44 pm by Patrice | Last modified 12/18/2024 2:23 am by Patrice | 5197 views | 92 replies

Peterson Design Studio - jefferis

WEIRD The latest reply by Mags is NOT showing in the thread even after a refresh... THANK YOU MAGS. I can't find the link to the chatgpt, but I got the advice.

So, I think I am almost there. I am having a problem defining the query. It appears that although I had a connection, the connection was not defined, and that was throwing 1 error. This fixed it: .

<?php require_once('Connections/WedingRings.php'); 
$connection = ('Connections/WedingRings.php') ; ?>



It said to insert this: $WeddingRings = mysqli_query($connection, $query); replacing connection and $query with database calls.
Having defined $connections, that works, but I am lost on the $query. I tried this but it doesn't work:

$queryString_WeddingRings = ("SELECT * FROM CKBauer");
$WeddingRings = mysqli_query($connection, $queryString_WeddingRings);

$WeddingRings = new WA_MySQLi_RS("WeddingRings",$WedingRings,8);
$WeddingRings->setQuery("SELECT * FROM CKBauer");
$WeddingRings->execute();



THE ORIGINAL QUERY STRING IS THIS:

$queryString_WeddingRings = "";
if (!empty($_SERVER['QUERY_STRING'])) {
$params = explode("&", $_SERVER['QUERY_STRING']);
$newParams = array();
foreach ($params as $param) {
if (stristr($param, "pageNum_WeddingRings") == false &&
stristr($param, "totalRows_WeddingRings") == false) {
array_push($newParams, $param);
}
}
if (count($newParams) != 0) {
$queryString_WeddingRings = "&" . htmlentities(implode("&", $newParams));
}
}
$queryString_WeddingRings = sprintf("&totalRows_WeddingRings=%d%s", $WeddingRings->TotalRows, $queryString_WeddingRings);
?>



THE ERROR I'M NOW GETTING IS THE QUERY STRING, So perhaps I am not initiating the query correctly:

Warning: mysqli_query() expects parameter 1 to be mysqli, string given in /usr/www/users/jodenii/cbauer/weddingrings.php on line 27

Warning: mysqli_error() expects parameter 1 to be mysqli, string given in /usr/www/users/jodenii/cbauer/weddingrings.php on line 33
Query failed:

These lines are the Query in bold I tried to set and line 33: if (!$WeddingRings) {
die("Query failed: " . mysqli_error($connection));
}

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