Serengeti National Park is home to numerous kopjes, which are large rock formations that rise above the surrounding landscape. These kopjes are believed to have been formed over millions of years through a combination of geological processes, including erosion, weathering, and volcanic activity.
Md & Tour Expert
Recent Posts
Why Visit Mikumi
There are several reasons to visit Mikumi National…
why Serengeti Nation…
Serengeti National Park is home to numerous kopjes…
Why is Tanzanite fou…
Tanzanite is found only in Tanzania because the ge…
Why is Serengeti so …
The Serengeti is a world-renowned national park th…
By clicking ‘Accept’ you agree that we use Analytical cookies for gathering information about how our website is used, as well as Advertising and social media cookies (including cookies from trusted partners) to
personalize our advertising campaigns and to allow you to share on social media.
Privacy Policy
description => string (307) "<p>Serengeti National Park is home to numerous kopjes, which are large rock ...
$value['description']
<p>Serengeti National Park is home to numerous kopjes, which are large rock formations that rise above the surrounding landscape. These kopjes are believed to have been formed over millions of years through a combination of geological processes, including erosion, weathering, and volcanic activity.<br></p>
description => string (782) "<p> When going on a Tanzania safari, it is generally recommended to avoid we...
$value[0]['description']
<p> When going on a Tanzania safari, it is generally recommended to avoid wearing bright or flashy colors that might attract the attention of wild animals. This is especially true for bright red, which some animals perceive as a threat or an aggressive color. It's also best to avoid wearing black or dark blue clothes, as they can attract tsetse flies, which can be quite bothersome and even transmit disease.</p><p>Instead, it's best to wear neutral, earthy tones such as beige, khaki, or olive green, which will help you blend in with your surroundings and minimize your visibility to wildlife. It's also a good idea to bring along a lightweight, long-sleeved shirt and pants to protect yourself from the sun, as well as a hat and sunglasses to shield your eyes</p><p> <br></p>
altone => string (36) "what not to wear on tanzania safari "
$value[0]['altone']
alttwo => string (32) "what to wear on tanzania safari "
$value[0]['alttwo']
created_at => string (19) "2023-03-31 10:28:51"
$value[0]['created_at']
updated_at => string (19) "2023-03-31 10:28:51"
$value[0]['updated_at']
deleted_at => string (19) "2023-03-31 10:28:51"
$value[0]['deleted_at']
datetime => string (19) "2023-03-31 10:28:51"
$value[0]['datetime']
1 => array (16)
$value[1]
blog_id => string (2) "57"
$value[1]['blog_id']
title => string (23) "Do you Know Stone Town "
$value[1]['title']
tag => string (7) "History"
$value[1]['tag']
slug => string (22) "do-you-know-stone-town"
$value[1]['slug']
description => string (1235) "<p> Stone Town is the historic center of Zanzibar City, which is the capital...
$value[1]['description']
<p> Stone Town is the historic center of Zanzibar City, which is the capital city of the Zanzibar archipelago, located off the coast of Tanzania in East Africa. Stone Town is a UNESCO World Heritage Site and is known for its unique blend of African, Arab, Indian, and European cultures, which is reflected in its architecture, cuisine, and way of life.</p><p>The town is called "Stone Town" because of its many old buildings made of coral stone, including the famous House of Wonders and the Old Fort. Stone Town is also home to many narrow alleys, bustling markets, and a picturesque waterfront, making it a popular tourist destination.</p><p>In addition to its historical and cultural attractions, Stone Town is also a hub for commerce and trade, especially in spices, which have been a major part of Zanzibar's economy for centuries. Visitors can explore the town's markets to discover a variety of spices, such as cloves, cinnamon, and nutmeg, as well as other goods like textiles, art, and souvenirs.</p><p>Overall, Stone Town is a fascinating destination for those interested in history, culture, and adventure, offering a unique glimpse into the rich and diverse heritage of Zanzibar and East Africa as a whole</p><p> <br></p>
description => string (906) "<p> The cost of a walking safari in Tanzania can vary depending on several f...
$value[2]['description']
<p> The cost of a walking safari in Tanzania can vary depending on several factors, such as the duration of the safari, the location, the level of luxury, and the tour operator you choose. Generally, a walking safari in Tanzania can cost anywhere from $300 to $1000 per day per person.</p><p>This cost usually includes accommodation, meals, park fees, guided walks, and other activities. However, it's important to note that some additional costs may not be included, such as transportation to and from the starting point of the safari, personal expenses, and tips.</p><p>To get a more accurate estimate of the cost of a walking safari in Tanzania, it's best to research different tour operators and compare their packages and prices. Additionally, you can also consider reaching out to a local travel agent who can help you customize a safari package based on your preferences and budget</p><p> <br></p>
description => string (1208) "<p> While you can wear shorts on safari in Tanzania, it is not the most reco...
$value[3]['description']
<p> While you can wear shorts on safari in Tanzania, it is not the most recommended clothing item for several reasons.</p><p>Firstly, Tanzania can be hot during the day, and wearing shorts can help you stay cool and comfortable. However, you may also be exposed to the sun and insects, especially if you are on a walking safari or exploring areas with tall grasses or bushes. Insects can bite or sting, and long pants can help protect your legs.</p><p>Secondly, some areas require visitors to dress modestly out of respect for the local culture and customs. Wearing shorts may be seen as disrespectful or inappropriate, especially when visiting local villages or communities.</p><p>Therefore, it is generally recommended to wear lightweight long pants or trousers on safari in Tanzania, especially during game drives and bush walks. Long pants can provide protection against the sun, insects, and thorny vegetation. If you want to wear shorts, it is best to pack a lightweight and long pair of pants in case you need to cover up.</p><p>Overall, it's important to dress appropriately for the activities and weather conditions, while also being respectful of the environment and local customs</p><p> <br></p>
description => string (1069) "<p> Yes, Zanzibar is a wonderful place to enjoy a vacation, especially if yo...
$value[4]['description']
<p> Yes, Zanzibar is a wonderful place to enjoy a vacation, especially if you love beaches, water sports, and a tropical climate. The beaches in Zanzibar are known for their clear turquoise waters, soft white sand, and beautiful sunsets. You can enjoy swimming, snorkeling, scuba diving, kite surfing, and other water sports. You can also take a boat tour to see the dolphins or go fishing.</p><p>Aside from the beaches, Zanzibar has a rich cultural history and many interesting attractions to explore. You can visit Stone Town, the historic capital of Zanzibar, which is a UNESCO World Heritage Site known for its narrow streets, old buildings, and unique blend of Swahili, Arab, Indian, and European cultures. You can also visit the spice farms and learn about the history and production of spices like cloves, cinnamon, and nutmeg.</p><p>Overall, Zanzibar is a great destination for a vacation, with something for everyone. Whether you're looking for relaxation, adventure, culture, or a combination of all three, you're sure to find it in Zanzibar</p><p> <br></p>
description => string (1336) "<p> Tipping is a common practice in Tanzania, including on safari tours. Whi...
$value[5]['description']
<p> Tipping is a common practice in Tanzania, including on safari tours. While tipping is ultimately a personal decision, it is customary to tip your safari guide and other staff members who have provided you with excellent service. Here is a general tipping guide for Tanzania safaris:</p><ol><li><p>Safari Guide: It is common to tip your safari guide between $10 to $20 per day, per person, depending on the level of service provided. If you are on a private safari, the tip amount may be higher.</p></li><li><p>Driver: If you have a dedicated driver who is not also your safari guide, it is customary to tip them between $5 to $10 per day, per person.</p></li><li><p>Lodge/Camp Staff: If you are staying at a lodge or camp, it is common to tip the staff who have provided you with service, such as waitstaff and housekeeping, between $5 to $10 per day, per person.</p></li><li><p>Porters: If you have porters who assist you with your luggage, it is customary to tip them between $1 to $2 per bag.</p></li></ol><p>It's important to note that these are general guidelines, and the amount you choose to tip will ultimately depend on your level of satisfaction with the service provided. If you are unsure of the appropriate tipping amount, it is always best to ask your tour operator or guide for their recommendations</p><p> <br></p>
description => string (1402) "<p> The best time to see wildlife in Tanzania depends on several factors, in...
$value[6]['description']
<p> The best time to see wildlife in Tanzania depends on several factors, including the type of wildlife you want to see and the region you plan to visit. In general, the dry season, which runs from June to October, is considered the best time to see wildlife in Tanzania.</p><p>During the dry season, water sources become scarce, which causes animals to gather around remaining water sources. This concentration of wildlife makes it easier to spot and photograph animals on safari. Additionally, the dry season is also a popular time for wildebeest migration, where millions of wildebeest and other grazing animals move across the Serengeti and Masai Mara ecosystems in search of water and fresh grazing land.</p><p>That being said, some regions of Tanzania, such as the southern Selous Game Reserve and the western Mahale Mountains, are best visited during the wet season for optimal wildlife viewing. In these regions, the wet season coincides with the birthing season for many animals, and lush vegetation provides ample food sources, making it a prime time to see newborn animals.</p><p>Ultimately, the best time to visit Tanzania for wildlife viewing depends on your interests and preferences. It's a good idea to do some research and plan your trip around the specific regions and animals you want to see, while also taking weather conditions and seasonal patterns into account</p><p> <br></p>
altone => string (38) "The best time to wildlife in Tanzania "
$value[6]['altone']
alttwo => string (42) "The best time to see wildlife in Tanzania "
$value[6]['alttwo']
created_at => string (19) "2023-03-31 06:21:58"
$value[6]['created_at']
updated_at => string (19) "2023-03-31 06:21:58"
$value[6]['updated_at']
deleted_at => string (19) "2023-03-31 06:21:58"
$value[6]['deleted_at']
datetime => string (19) "2023-03-31 06:21:58"
$value[6]['datetime']
7 => array (16)
$value[7]
blog_id => string (2) "85"
$value[7]['blog_id']
title => string (22) "Things to do in Arusha"
$value[7]['title']
tag => string (8) "About us"
$value[7]['tag']
slug => string (22) "things-to-do-in-arusha"
$value[7]['slug']
description => string (2129) "<p> Arusha is a vibrant city in northern Tanzania that serves as the gateway...
$value[7]['description']
<p> Arusha is a vibrant city in northern Tanzania that serves as the gateway to many of the country's top natural attractions, including Mount Kilimanjaro, Serengeti National Park, and Ngorongoro Crater. Here are some things to do in Arusha:</p><ol><li><p>Visit Arusha National Park: This park is home to a variety of wildlife and landscapes, including Mount Meru, the Momela Lakes, and the Ngurdoto Crater. Visitors can go on game drives, walk</p></li></ol><hr><ol><li><p> safaris, or climb Mount Meru.</p></li><li><p>Explore the Cultural Heritage Center: This center showcases Tanzanian art and culture, including traditional dances, music, and crafts. It's a great place to learn about the local culture and buy souvenirs.</p></li><li><p>Visit the Old Boma Museum: This museum is located in a historic building that was once the headquarters of German East Africa. It features exhibits on the region's history, culture, and colonial past.</p></li><li><p>Take a coffee tour: Tanzania is known for its coffee, and Arusha is home to several coffee plantations that offer tours. Visitors can learn about the coffee-making process, taste different varieties of coffee, and buy beans to take home.</p></li><li><p>Visit the Maasai Market: This is a great place to buy traditional Maasai crafts, including jewelry, clothing, and artwork. It's also a good place to practice your bargaining skills.</p></li><li><p>Go on a safari: Arusha is a great starting point for safaris to some of Tanzania's most famous parks, including Serengeti National Park and Ngorongoro Crater. Visitors can see a wide range of wildlife, including elephants, lions, and giraffes.</p></li><li><p>Visit the Arusha Clock Tower: This clock tower is a landmark in the city center and was built to commemorate Tanzania's independence from British colonial rule.</p></li><li><p>Hike to the top of Mount Kilimanjaro: While this is a more challenging activity, Arusha is the starting point for many treks to the top of Africa's highest peak. It's an unforgettable experience and one that many people consider a once-in-a-lifetime adventure</p></li></ol><p> <br></p>
description => string (1332) "<p>the wildebeest migration is taking place in the Serengeti ecosystem in Ta...
$value[8]['description']
<p>the wildebeest migration is taking place in the Serengeti ecosystem in Tanzania and the Maasai Mara National Reserve in Kenya.</p><p>The migration is an annual event where millions of wildebeest, zebras, and gazelles move in a circular pattern through the Serengeti ecosystem and the Maasai Mara. The precise timing and location of the migration can vary from year to year depending on the weather and other environmental factors.</p><p>Typically, the wildebeest start their journey in the southern Serengeti in Tanzania in December, January, or February, where they give birth to their young. They then start to move northward, following the rains and the new grass growth. By June, the wildebeest have usually arrived in the western and northern Serengeti, where they cross the Mara River and enter the Maasai Mara in Kenya.</p><p>The migration usually peaks in July and August, when the wildebeest are crossing the Mara River, and it starts to head back south in October or November, returning to the southern Serengeti for the next calving season.</p><p>However, it's important to note that the migration is a dynamic event that can change from year to year, so it's best to check with local safari operators or park authorities to get the most up-to-date information on the current location of the migration</p><p> <br></p>
description => string (993) "<p> Yes, Selous Game Reserve is indeed the largest game reserve in Africa, c...
$value[9]['description']
<p> Yes, Selous Game Reserve is indeed the largest game reserve in Africa, covering an area of over 50,000 square kilometers. It is located in southern Tanzania and is home to a wide range of wildlife, including elephants, lions, leopards, cheetahs, giraffes, and more.</p><p>Selous Game Reserve is also a UNESCO World Heritage Site and is known for its diverse ecosystems, which include savannah, woodland, and wetlands. The Rufiji River, which flows through the reserve, is one of the largest rivers in Tanzania and is home to many species of aquatic wildlife, including hippos and crocodiles.</p><p>The reserve is a popular destination for game drives, boat safaris, walking safaris, and fly camping. It is also a great destination for birdwatching, with over 440 species of birds recorded in the area.</p><p>Overall, Selous Game Reserve is a must-visit destination for nature lovers and safari enthusiasts who are looking for an off-the-beaten-path experience in Tanzania</p><p> <br></p>
description => string (1523) "<p> Mikumi National Park is one of the most popular national parks in Tanzan...
$value[10]['description']
<p> Mikumi National Park is one of the most popular national parks in Tanzania and is located in the southern part of the country, about 300 kilometers west of Dar es Salaam. The park is known for its diverse wildlife, including elephants, lions, giraffes, zebras, wildebeest, and more.</p><p>If you are interested in wildlife and nature, Mikumi is definitely worth visiting. The park offers a unique safari experience, as it is less crowded than some of the more well-known national parks in Tanzania, such as Serengeti or Ngorongoro. This means that you may have the chance to see wildlife up close and in their natural habitat without large crowds of other visitors.</p><p>Mikumi is also a great destination for birdwatching, with over 400 species of birds recorded in the park. The park has several well-marked nature trails, which provide a great opportunity for visitors to explore the park's flora and fauna on foot.</p><p>In addition to wildlife and nature, Mikumi also has a rich cultural heritage, with several tribes living in and around the park, including the Maasai and the Wapogoro. Visitors can learn about their culture, traditions, and way of life through cultural tourism programs, which offer an opportunity to interact with the local communities and learn about their customs, music, and dances.</p><p>Overall, if you enjoy wildlife and nature, Mikumi is definitely worth a visit, and you may be pleasantly surprised by the variety of experiences and attractions the park has to offer</p><p> <br></p>
description => string (1307) "<p> Tanzania is a popular destination for walking safaris and there are seve...
$value[11]['description']
<p> Tanzania is a popular destination for walking safaris and there are several great locations to consider. Some of the best places for walking safaris in Tanzania include:</p><ol><li><p>Serengeti National Park - The Serengeti offers a unique opportunity for walking safaris with its vast savannah plains and diverse wildlife, including the famous wildebeest migration.</p></li><li><p>Ngorongoro Conservation Area - Known for its stunning landscapes and abundant wildlife, Ngorongoro is a great location for walking safaris.</p></li><li><p>Tarangire National Park - This park is famous for its large elephant herds and baobab trees and offers a variety of walking safari options.</p></li><li><p>Selous Game Reserve - The Selous is the largest game reserve in Africa and offers an off-the-beaten-path experience with a range of walking safari options.</p></li><li><p>Lake Natron - This remote location is known for its flamingos and stunning scenery, and offers a unique walking safari experience in a less-visited area.</p></li></ol><p>It's important to note that the best location for a walking safari may depend on your specific interests, preferences, and travel plans. It's recommended to research each location and consult with a reputable tour operator to find the best fit for you.</p><p> <br></p>
SELECT *
FROM `dancing_simba_destinationtable`
LIMIT 6
protected binds -> array (0)
protected bindMarker -> string (1) "?"
protected startTime -> double 1747723365.2451
protected endTime -> double 1747723365.2459
protected errorCode -> null
protected errorString -> null
public db -> CodeIgniter\Database\MySQLi\Connection#94 Recursion
public __construct(CodeIgniter\Database\ConnectionInterface $db)
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/Query.php:98
public setQuery(string $sql, $binds = null, bool $setEscape = true): $this Sets the raw query string to use for this statement.
/**
* Sets the raw query string to use for this statement.
*
* @param mixed $binds
*
* @return $this
*/
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/Query.php:110
public setBinds(array $binds, bool $setEscape = true): $this Will store the variables to bind into the query later.
/**
* Will store the variables to bind into the query later.
*
* @return $this
*/
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/Query.php:141
public getQuery(): string Returns the final, processed query string after binding, etal has been perfor...
/**
* Returns the final, processed query string after binding, etal
* has been performed.
*/
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/Query.php:160
public setDuration(float $start, ?float $end = null): $this Records the execution time of the statement using microtime(true) for it's st...
/**
* Records the execution time of the statement using microtime(true)
* for it's start and end values. If no end value is present, will
* use the current time to determine total duration.
*
* @return $this
*/
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/Query.php:176
public getStartTime(bool $returnRaw = false, int $decimals = 6): float|string Returns the start time in seconds with microseconds.
/**
* Returns the start time in seconds with microseconds.
*
* @return float|string
*/
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/Query.php:194
public getDuration(int $decimals = 6): string Returns the duration of this query during execution, or null if the query has...
/**
* Returns the duration of this query during execution, or null if
* the query has not been executed yet.
*
* @param int $decimals The accuracy of the returned time.
*/
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/Query.php:209
public setError(int $code, string $error): $this Stores the error description that happened for this query.
/**
* Stores the error description that happened for this query.
*
* @return $this
*/
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/Query.php:219
public hasError(): bool Reports whether this statement created an error not.
/**
* Reports whether this statement created an error not.
*/
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/Query.php:230
public getErrorCode(): int Returns the error code created while executing this statement.
/**
* Returns the error code created while executing this statement.
*/
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/Query.php:238
public getErrorMessage(): string Returns the error message created while executing this statement.
/**
* Returns the error message created while executing this statement.
*/
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/Query.php:246
public isWriteType(): bool Determines if the statement is a write-type query or not.
/**
* Determines if the statement is a write-type query or not.
*/
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/Query.php:254
public swapPrefix(string $orig, string $swap): $this Swaps out one table prefix for a new one.
/**
* Swaps out one table prefix for a new one.
*
* @return $this
*/
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/Query.php:264
public getOriginalQuery(): string Returns the original SQL that was passed into the system.
/**
* Returns the original SQL that was passed into the system.
*/
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/Query.php:281
protected compileBinds() Escapes and inserts any binds into the finalQueryString property.
/**
* Escapes and inserts any binds into the finalQueryString property.
*
* @see https://regex101.com/r/EUEhay/5
*/
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/Query.php:291
protected matchNamedBinds(string $sql, array $binds): string Match bindings
/**
* Match bindings
*/
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/Query.php:319
protected matchSimpleBinds(string $sql, array $binds, int $bindCount, int $ml): string Match bindings
/**
* Match bindings
*/
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/Query.php:343
public debugToolbarDisplay(): string Returns string to display in debug toolbar
/**
* Returns string to display in debug toolbar
*/
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/Query.php:373
public __toString(): string Return text representation of the query
/**
* Return text representation of the query
*/
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/Query.php:427
lastQuery string (55) "SELECT * FROM `dancing_simba_destinationtable` LIMIT 6"
SELECT *
FROM `dancing_simba_destinationtable`
LIMIT 6
public connID -> mysqli#103 (18)
Properties (18)
Methods (43)
Static methods (1)
public readonly affected_rows -> integer 6
public readonly client_info -> string (14) "mysqlnd 8.2.28"
public readonly client_version -> integer 80228
public readonly connect_errno -> integer 0
public readonly connect_error -> null
public readonly errno -> integer 0
public readonly error -> string (0) ""
public readonly error_list -> array (0)
public readonly field_count -> integer 15
public readonly host_info -> string (25) "Localhost via UNIX socket"
public readonly info -> null
public readonly insert_id -> integer 0
public readonly server_info -> string (15) "10.6.22-MariaDB"
public connect(bool $persistent = false): false|mysqli Connect to the database.
/**
* Connect to the database.
*
* @return false|mysqli
*
* @throws DatabaseException
*/
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/MySQLi/Connection.php:102
public reconnect(): void Keep or establish the connection if no queries have been sent for a length of...
/**
* Keep or establish the connection if no queries have been sent for
* a length of time exceeding the server's idle timeout.
*
* @return void
*/
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/MySQLi/Connection.php:258
protected _close(): void Close the database connection.
/**
* Close the database connection.
*
* @return void
*/
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/MySQLi/Connection.php:269
public setDatabase(string $databaseName): bool Select a specific database table to use.
/**
* Select a specific database table to use.
*/
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/MySQLi/Connection.php:277
public getVersion(): string Returns a string containing the version of the database being used.
/**
* Returns a string containing the version of the database being used.
*/
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/MySQLi/Connection.php:299
protected execute(string $sql): false|mysqli_result Executes the query against the database.
/**
* Executes the query against the database.
*
* @return false|mysqli_result
*/
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/MySQLi/Connection.php:317
protected prepQuery(string $sql): string Prep the query. If needed, each database adapter can prep the query string
/**
* Prep the query. If needed, each database adapter can prep the query string
*/
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/MySQLi/Connection.php:342
public affectedRows(): int Returns the total number of rows affected by this query.
/**
* Returns the total number of rows affected by this query.
*/
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/MySQLi/Connection.php:356
/**
* Platform-dependant string escape
*/
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/MySQLi/Connection.php:364
public escapeLikeStringDirect($str): list<string>|string Escape Like String Direct There are a few instances where MySQLi queries cann...
/**
* Escape Like String Direct
* There are a few instances where MySQLi queries cannot take the
* additional "ESCAPE x" parameter for specifying the escape character
* in "LIKE" strings, and this handles those directly with a backslash.
*
* @param list<string>|string $str Input string
*
* @return list<string>|string
*/
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/MySQLi/Connection.php:383
protected _listTables(bool $prefixLimit = false, ?string $tableName = null): string Generates the SQL for listing tables in a platform-dependent manner. Uses esc...
/**
* Generates the SQL for listing tables in a platform-dependent manner.
* Uses escapeLikeStringDirect().
*
* @param string|null $tableName If $tableName is provided will return only this table if exists.
*/
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/MySQLi/Connection.php:409
protected _listColumns($table = ''): string Generates a platform-specific query string so that the column names can be fe...
/**
* Generates a platform-specific query string so that the column names can be fetched.
*
* @param string|TableName $table
*/
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/MySQLi/Connection.php:429
protected _fieldData(string $table): array Returns an array of objects with field data
/**
* Returns an array of objects with field data
*
* @return list<stdClass>
*
* @throws DatabaseException
*/
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/MySQLi/Connection.php:448
protected _indexData(string $table): array Returns an array of objects with index data
/**
* Returns an array of objects with index data
*
* @return array<string, stdClass>
*
* @throws DatabaseException
* @throws LogicException
*/
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/MySQLi/Connection.php:481
protected _foreignKeyData(string $table): array Returns an array of objects with Foreign key data
/**
* Returns an array of objects with Foreign key data
*
* @return array<string, stdClass>
*
* @throws DatabaseException
*/
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/MySQLi/Connection.php:528
/**
* Returns platform-specific SQL to enable foreign key checks.
*
* @return string
*/
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/MySQLi/Connection.php:588
public error(): array Returns the last error code and message. Must return this format: ['code' => ...
/**
* Returns the last error code and message.
* Must return this format: ['code' => string|int, 'message' => string]
* intval(code) === 0 means "no error".
*
* @return array<string, int|string>
*/
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/MySQLi/Connection.php:600
public insertID(): int Insert ID
/**
* Insert ID
*/
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/MySQLi/Connection.php:618
protected _transBegin(): bool Begin Transaction
/**
* Begin Transaction
*/
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/MySQLi/Connection.php:626
protected _transCommit(): bool Commit Transaction
/**
* Commit Transaction
*/
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/MySQLi/Connection.php:636
/**
* Rollback Transaction
*/
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/MySQLi/Connection.php:650
public __construct(array $params) Saves our connection settings.
/**
* Saves our connection settings.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:370
public initialize(): void Initializes the database connection/settings.
/**
* Initializes the database connection/settings.
*
* @return void
*
* @throws DatabaseException
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:404
public close(): void Close the database connection.
/**
* Close the database connection.
*
* @return void
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:483
public persistentConnect(): false|object|resource Create a persistent database connection.
/**
* Create a persistent database connection.
*
* @return false|object|resource
* @phpstan-return false|TConnection
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:504
public getConnection(?string $alias = null): false|object|resource Returns the actual connection object. If both a 'read' and 'write' connection...
/**
* Returns the actual connection object. If both a 'read' and 'write'
* connection has been specified, you can pass either term in to
* get that connection. If you pass either alias in and only a single
* connection is present, it must return the sole connection.
*
* @return false|object|resource
* @phpstan-return TConnection
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:518
public getDatabase(): string Returns the name of the current database being used.
/**
* Returns the name of the current database being used.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:527
public setPrefix(string $prefix = ''): string Set DB Prefix
/**
* Set DB Prefix
*
* Set's the DB Prefix to something new without needing to reconnect
*
* @param string $prefix The prefix
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:539
public getPrefix(): string Returns the database prefix.
/**
* Returns the database prefix.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:547
public getPlatform(): string The name of the platform in use (MySQLi, Postgre, SQLite3, OCI8, etc)
/**
* The name of the platform in use (MySQLi, Postgre, SQLite3, OCI8, etc)
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:555
public setAliasedTables(array $aliases): $this Sets the Table Aliases to use. These are typically collected during use of th...
/**
* Sets the Table Aliases to use. These are typically
* collected during use of the Builder, and set here
* so queries are built correctly.
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:567
public addTableAlias(string $alias): $this Add a table alias to our list.
/**
* Add a table alias to our list.
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:579
public query(string $sql, $binds = null, bool $setEscapeFlags = true, string $queryClass = ''): BaseResult|bool|Query BaseResult when “read” type query, bool when “write” type query, Query when prepared query Orchestrates a query against the database. Queries must use Database\Statemen...
/**
* Orchestrates a query against the database. Queries must use
* Database\Statement objects to store the query and build it.
* This method works with the cache.
*
* Should automatically handle different connections for read/write
* queries if needed.
*
* @param array|string|null $binds
*
* @return BaseResult|bool|Query BaseResult when “read” type query, bool when “write” type query, Query when prepared query
* @phpstan-return BaseResult<TConnection, TResult>|bool|Query
*
* @todo BC set $queryClass default as null in 4.1
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:615
public simpleQuery(string $sql): false|object|resource Performs a basic query against the database. No binding or caching is perform...
/**
* Performs a basic query against the database. No binding or caching
* is performed, nor are transactions handled. Simply takes a raw
* query string and returns the database-specific result id.
*
* @return false|object|resource
* @phpstan-return false|TResult
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:732
public transOff(): void Disable Transactions
/**
* Disable Transactions
*
* This permits transactions to be disabled at run-time.
*
* @return void
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:748
public transStrict(bool $mode = true): $this Enable/disable Transaction Strict Mode
/**
* Enable/disable Transaction Strict Mode
*
* When strict mode is enabled, if you are running multiple groups of
* transactions, if one group fails all subsequent groups will be
* rolled back.
*
* If strict mode is disabled, each group is treated autonomously,
* meaning a failure of one group will not affect any others
*
* @param bool $mode = true
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:767
public transStart(bool $testMode = false): bool Start Transaction
/**
* Start Transaction
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:777
public transException(bool $transException): $this If set to true, exceptions are thrown during transactions.
/**
* If set to true, exceptions are thrown during transactions.
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:791
public transComplete(): bool Complete Transaction
/**
* Complete Transaction
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:801
public transStatus(): bool Lets you retrieve the transaction flag to determine if it has failed
/**
* Lets you retrieve the transaction flag to determine if it has failed
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:827
public transBegin(bool $testMode = false): bool Begin Transaction
/**
* Begin Transaction
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:835
public transCommit(): bool Commit Transaction
/**
* Commit Transaction
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:869
public transRollback(): bool Rollback Transaction
/**
* Rollback Transaction
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:888
public resetTransStatus(): static Reset transaction status - to restart transactions after strict mode failure
/**
* Reset transaction status - to restart transactions after strict mode failure
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:907
public table($tableName): BaseBuilder Returns a non-shared new instance of the query builder for this connection.
/**
* Returns a non-shared new instance of the query builder for this connection.
*
* @param array|string|TableName $tableName
*
* @return BaseBuilder
*
* @throws DatabaseException
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:938
public newQuery(): CodeIgniter\Database\BaseBuilder Returns a new instance of the BaseBuilder class with a cleared FROM clause.
/**
* Returns a new instance of the BaseBuilder class with a cleared FROM clause.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:952
public prepare(Closure $func, array $options = array()): BasePreparedQuery|null Creates a prepared statement with the database that can then be used to execu...
/**
* Creates a prepared statement with the database that can then
* be used to execute multiple statements against. Within the
* closure, you would build the query in any normal way, though
* the Query Builder is the expected manner.
*
* Example:
* $stmt = $db->prepare(function($db)
* {
* return $db->table('users')
* ->where('id', 1)
* ->get();
* })
*
* @param Closure(BaseConnection): mixed $func
*
* @return BasePreparedQuery|null
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:980
public getLastQuery(): Query Returns the last query's statement object.
/**
* Returns the last query's statement object.
*
* @return Query
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:1008
public showLastQuery(): string Returns a string representation of the last query's statement object.
/**
* Returns a string representation of the last query's statement object.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:1016
public getConnectStart(): ?float Returns the time we started to connect to this database in seconds with micro...
/**
* Returns the time we started to connect to this database in
* seconds with microseconds.
*
* Used by the Debug Toolbar's timeline.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:1027
public getConnectDuration(int $decimals = 6): string Returns the number of seconds with microseconds that it took to connect to th...
/**
* Returns the number of seconds with microseconds that it took
* to connect to the database.
*
* Used by the Debug Toolbar's timeline.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:1038
/**
* Protect Identifiers
*
* This function is used extensively by the Query Builder class, and by
* a couple functions in this class.
* It takes a column or table name (optionally with an alias) and inserts
* the table prefix onto it. Some logic is necessary in order to deal with
* column names that include the path. Consider a query like this:
*
* SELECT hostname.database.table.column AS c FROM hostname.database.table
*
* Or a query with aliasing:
*
* SELECT m.member_id, m.member_name FROM members AS m
*
* Since the column name can include up to four segments (host, DB, table, column)
* or also have an alias prefix, we need to do a bit of work to figure this out and
* insert the table prefix (if it exists) in the proper position, and escape only
* the correct identifiers.
*
* @param array|int|string|TableName $item
* @param bool $prefixSingle Prefix a table name with no segments?
* @param bool $protectIdentifiers Protect table or column names?
* @param bool $fieldExists Supplied $item contains a column name?
*
* @return array|string
* @phpstan-return ($item is array ? array : string)
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:1071
public escapeIdentifier($item): string Escape the SQL Identifier
/**
* Escape the SQL Identifier
*
* This function escapes single identifier.
*
* @param non-empty-string|TableName $item
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:1236
public escapeIdentifiers($item): array|string Escape the SQL Identifiers
/**
* Escape the SQL Identifiers
*
* This function escapes column and table names
*
* @param array|string $item
*
* @return array|string
* @phpstan-return ($item is array ? array : string)
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:1276
public prefixTable(string $table = ''): string Prepends a database prefix if one exists in configuration
/**
* Prepends a database prefix if one exists in configuration
*
* @throws DatabaseException
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:1336
public escape($str): array|float|int|string "Smart" Escape String
/**
* "Smart" Escape String
*
* Escapes data based on type.
* Sets boolean and null types
*
* @param array|bool|float|int|object|string|null $str
*
* @return array|float|int|string
* @phpstan-return ($str is array ? array : float|int|string)
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:1361
public escapeString($str, bool $like = false): list<string>|string Escape String
/**
* Escape String
*
* @param list<string|Stringable>|string|Stringable $str Input string
* @param bool $like Whether the string will be used in a LIKE condition
*
* @return list<string>|string
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:1394
public escapeLikeString($str): list<string>|string Escape LIKE String
/**
* Escape LIKE String
*
* Calls the individual driver for platform
* specific escaping for LIKE conditions
*
* @param list<string|Stringable>|string|Stringable $str
*
* @return list<string>|string
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:1444
public callFunction(string $functionName, $params): bool This function enables you to call PHP database functions that are not nativel...
/**
* This function enables you to call PHP database functions that are not natively included
* in CodeIgniter, in a platform independent manner.
*
* @param array ...$params
*
* @throws DatabaseException
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:1467
protected getDriverFunctionPrefix(): string Get the prefix of the function to access the DB.
/**
* Get the prefix of the function to access the DB.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:1489
public listTables(bool $constrainByPrefix = false): false|list<string> Returns an array of table names
/**
* Returns an array of table names
*
* @return false|list<string>
*
* @throws DatabaseException
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:1505
public tableExists(string $tableName, bool $cached = true): bool Determine if a particular table exists
/**
* Determine if a particular table exists
*
* @param bool $cached Whether to use data cache
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:1542
public getFieldNames($tableName): false|list<string> Fetch Field Names
/**
* Fetch Field Names
*
* @param string|TableName $tableName
*
* @return false|list<string>
*
* @throws DatabaseException
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:1585
public fieldExists(string $fieldName, string $tableName): bool Determine if a particular field exists
/**
* Determine if a particular field exists
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:1632
public getFieldData(string $table): list<stdClass> Returns an object with field data
/**
* Returns an object with field data
*
* @return list<stdClass>
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:1642
public getIndexData(string $table): array<string, stdClass> Returns an object with key data
/**
* Returns an object with key data
*
* @return array<string, stdClass>
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:1652
public getForeignKeyData(string $table): array<string, stdClass> Returns an object with foreign key data
/**
* Returns an object with foreign key data
*
* @return array<string, stdClass>
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:1662
protected foreignKeyDataToObjects(array $data): array<string, stdClass> Converts array of arrays generated by _foreignKeyData() to array of objects
/**
* Converts array of arrays generated by _foreignKeyData() to array of objects
*
* @return array<string, stdClass>
*
* array[
* {constraint_name} =>
* stdClass[
* 'constraint_name' => string,
* 'table_name' => string,
* 'column_name' => string[],
* 'foreign_table_name' => string,
* 'foreign_column_name' => string[],
* 'on_delete' => string,
* 'on_update' => string,
* 'match' => string
* ]
* ]
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:1686
public disableForeignKeyChecks(): bool Disables foreign key checks temporarily.
/**
* Disables foreign key checks temporarily.
*
* @return bool
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:1719
public enableForeignKeyChecks(): bool Enables foreign key checks temporarily.
/**
* Enables foreign key checks temporarily.
*
* @return bool
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:1736
public pretend(bool $pretend = true): $this Allows the engine to be set into a mode where queries are not actually execut...
/**
* Allows the engine to be set into a mode where queries are not
* actually executed, but they are still generated, timed, etc.
*
* This is primarily used by the prepared query functionality.
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:1756
public resetDataCache(): $this Empties our data cache. Especially helpful during testing.
/**
* Empties our data cache. Especially helpful during testing.
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:1768
public isWriteType($sql): bool Determines if the statement is a write-type query or not.
/**
* Determines if the statement is a write-type query or not.
*
* @param string $sql
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:1780
public __get(string $key): array|bool|float|int|object|resource|string|null Accessor for properties if they exist.
/**
* Accessor for properties if they exist.
*
* @return array|bool|float|int|object|resource|string|null
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:1884
public __isset(string $key): bool Checker for properties existence.
/**
* Checker for properties existence.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:1896
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:1160
private CodeIgniter\Database\BaseConnection::escapeTableName(CodeIgniter\Database\TableName $tableName): string Returns escaped table name with alias.
/**
* Returns escaped table name with alias.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:1258
SELECT *
FROM `dancing_simba_destinationtable`
LIMIT 6
protected binds -> array (0)
protected bindMarker -> string (1) "?"
protected startTime -> double 1747723365.2451
protected endTime -> double 1747723365.2459
protected errorCode -> null
protected errorString -> null
public db -> CodeIgniter\Database\MySQLi\Connection#94 Recursion
public __construct(CodeIgniter\Database\ConnectionInterface $db)
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/Query.php:98
public setQuery(string $sql, $binds = null, bool $setEscape = true): $this Sets the raw query string to use for this statement.
/**
* Sets the raw query string to use for this statement.
*
* @param mixed $binds
*
* @return $this
*/
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/Query.php:110
public setBinds(array $binds, bool $setEscape = true): $this Will store the variables to bind into the query later.
/**
* Will store the variables to bind into the query later.
*
* @return $this
*/
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/Query.php:141
public getQuery(): string Returns the final, processed query string after binding, etal has been perfor...
/**
* Returns the final, processed query string after binding, etal
* has been performed.
*/
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/Query.php:160
public setDuration(float $start, ?float $end = null): $this Records the execution time of the statement using microtime(true) for it's st...
/**
* Records the execution time of the statement using microtime(true)
* for it's start and end values. If no end value is present, will
* use the current time to determine total duration.
*
* @return $this
*/
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/Query.php:176
public getStartTime(bool $returnRaw = false, int $decimals = 6): float|string Returns the start time in seconds with microseconds.
/**
* Returns the start time in seconds with microseconds.
*
* @return float|string
*/
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/Query.php:194
public getDuration(int $decimals = 6): string Returns the duration of this query during execution, or null if the query has...
/**
* Returns the duration of this query during execution, or null if
* the query has not been executed yet.
*
* @param int $decimals The accuracy of the returned time.
*/
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/Query.php:209
public setError(int $code, string $error): $this Stores the error description that happened for this query.
/**
* Stores the error description that happened for this query.
*
* @return $this
*/
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/Query.php:219
public hasError(): bool Reports whether this statement created an error not.
/**
* Reports whether this statement created an error not.
*/
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/Query.php:230
public getErrorCode(): int Returns the error code created while executing this statement.
/**
* Returns the error code created while executing this statement.
*/
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/Query.php:238
public getErrorMessage(): string Returns the error message created while executing this statement.
/**
* Returns the error message created while executing this statement.
*/
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/Query.php:246
public isWriteType(): bool Determines if the statement is a write-type query or not.
/**
* Determines if the statement is a write-type query or not.
*/
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/Query.php:254
public swapPrefix(string $orig, string $swap): $this Swaps out one table prefix for a new one.
/**
* Swaps out one table prefix for a new one.
*
* @return $this
*/
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/Query.php:264
public getOriginalQuery(): string Returns the original SQL that was passed into the system.
/**
* Returns the original SQL that was passed into the system.
*/
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/Query.php:281
protected compileBinds() Escapes and inserts any binds into the finalQueryString property.
/**
* Escapes and inserts any binds into the finalQueryString property.
*
* @see https://regex101.com/r/EUEhay/5
*/
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/Query.php:291
protected matchNamedBinds(string $sql, array $binds): string Match bindings
/**
* Match bindings
*/
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/Query.php:319
protected matchSimpleBinds(string $sql, array $binds, int $bindCount, int $ml): string Match bindings
/**
* Match bindings
*/
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/Query.php:343
public debugToolbarDisplay(): string Returns string to display in debug toolbar
/**
* Returns string to display in debug toolbar
*/
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/Query.php:373
public __toString(): string Return text representation of the query
/**
* Return text representation of the query
*/
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/Query.php:427
lastQuery string (55) "SELECT * FROM `dancing_simba_destinationtable` LIMIT 6"
SELECT *
FROM `dancing_simba_destinationtable`
LIMIT 6
public connID -> mysqli#103 (18)
Properties (18)
Methods (43)
Static methods (1)
public readonly affected_rows -> integer 6
public readonly client_info -> string (14) "mysqlnd 8.2.28"
public readonly client_version -> integer 80228
public readonly connect_errno -> integer 0
public readonly connect_error -> null
public readonly errno -> integer 0
public readonly error -> string (0) ""
public readonly error_list -> array (0)
public readonly field_count -> integer 15
public readonly host_info -> string (25) "Localhost via UNIX socket"
public readonly info -> null
public readonly insert_id -> integer 0
public readonly server_info -> string (15) "10.6.22-MariaDB"
public connect(bool $persistent = false): false|mysqli Connect to the database.
/**
* Connect to the database.
*
* @return false|mysqli
*
* @throws DatabaseException
*/
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/MySQLi/Connection.php:102
public reconnect(): void Keep or establish the connection if no queries have been sent for a length of...
/**
* Keep or establish the connection if no queries have been sent for
* a length of time exceeding the server's idle timeout.
*
* @return void
*/
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/MySQLi/Connection.php:258
protected _close(): void Close the database connection.
/**
* Close the database connection.
*
* @return void
*/
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/MySQLi/Connection.php:269
public setDatabase(string $databaseName): bool Select a specific database table to use.
/**
* Select a specific database table to use.
*/
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/MySQLi/Connection.php:277
public getVersion(): string Returns a string containing the version of the database being used.
/**
* Returns a string containing the version of the database being used.
*/
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/MySQLi/Connection.php:299
protected execute(string $sql): false|mysqli_result Executes the query against the database.
/**
* Executes the query against the database.
*
* @return false|mysqli_result
*/
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/MySQLi/Connection.php:317
protected prepQuery(string $sql): string Prep the query. If needed, each database adapter can prep the query string
/**
* Prep the query. If needed, each database adapter can prep the query string
*/
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/MySQLi/Connection.php:342
public affectedRows(): int Returns the total number of rows affected by this query.
/**
* Returns the total number of rows affected by this query.
*/
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/MySQLi/Connection.php:356
/**
* Platform-dependant string escape
*/
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/MySQLi/Connection.php:364
public escapeLikeStringDirect($str): list<string>|string Escape Like String Direct There are a few instances where MySQLi queries cann...
/**
* Escape Like String Direct
* There are a few instances where MySQLi queries cannot take the
* additional "ESCAPE x" parameter for specifying the escape character
* in "LIKE" strings, and this handles those directly with a backslash.
*
* @param list<string>|string $str Input string
*
* @return list<string>|string
*/
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/MySQLi/Connection.php:383
protected _listTables(bool $prefixLimit = false, ?string $tableName = null): string Generates the SQL for listing tables in a platform-dependent manner. Uses esc...
/**
* Generates the SQL for listing tables in a platform-dependent manner.
* Uses escapeLikeStringDirect().
*
* @param string|null $tableName If $tableName is provided will return only this table if exists.
*/
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/MySQLi/Connection.php:409
protected _listColumns($table = ''): string Generates a platform-specific query string so that the column names can be fe...
/**
* Generates a platform-specific query string so that the column names can be fetched.
*
* @param string|TableName $table
*/
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/MySQLi/Connection.php:429
protected _fieldData(string $table): array Returns an array of objects with field data
/**
* Returns an array of objects with field data
*
* @return list<stdClass>
*
* @throws DatabaseException
*/
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/MySQLi/Connection.php:448
protected _indexData(string $table): array Returns an array of objects with index data
/**
* Returns an array of objects with index data
*
* @return array<string, stdClass>
*
* @throws DatabaseException
* @throws LogicException
*/
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/MySQLi/Connection.php:481
protected _foreignKeyData(string $table): array Returns an array of objects with Foreign key data
/**
* Returns an array of objects with Foreign key data
*
* @return array<string, stdClass>
*
* @throws DatabaseException
*/
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/MySQLi/Connection.php:528
/**
* Returns platform-specific SQL to enable foreign key checks.
*
* @return string
*/
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/MySQLi/Connection.php:588
public error(): array Returns the last error code and message. Must return this format: ['code' => ...
/**
* Returns the last error code and message.
* Must return this format: ['code' => string|int, 'message' => string]
* intval(code) === 0 means "no error".
*
* @return array<string, int|string>
*/
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/MySQLi/Connection.php:600
public insertID(): int Insert ID
/**
* Insert ID
*/
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/MySQLi/Connection.php:618
protected _transBegin(): bool Begin Transaction
/**
* Begin Transaction
*/
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/MySQLi/Connection.php:626
protected _transCommit(): bool Commit Transaction
/**
* Commit Transaction
*/
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/MySQLi/Connection.php:636
/**
* Rollback Transaction
*/
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/MySQLi/Connection.php:650
public __construct(array $params) Saves our connection settings.
/**
* Saves our connection settings.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:370
public initialize(): void Initializes the database connection/settings.
/**
* Initializes the database connection/settings.
*
* @return void
*
* @throws DatabaseException
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:404
public close(): void Close the database connection.
/**
* Close the database connection.
*
* @return void
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:483
public persistentConnect(): false|object|resource Create a persistent database connection.
/**
* Create a persistent database connection.
*
* @return false|object|resource
* @phpstan-return false|TConnection
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:504
public getConnection(?string $alias = null): false|object|resource Returns the actual connection object. If both a 'read' and 'write' connection...
/**
* Returns the actual connection object. If both a 'read' and 'write'
* connection has been specified, you can pass either term in to
* get that connection. If you pass either alias in and only a single
* connection is present, it must return the sole connection.
*
* @return false|object|resource
* @phpstan-return TConnection
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:518
public getDatabase(): string Returns the name of the current database being used.
/**
* Returns the name of the current database being used.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:527
public setPrefix(string $prefix = ''): string Set DB Prefix
/**
* Set DB Prefix
*
* Set's the DB Prefix to something new without needing to reconnect
*
* @param string $prefix The prefix
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:539
public getPrefix(): string Returns the database prefix.
/**
* Returns the database prefix.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:547
public getPlatform(): string The name of the platform in use (MySQLi, Postgre, SQLite3, OCI8, etc)
/**
* The name of the platform in use (MySQLi, Postgre, SQLite3, OCI8, etc)
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:555
public setAliasedTables(array $aliases): $this Sets the Table Aliases to use. These are typically collected during use of th...
/**
* Sets the Table Aliases to use. These are typically
* collected during use of the Builder, and set here
* so queries are built correctly.
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:567
public addTableAlias(string $alias): $this Add a table alias to our list.
/**
* Add a table alias to our list.
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:579
public query(string $sql, $binds = null, bool $setEscapeFlags = true, string $queryClass = ''): BaseResult|bool|Query BaseResult when “read” type query, bool when “write” type query, Query when prepared query Orchestrates a query against the database. Queries must use Database\Statemen...
/**
* Orchestrates a query against the database. Queries must use
* Database\Statement objects to store the query and build it.
* This method works with the cache.
*
* Should automatically handle different connections for read/write
* queries if needed.
*
* @param array|string|null $binds
*
* @return BaseResult|bool|Query BaseResult when “read” type query, bool when “write” type query, Query when prepared query
* @phpstan-return BaseResult<TConnection, TResult>|bool|Query
*
* @todo BC set $queryClass default as null in 4.1
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:615
public simpleQuery(string $sql): false|object|resource Performs a basic query against the database. No binding or caching is perform...
/**
* Performs a basic query against the database. No binding or caching
* is performed, nor are transactions handled. Simply takes a raw
* query string and returns the database-specific result id.
*
* @return false|object|resource
* @phpstan-return false|TResult
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:732
public transOff(): void Disable Transactions
/**
* Disable Transactions
*
* This permits transactions to be disabled at run-time.
*
* @return void
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:748
public transStrict(bool $mode = true): $this Enable/disable Transaction Strict Mode
/**
* Enable/disable Transaction Strict Mode
*
* When strict mode is enabled, if you are running multiple groups of
* transactions, if one group fails all subsequent groups will be
* rolled back.
*
* If strict mode is disabled, each group is treated autonomously,
* meaning a failure of one group will not affect any others
*
* @param bool $mode = true
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:767
public transStart(bool $testMode = false): bool Start Transaction
/**
* Start Transaction
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:777
public transException(bool $transException): $this If set to true, exceptions are thrown during transactions.
/**
* If set to true, exceptions are thrown during transactions.
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:791
public transComplete(): bool Complete Transaction
/**
* Complete Transaction
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:801
public transStatus(): bool Lets you retrieve the transaction flag to determine if it has failed
/**
* Lets you retrieve the transaction flag to determine if it has failed
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:827
public transBegin(bool $testMode = false): bool Begin Transaction
/**
* Begin Transaction
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:835
public transCommit(): bool Commit Transaction
/**
* Commit Transaction
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:869
public transRollback(): bool Rollback Transaction
/**
* Rollback Transaction
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:888
public resetTransStatus(): static Reset transaction status - to restart transactions after strict mode failure
/**
* Reset transaction status - to restart transactions after strict mode failure
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:907
public table($tableName): BaseBuilder Returns a non-shared new instance of the query builder for this connection.
/**
* Returns a non-shared new instance of the query builder for this connection.
*
* @param array|string|TableName $tableName
*
* @return BaseBuilder
*
* @throws DatabaseException
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:938
public newQuery(): CodeIgniter\Database\BaseBuilder Returns a new instance of the BaseBuilder class with a cleared FROM clause.
/**
* Returns a new instance of the BaseBuilder class with a cleared FROM clause.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:952
public prepare(Closure $func, array $options = array()): BasePreparedQuery|null Creates a prepared statement with the database that can then be used to execu...
/**
* Creates a prepared statement with the database that can then
* be used to execute multiple statements against. Within the
* closure, you would build the query in any normal way, though
* the Query Builder is the expected manner.
*
* Example:
* $stmt = $db->prepare(function($db)
* {
* return $db->table('users')
* ->where('id', 1)
* ->get();
* })
*
* @param Closure(BaseConnection): mixed $func
*
* @return BasePreparedQuery|null
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:980
public getLastQuery(): Query Returns the last query's statement object.
/**
* Returns the last query's statement object.
*
* @return Query
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:1008
public showLastQuery(): string Returns a string representation of the last query's statement object.
/**
* Returns a string representation of the last query's statement object.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:1016
public getConnectStart(): ?float Returns the time we started to connect to this database in seconds with micro...
/**
* Returns the time we started to connect to this database in
* seconds with microseconds.
*
* Used by the Debug Toolbar's timeline.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:1027
public getConnectDuration(int $decimals = 6): string Returns the number of seconds with microseconds that it took to connect to th...
/**
* Returns the number of seconds with microseconds that it took
* to connect to the database.
*
* Used by the Debug Toolbar's timeline.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:1038
/**
* Protect Identifiers
*
* This function is used extensively by the Query Builder class, and by
* a couple functions in this class.
* It takes a column or table name (optionally with an alias) and inserts
* the table prefix onto it. Some logic is necessary in order to deal with
* column names that include the path. Consider a query like this:
*
* SELECT hostname.database.table.column AS c FROM hostname.database.table
*
* Or a query with aliasing:
*
* SELECT m.member_id, m.member_name FROM members AS m
*
* Since the column name can include up to four segments (host, DB, table, column)
* or also have an alias prefix, we need to do a bit of work to figure this out and
* insert the table prefix (if it exists) in the proper position, and escape only
* the correct identifiers.
*
* @param array|int|string|TableName $item
* @param bool $prefixSingle Prefix a table name with no segments?
* @param bool $protectIdentifiers Protect table or column names?
* @param bool $fieldExists Supplied $item contains a column name?
*
* @return array|string
* @phpstan-return ($item is array ? array : string)
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:1071
public escapeIdentifier($item): string Escape the SQL Identifier
/**
* Escape the SQL Identifier
*
* This function escapes single identifier.
*
* @param non-empty-string|TableName $item
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:1236
public escapeIdentifiers($item): array|string Escape the SQL Identifiers
/**
* Escape the SQL Identifiers
*
* This function escapes column and table names
*
* @param array|string $item
*
* @return array|string
* @phpstan-return ($item is array ? array : string)
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:1276
public prefixTable(string $table = ''): string Prepends a database prefix if one exists in configuration
/**
* Prepends a database prefix if one exists in configuration
*
* @throws DatabaseException
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:1336
public escape($str): array|float|int|string "Smart" Escape String
/**
* "Smart" Escape String
*
* Escapes data based on type.
* Sets boolean and null types
*
* @param array|bool|float|int|object|string|null $str
*
* @return array|float|int|string
* @phpstan-return ($str is array ? array : float|int|string)
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:1361
public escapeString($str, bool $like = false): list<string>|string Escape String
/**
* Escape String
*
* @param list<string|Stringable>|string|Stringable $str Input string
* @param bool $like Whether the string will be used in a LIKE condition
*
* @return list<string>|string
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:1394
public escapeLikeString($str): list<string>|string Escape LIKE String
/**
* Escape LIKE String
*
* Calls the individual driver for platform
* specific escaping for LIKE conditions
*
* @param list<string|Stringable>|string|Stringable $str
*
* @return list<string>|string
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:1444
public callFunction(string $functionName, $params): bool This function enables you to call PHP database functions that are not nativel...
/**
* This function enables you to call PHP database functions that are not natively included
* in CodeIgniter, in a platform independent manner.
*
* @param array ...$params
*
* @throws DatabaseException
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:1467
protected getDriverFunctionPrefix(): string Get the prefix of the function to access the DB.
/**
* Get the prefix of the function to access the DB.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:1489
public listTables(bool $constrainByPrefix = false): false|list<string> Returns an array of table names
/**
* Returns an array of table names
*
* @return false|list<string>
*
* @throws DatabaseException
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:1505
public tableExists(string $tableName, bool $cached = true): bool Determine if a particular table exists
/**
* Determine if a particular table exists
*
* @param bool $cached Whether to use data cache
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:1542
public getFieldNames($tableName): false|list<string> Fetch Field Names
/**
* Fetch Field Names
*
* @param string|TableName $tableName
*
* @return false|list<string>
*
* @throws DatabaseException
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:1585
public fieldExists(string $fieldName, string $tableName): bool Determine if a particular field exists
/**
* Determine if a particular field exists
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:1632
public getFieldData(string $table): list<stdClass> Returns an object with field data
/**
* Returns an object with field data
*
* @return list<stdClass>
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:1642
public getIndexData(string $table): array<string, stdClass> Returns an object with key data
/**
* Returns an object with key data
*
* @return array<string, stdClass>
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:1652
public getForeignKeyData(string $table): array<string, stdClass> Returns an object with foreign key data
/**
* Returns an object with foreign key data
*
* @return array<string, stdClass>
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:1662
protected foreignKeyDataToObjects(array $data): array<string, stdClass> Converts array of arrays generated by _foreignKeyData() to array of objects
/**
* Converts array of arrays generated by _foreignKeyData() to array of objects
*
* @return array<string, stdClass>
*
* array[
* {constraint_name} =>
* stdClass[
* 'constraint_name' => string,
* 'table_name' => string,
* 'column_name' => string[],
* 'foreign_table_name' => string,
* 'foreign_column_name' => string[],
* 'on_delete' => string,
* 'on_update' => string,
* 'match' => string
* ]
* ]
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:1686
public disableForeignKeyChecks(): bool Disables foreign key checks temporarily.
/**
* Disables foreign key checks temporarily.
*
* @return bool
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:1719
public enableForeignKeyChecks(): bool Enables foreign key checks temporarily.
/**
* Enables foreign key checks temporarily.
*
* @return bool
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:1736
public pretend(bool $pretend = true): $this Allows the engine to be set into a mode where queries are not actually execut...
/**
* Allows the engine to be set into a mode where queries are not
* actually executed, but they are still generated, timed, etc.
*
* This is primarily used by the prepared query functionality.
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:1756
public resetDataCache(): $this Empties our data cache. Especially helpful during testing.
/**
* Empties our data cache. Especially helpful during testing.
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:1768
public isWriteType($sql): bool Determines if the statement is a write-type query or not.
/**
* Determines if the statement is a write-type query or not.
*
* @param string $sql
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:1780
public __get(string $key): array|bool|float|int|object|resource|string|null Accessor for properties if they exist.
/**
* Accessor for properties if they exist.
*
* @return array|bool|float|int|object|resource|string|null
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:1884
public __isset(string $key): bool Checker for properties existence.
/**
* Checker for properties existence.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:1896
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:1160
private CodeIgniter\Database\BaseConnection::escapeTableName(CodeIgniter\Database\TableName $tableName): string Returns escaped table name with alias.
/**
* Returns escaped table name with alias.
*/
Inherited from CodeIgniter\Database\BaseConnection
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseConnection.php:1258
protected tableName -> string (9) "auth_user"
protected randomKeyword -> array (2)
0 => string (6) "RAND()"
1 => string (8) "RAND(%d)"
protected countString -> string (19) "SELECT COUNT(*) AS "
/**
* FROM tables
*
* Groups tables in FROM clauses if needed, so there is no confusion
* about operator precedence.
*
* Note: This is only used (and overridden) by MySQL.
*/
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/MySQLi/Builder.php:52
protected _updateBatch(string $table, array $keys, array $values): string Generates a platform-specific batch update string from the supplied data
/**
* Generates a platform-specific batch update string from the supplied data
*/
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/MySQLi/Builder.php:64
public __construct($tableName, CodeIgniter\Database\ConnectionInterface $db, ?array $options = null) Constructor
/**
* Constructor
*
* @param array|string|TableName $tableName tablename or tablenames with or without aliases
*
* Examples of $tableName: `mytable`, `jobs j`, `jobs j, users u`, `['jobs j','users u']`
*
* @throws DatabaseException
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:307
public db(): CodeIgniter\Database\ConnectionInterface Returns the current database connection
/**
* Returns the current database connection
*
* @return BaseConnection
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:346
public testMode(bool $mode = true): $this Sets a test mode status.
/**
* Sets a test mode status.
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:356
public getTable(): string Gets the name of the primary table.
/**
* Gets the name of the primary table.
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:366
public getBinds(): array Returns an array of bind values and their named parameters for binding in the...
/**
* Returns an array of bind values and their
* named parameters for binding in the Query object later.
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:375
public ignore(bool $ignore = true): $this Ignore
/**
* Ignore
*
* Set ignore Flag for next insert,
* update or delete query.
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:388
public select($select = '*', ?bool $escape = null): $this Generates the SELECT portion of the query
/**
* Generates the SELECT portion of the query
*
* @param list<RawSql|string>|RawSql|string $select
* @param bool|null $escape Whether to protect identifiers
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:403
public selectMax(string $select = '', string $alias = ''): $this Generates a SELECT MAX(field) portion of a query
/**
* Generates a SELECT MAX(field) portion of a query
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:456
public selectMin(string $select = '', string $alias = ''): $this Generates a SELECT MIN(field) portion of a query
/**
* Generates a SELECT MIN(field) portion of a query
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:466
public selectAvg(string $select = '', string $alias = ''): $this Generates a SELECT AVG(field) portion of a query
/**
* Generates a SELECT AVG(field) portion of a query
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:476
public selectSum(string $select = '', string $alias = ''): $this Generates a SELECT SUM(field) portion of a query
/**
* Generates a SELECT SUM(field) portion of a query
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:486
public selectCount(string $select = '', string $alias = ''): $this Generates a SELECT COUNT(field) portion of a query
/**
* Generates a SELECT COUNT(field) portion of a query
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:496
public selectSubquery(CodeIgniter\Database\BaseBuilder $subquery, string $as): self Adds a subquery to the selection
/**
* Adds a subquery to the selection
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:504
protected createAliasFromTable(string $item): string Determines the alias name based on the table
/**
* Determines the alias name based on the table
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:555
public distinct(bool $val = true): $this Sets a flag which tells the query string compiler to add DISTINCT
/**
* Sets a flag which tells the query string compiler to add DISTINCT
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:571
public from($from, bool $overwrite = false): self Generates the FROM portion of the query
/**
* Generates the FROM portion of the query
*
* @param array|string $from
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:585
public fromSubquery(CodeIgniter\Database\BaseBuilder $from, string $alias): self
/**
* @param BaseBuilder $from Expected subquery
* @param string $alias Subquery alias
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:616
public join(string $table, $cond, string $type = '', ?bool $escape = null): $this Generates the JOIN portion of the query
/**
* Generates the JOIN portion of the query
*
* @param RawSql|string $cond
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:633
public where($key, $value = null, ?bool $escape = null): $this Generates the WHERE portion of the query. Separates multiple calls with 'AND'.
/**
* Generates the WHERE portion of the query.
* Separates multiple calls with 'AND'.
*
* @param array|RawSql|string $key
* @param mixed $value
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:720
public orWhere($key, $value = null, ?bool $escape = null): $this OR WHERE
/**
* OR WHERE
*
* Generates the WHERE portion of the query.
* Separates multiple calls with 'OR'.
*
* @param array|RawSql|string $key
* @param mixed $value
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:736
public whereIn(?string $key = null, $values = null, ?bool $escape = null): $this Generates a WHERE field IN('item', 'item') SQL query, joined with 'AND' if ap...
/**
* Generates a WHERE field IN('item', 'item') SQL query,
* joined with 'AND' if appropriate.
*
* @param array|BaseBuilder|(Closure(BaseBuilder): BaseBuilder)|null $values The values searched on, or anonymous function with subquery
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:848
public orWhereIn(?string $key = null, $values = null, ?bool $escape = null): $this Generates a WHERE field IN('item', 'item') SQL query, joined with 'OR' if app...
/**
* Generates a WHERE field IN('item', 'item') SQL query,
* joined with 'OR' if appropriate.
*
* @param array|BaseBuilder|(Closure(BaseBuilder): BaseBuilder)|null $values The values searched on, or anonymous function with subquery
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:861
public whereNotIn(?string $key = null, $values = null, ?bool $escape = null): $this Generates a WHERE field NOT IN('item', 'item') SQL query, joined with 'AND' i...
/**
* Generates a WHERE field NOT IN('item', 'item') SQL query,
* joined with 'AND' if appropriate.
*
* @param array|BaseBuilder|(Closure(BaseBuilder): BaseBuilder)|null $values The values searched on, or anonymous function with subquery
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:874
public orWhereNotIn(?string $key = null, $values = null, ?bool $escape = null): $this Generates a WHERE field NOT IN('item', 'item') SQL query, joined with 'OR' if...
/**
* Generates a WHERE field NOT IN('item', 'item') SQL query,
* joined with 'OR' if appropriate.
*
* @param array|BaseBuilder|(Closure(BaseBuilder): BaseBuilder)|null $values The values searched on, or anonymous function with subquery
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:887
public havingIn(?string $key = null, $values = null, ?bool $escape = null): $this Generates a HAVING field IN('item', 'item') SQL query, joined with 'AND' if a...
/**
* Generates a HAVING field IN('item', 'item') SQL query,
* joined with 'AND' if appropriate.
*
* @param array|BaseBuilder|(Closure(BaseBuilder): BaseBuilder)|null $values The values searched on, or anonymous function with subquery
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:900
public orHavingIn(?string $key = null, $values = null, ?bool $escape = null): $this Generates a HAVING field IN('item', 'item') SQL query, joined with 'OR' if ap...
/**
* Generates a HAVING field IN('item', 'item') SQL query,
* joined with 'OR' if appropriate.
*
* @param array|BaseBuilder|(Closure(BaseBuilder): BaseBuilder)|null $values The values searched on, or anonymous function with subquery
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:913
public havingNotIn(?string $key = null, $values = null, ?bool $escape = null): $this Generates a HAVING field NOT IN('item', 'item') SQL query, joined with 'AND' ...
/**
* Generates a HAVING field NOT IN('item', 'item') SQL query,
* joined with 'AND' if appropriate.
*
* @param array|BaseBuilder|(Closure(BaseBuilder):BaseBuilder)|null $values The values searched on, or anonymous function with subquery
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:926
public orHavingNotIn(?string $key = null, $values = null, ?bool $escape = null): $this Generates a HAVING field NOT IN('item', 'item') SQL query, joined with 'OR' i...
/**
* Generates a HAVING field NOT IN('item', 'item') SQL query,
* joined with 'OR' if appropriate.
*
* @param array|BaseBuilder|(Closure(BaseBuilder): BaseBuilder)|null $values The values searched on, or anonymous function with subquery
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:939
/**
* @used-by WhereIn()
* @used-by orWhereIn()
* @used-by whereNotIn()
* @used-by orWhereNotIn()
*
* @param non-empty-string|null $key
* @param array|BaseBuilder|(Closure(BaseBuilder): BaseBuilder)|null $values The values searched on, or anonymous function with subquery
*
* @return $this
*
* @throws InvalidArgumentException
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:957
public like($field, string $match = '', string $side = 'both', ?bool $escape = null, bool $insensitiveSearch = false): $this Generates a %LIKE% portion of the query. Separates multiple calls with 'AND'.
/**
* Generates a %LIKE% portion of the query.
* Separates multiple calls with 'AND'.
*
* @param array|RawSql|string $field
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:1008
public notLike($field, string $match = '', string $side = 'both', ?bool $escape = null, bool $insensitiveSearch = false): $this Generates a NOT LIKE portion of the query. Separates multiple calls with 'AND'.
/**
* Generates a NOT LIKE portion of the query.
* Separates multiple calls with 'AND'.
*
* @param array|RawSql|string $field
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:1021
public orLike($field, string $match = '', string $side = 'both', ?bool $escape = null, bool $insensitiveSearch = false): $this Generates a %LIKE% portion of the query. Separates multiple calls with 'OR'.
/**
* Generates a %LIKE% portion of the query.
* Separates multiple calls with 'OR'.
*
* @param array|RawSql|string $field
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:1034
public orNotLike($field, string $match = '', string $side = 'both', ?bool $escape = null, bool $insensitiveSearch = false): $this Generates a NOT LIKE portion of the query. Separates multiple calls with 'OR'.
/**
* Generates a NOT LIKE portion of the query.
* Separates multiple calls with 'OR'.
*
* @param array|RawSql|string $field
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:1047
public havingLike($field, string $match = '', string $side = 'both', ?bool $escape = null, bool $insensitiveSearch = false): $this Generates a %LIKE% portion of the query. Separates multiple calls with 'AND'.
/**
* Generates a %LIKE% portion of the query.
* Separates multiple calls with 'AND'.
*
* @param array|RawSql|string $field
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:1060
public notHavingLike($field, string $match = '', string $side = 'both', ?bool $escape = null, bool $insensitiveSearch = false): $this Generates a NOT LIKE portion of the query. Separates multiple calls with 'AND'.
/**
* Generates a NOT LIKE portion of the query.
* Separates multiple calls with 'AND'.
*
* @param array|RawSql|string $field
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:1073
public orHavingLike($field, string $match = '', string $side = 'both', ?bool $escape = null, bool $insensitiveSearch = false): $this Generates a %LIKE% portion of the query. Separates multiple calls with 'OR'.
/**
* Generates a %LIKE% portion of the query.
* Separates multiple calls with 'OR'.
*
* @param array|RawSql|string $field
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:1086
public orNotHavingLike($field, string $match = '', string $side = 'both', ?bool $escape = null, bool $insensitiveSearch = false): $this Generates a NOT LIKE portion of the query. Separates multiple calls with 'OR'.
/**
* Generates a NOT LIKE portion of the query.
* Separates multiple calls with 'OR'.
*
* @param array|RawSql|string $field
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:1099
/**
* Platform independent LIKE statement builder.
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:1193
public union($union): $this Add UNION statement
/**
* Add UNION statement
*
* @param BaseBuilder|Closure(BaseBuilder): BaseBuilder $union
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:1209
public unionAll($union): $this Add UNION ALL statement
/**
* Add UNION ALL statement
*
* @param BaseBuilder|Closure(BaseBuilder): BaseBuilder $union
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:1221
/**
* @used-by union()
* @used-by unionAll()
*
* @param BaseBuilder|Closure(BaseBuilder): BaseBuilder $union
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:1234
public groupStart(): $this Starts a query group.
/**
* Starts a query group.
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:1249
public orGroupStart(): $this Starts a query group, but ORs the group
/**
* Starts a query group, but ORs the group
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:1259
public notGroupStart(): $this Starts a query group, but NOTs the group
/**
* Starts a query group, but NOTs the group
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:1269
public orNotGroupStart(): $this Starts a query group, but OR NOTs the group
/**
* Starts a query group, but OR NOTs the group
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:1279
public groupEnd(): $this Ends a query group
/**
* Ends a query group
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:1289
public havingGroupStart(): $this Starts a query group for HAVING clause.
/**
* Starts a query group for HAVING clause.
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:1299
public orHavingGroupStart(): $this Starts a query group for HAVING clause, but ORs the group.
/**
* Starts a query group for HAVING clause, but ORs the group.
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:1309
public notHavingGroupStart(): $this Starts a query group for HAVING clause, but NOTs the group.
/**
* Starts a query group for HAVING clause, but NOTs the group.
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:1319
public orNotHavingGroupStart(): $this Starts a query group for HAVING clause, but OR NOTs the group.
/**
* Starts a query group for HAVING clause, but OR NOTs the group.
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:1329
public havingGroupEnd(): $this Ends a query group for HAVING clause.
/**
* Ends a query group for HAVING clause.
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:1339
protected groupStartPrepare(string $not = '', string $type = 'AND ', string $clause = 'QBWhere'): $this Prepate a query group start.
/**
* Prepate a query group start.
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:1349
protected groupEndPrepare(string $clause = 'QBWhere'): $this Prepate a query group end.
/**
* Prepate a query group end.
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:1370
protected groupGetType(string $type): string
/**
* @used-by groupStart()
* @used-by _like()
* @used-by whereHaving()
* @used-by _whereIn()
* @used-by havingGroupStart()
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:1390
public groupBy($by, ?bool $escape = null): $this
/**
* @param array|string $by
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:1405
public having($key, $value = null, ?bool $escape = null): $this Separates multiple calls with 'AND'.
/**
* Separates multiple calls with 'AND'.
*
* @param array|RawSql|string $key
* @param mixed $value
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:1439
public orHaving($key, $value = null, ?bool $escape = null): $this Separates multiple calls with 'OR'.
/**
* Separates multiple calls with 'OR'.
*
* @param array|RawSql|string $key
* @param mixed $value
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:1452
/**
* @param string $direction ASC, DESC or RANDOM
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:1462
public limit(?int $value = null, ?int $offset = 0): $this
/**
* @return $this
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:1514
public offset(int $offset): $this Sets the OFFSET value
/**
* Sets the OFFSET value
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:1537
/**
* Generates a platform-specific LIMIT clause.
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:1549
public set($key, $value = '', ?bool $escape = null): $this Allows key/value pairs to be set for insert(), update() or replace().
/**
* Allows key/value pairs to be set for insert(), update() or replace().
*
* @param array|object|string $key Field name, or an array of field/value pairs, or an object
* @param mixed $value Field value, if $key is a single field
* @param bool|null $escape Whether to escape values
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:1563
public getSetData(bool $clean = false): array Returns the previously set() data, alternatively resetting it if needed.
/**
* Returns the previously set() data, alternatively resetting it if needed.
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:1589
public getCompiledSelect(bool $reset = true): string Compiles a SELECT query string and returns the sql.
/**
* Compiles a SELECT query string and returns the sql.
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:1603
protected compileFinalQuery(string $sql): string Returns a finalized, compiled query string with the bindings inserted and pre...
/**
* Returns a finalized, compiled query string with the bindings
* inserted and prefixes swapped out.
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:1618
public get(?int $limit = null, int $offset = 0, bool $reset = true): false|ResultInterface Compiles the select statement based on the other functions called and runs th...
/**
* Compiles the select statement based on the other functions called
* and runs the query
*
* @return false|ResultInterface
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:1636
public countAll(bool $reset = true): int|string Generates a platform-specific query string that counts all records in the par...
/**
* Generates a platform-specific query string that counts all records in
* the particular table
*
* @return int|string
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:1667
public countAllResults(bool $reset = true): int|string Generates a platform-specific query string that counts all records returned b...
/**
* Generates a platform-specific query string that counts all records
* returned by an Query Builder query.
*
* @return int|string
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:1699
public getCompiledQBWhere(): array Compiles the set conditions and returns the sql statement
/**
* Compiles the set conditions and returns the sql statement
*
* @return array
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:1758
public getWhere($where = null, ?int $limit = null, ?int $offset = 0, bool $reset = true): ResultInterface Allows the where clause, limit and offset to be added directly
/**
* Allows the where clause, limit and offset to be added directly
*
* @param array|string $where
*
* @return ResultInterface
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:1770
protected batchExecute(string $renderMethod, int $batchSize = 100): false|int|list<string> Number of rows inserted or FALSE on failure, SQL array when testMode Compiles batch insert/update/upsert strings and runs the queries
/**
* Compiles batch insert/update/upsert strings and runs the queries
*
* @param '_deleteBatch'|'_insertBatch'|'_updateBatch'|'_upsertBatch' $renderMethod
*
* @return false|int|list<string> Number of rows inserted or FALSE on failure, SQL array when testMode
*
* @throws DatabaseException
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:1808
public setData($set, ?bool $escape = null, string $alias = ''): $this|null Allows a row or multiple rows to be set for batch inserts/upserts/updates
/**
* Allows a row or multiple rows to be set for batch inserts/upserts/updates
*
* @param array|object $set
* @param string $alias alias for sql table
*
* @return $this|null
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:1861
public getCompiledUpsert(): string Compiles an upsert query and returns the sql
/**
* Compiles an upsert query and returns the sql
*
* @return string
*
* @throws DatabaseException
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:1925
public upsert($set = null, ?bool $escape = null): false|int|list<string> Number of affected rows or FALSE on failure, SQL array when testMode Converts call to batchUpsert
/**
* Converts call to batchUpsert
*
* @param array|object|null $set
*
* @return false|int|list<string> Number of affected rows or FALSE on failure, SQL array when testMode
*
* @throws DatabaseException
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:1945
public upsertBatch($set = null, ?bool $escape = null, int $batchSize = 100): false|int|list<string> Number of affected rows or FALSE on failure, SQL array when testMode Compiles batch upsert strings and runs the queries
/**
* Compiles batch upsert strings and runs the queries
*
* @param array|object|null $set a dataset
*
* @return false|int|list<string> Number of affected rows or FALSE on failure, SQL array when testMode
*
* @throws DatabaseException
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:1981
protected _upsertBatch(string $table, array $keys, array $values): string Generates a platform-specific upsertBatch string from the supplied data
/**
* Generates a platform-specific upsertBatch string from the supplied data
*
* @used-by batchExecute()
*
* @param string $table Protected table name
* @param list<string> $keys QBKeys
* @param list<list<int|string>> $values QBSet
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:2015
public updateFields($set, bool $addToDefault = false, ?array $ignore = null): $this Sets update fields for upsert, update
/**
* Sets update fields for upsert, update
*
* @param list<RawSql>|list<string>|string $set
* @param bool $addToDefault adds update fields to the default ones
* @param array|null $ignore ignores items in set
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:2068
public onConstraint($set): $this Sets constraints for batch upsert, update
/**
* Sets constraints for batch upsert, update
*
* @param array|RawSql|string $set a string of columns, key value pairs, or RawSql
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:2110
public setQueryAsData($query, ?string $alias = null, $columns = null): CodeIgniter\Database\BaseBuilder Sets data source as a query for insertBatch()/updateBatch()/upsertBatch()/del...
/**
* Sets data source as a query for insertBatch()/updateBatch()/upsertBatch()/deleteBatch()
*
* @param BaseBuilder|RawSql $query
* @param array|string|null $columns an array or comma delimited string of columns
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:2145
protected fieldsFromQuery(string $sql): array Gets column names from a select query
/**
* Gets column names from a select query
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:2188
protected formatValues(array $values): array Converts value array of array to array of strings
/**
* Converts value array of array to array of strings
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:2196
public insertBatch($set = null, ?bool $escape = null, int $batchSize = 100): false|int|list<string> Number of rows inserted or FALSE on no data to perform an insert operation, SQL array when testMode Compiles batch insert strings and runs the queries
/**
* Compiles batch insert strings and runs the queries
*
* @param array|object|null $set a dataset
*
* @return false|int|list<string> Number of rows inserted or FALSE on no data to perform an insert operation, SQL array when testMode
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:2208
protected _insertBatch(string $table, array $keys, array $values): string Generates a platform-specific insert string from the supplied data.
/**
* Generates a platform-specific insert string from the supplied data.
*
* @used-by batchExecute()
*
* @param string $table Protected table name
* @param list<string> $keys QBKeys
* @param list<list<int|string>> $values QBSet
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:2242
public setInsertBatch($key, string $value = '', ?bool $escape = null): $this|null Allows key/value pairs to be set for batch inserts
/**
* Allows key/value pairs to be set for batch inserts
*
* @param mixed $key
*
* @return $this|null
*
* @deprecated
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:2272
public getCompiledInsert(bool $reset = true): bool|string Compiles an insert query and returns the sql
/**
* Compiles an insert query and returns the sql
*
* @return bool|string
*
* @throws DatabaseException
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:2288
public insert($set = null, ?bool $escape = null): BaseResult|bool|Query Compiles an insert string and runs the query
/**
* Compiles an insert string and runs the query
*
* @param array|object|null $set
*
* @return BaseResult|bool|Query
*
* @throws DatabaseException
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:2321
protected removeAlias(string $from): string
/**
* @internal This is a temporary solution.
*
* @see https://github.com/codeigniter4/CodeIgniter4/pull/5376
*
* @TODO Fix a root cause, and this method should be removed.
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:2363
protected validateInsert(): bool This method is used by both insert() and getCompiledInsert() to validate that...
/**
* This method is used by both insert() and getCompiledInsert() to
* validate that the there data is actually being set and that table
* has been chosen to be inserted into.
*
* @throws DatabaseException
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:2383
protected _insert(string $table, array $keys, array $unescapedKeys): string Generates a platform-specific insert string from the supplied data
/**
* Generates a platform-specific insert string from the supplied data
*
* @param string $table Protected table name
* @param list<string> $keys Keys of QBSet
* @param list<int|string> $unescapedKeys Values of QBSet
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:2403
public replace(?array $set = null): BaseResult|false|Query|string Compiles a replace into string and runs the query
/**
* Compiles a replace into string and runs the query
*
* @return BaseResult|false|Query|string
*
* @throws DatabaseException
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:2415
protected _replace(string $table, array $keys, array $values): string Generates a platform-specific replace string from the supplied data
/**
* Generates a platform-specific replace string from the supplied data
*
* @param string $table Protected table name
* @param list<string> $keys Keys of QBSet
* @param list<int|string> $values Values of QBSet
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:2445
public getCompiledUpdate(bool $reset = true): bool|string Compiles an update query and returns the sql
/**
* Compiles an update query and returns the sql
*
* @return bool|string
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:2466
public update($set = null, $where = null, ?int $limit = null): bool Compiles an update string and runs the query.
/**
* Compiles an update string and runs the query.
*
* @param array|object|null $set
* @param array|RawSql|string|null $where
*
* @throws DatabaseException
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:2489
protected _update(string $table, array $values): string Generates a platform-specific update string from the supplied data
/**
* Generates a platform-specific update string from the supplied data
*
* @param string $table Protected table name
* @param array<string, string> $values QBSet
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:2542
protected validateUpdate(): bool This method is used by both update() and getCompiledUpdate() to validate that...
/**
* This method is used by both update() and getCompiledUpdate() to
* validate that data is actually being set and that a table has been
* chosen to be updated.
*
* @throws DatabaseException
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:2571
public updateBatch($set = null, $constraints = null, int $batchSize = 100): false|int|list<string> Number of rows affected or FALSE on failure, SQL array when testMode Sets data and calls batchExecute to run queries
/**
* Sets data and calls batchExecute to run queries
*
* @param array|object|null $set a dataset
* @param array|RawSql|string|null $constraints
*
* @return false|int|list<string> Number of rows affected or FALSE on failure, SQL array when testMode
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:2592
public setUpdateBatch($key, string $index = '', ?bool $escape = null): $this Allows key/value pairs to be set for batch updating
/**
* Allows key/value pairs to be set for batch updating
*
* @param array|object $key
*
* @return $this
*
* @throws DatabaseException
*
* @deprecated
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:2723
public emptyTable(): bool|string TRUE on success, FALSE on failure, string on testMode Compiles a delete string and runs "DELETE FROM table"
/**
* Compiles a delete string and runs "DELETE FROM table"
*
* @return bool|string TRUE on success, FALSE on failure, string on testMode
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:2739
public truncate(): bool|string TRUE on success, FALSE on failure, string on testMode Compiles a truncate string and runs the query If the database does not suppor...
/**
* Compiles a truncate string and runs the query
* If the database does not support the truncate() command
* This function maps to "DELETE FROM table"
*
* @return bool|string TRUE on success, FALSE on failure, string on testMode
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:2761
protected _truncate(string $table): string Generates a platform-specific truncate string from the supplied data
/**
* Generates a platform-specific truncate string from the supplied data
*
* If the database does not support the truncate() command,
* then this method maps to 'DELETE FROM table'
*
* @param string $table Protected table name
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:2784
public getCompiledDelete(bool $reset = true): string Compiles a delete query string and returns the sql
/**
* Compiles a delete query string and returns the sql
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:2792
public delete($where = '', ?int $limit = null, bool $resetData = true): bool|string Returns a SQL string if in test mode. Compiles a delete string and runs the query
/**
* Compiles a delete string and runs the query
*
* @param array|RawSql|string $where
*
* @return bool|string Returns a SQL string if in test mode.
*
* @throws DatabaseException
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:2809
public deleteBatch($set = null, $constraints = null, int $batchSize = 100): false|int|list<string> Number of rows affected or FALSE on failure, SQL array when testMode Sets data and calls batchExecute to run queries
/**
* Sets data and calls batchExecute to run queries
*
* @param array|object|null $set a dataset
* @param array|RawSql|null $constraints
*
* @return false|int|list<string> Number of rows affected or FALSE on failure, SQL array when testMode
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:2859
protected _deleteBatch(string $table, array $keys, array $values): string Generates a platform-specific batch update string from the supplied data
/**
* Generates a platform-specific batch update string from the supplied data
*
* @used-by batchExecute()
*
* @param string $table Protected table name
* @param list<string> $keys QBKeys
* @param list<int|string> $values QBSet
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:2895
public increment(string $column, int $value = 1): bool Increments a numeric column by the specified value.
/**
* Increments a numeric column by the specified value.
*
* @return bool
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:2972
public decrement(string $column, int $value = 1): bool Decrements a numeric column by the specified value.
/**
* Decrements a numeric column by the specified value.
*
* @return bool
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:2992
protected _delete(string $table): string Generates a platform-specific delete string from the supplied data
/**
* Generates a platform-specific delete string from the supplied data
*
* @param string $table Protected table name
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:3012
protected trackAliases($table): string|null Used to track SQL statements written with aliased tables.
/**
* Used to track SQL statements written with aliased tables.
*
* @param array|string $table The table to inspect
*
* @return string|null
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:3024
protected compileSelect($selectOverride = false): string Compile the SELECT statement
/**
* Compile the SELECT statement
*
* Generates a query string based on which functions were used.
* Should not be called directly.
*
* @param mixed $selectOverride
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:3063
protected compileIgnore(string $statement): string Checks if the ignore option is supported by the Database Driver for the speci...
/**
* Checks if the ignore option is supported by
* the Database Driver for the specific statement.
*
* @return string
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:3120
protected compileWhereHaving(string $qbKey): string Escapes identifiers in WHERE and HAVING statements at execution time.
/**
* Escapes identifiers in WHERE and HAVING statements at execution time.
*
* Required so that aliases are tracked properly, regardless of whether
* where(), orWhere(), having(), orHaving are called prior to from(),
* join() and prefixTable is added only if needed.
*
* @param string $qbKey 'QBWhere' or 'QBHaving'
*
* @return string SQL statement
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:3140
protected compileGroupBy(): string Escapes identifiers in GROUP BY statements at execution time.
/**
* Escapes identifiers in GROUP BY statements at execution time.
*
* Required so that aliases are tracked properly, regardless of whether
* groupBy() is called prior to from(), join() and prefixTable is added
* only if needed.
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:3229
protected compileOrderBy(): string Escapes identifiers in ORDER BY statements at execution time.
/**
* Escapes identifiers in ORDER BY statements at execution time.
*
* Required so that aliases are tracked properly, regardless of whether
* orderBy() is called prior to from(), join() and prefixTable is added
* only if needed.
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:3256
protected unionInjection(string $sql): string
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:3277
protected objectToArray($object): array Takes an object as input and converts the class variables to array key/vals
/**
* Takes an object as input and converts the class variables to array key/vals
*
* @param array|object $object
*
* @return array
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:3295
protected batchObjectToArray($object): array Takes an object as input and converts the class variables to array key/vals
/**
* Takes an object as input and converts the class variables to array key/vals
*
* @param array|object $object
*
* @return array
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:3323
protected isLiteral(string $str): bool Determines if a string represents a literal value or a field name
/**
* Determines if a string represents a literal value or a field name
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:3347
public resetQuery(): $this Publicly-visible method to reset the QB values.
/**
* Publicly-visible method to reset the QB values.
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:3371
protected resetRun(array $qbResetItems) Resets the query builder values. Called by the get() function
/**
* Resets the query builder values. Called by the get() function
*
* @param array $qbResetItems An array of fields to reset
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:3384
protected resetSelect() Resets the query builder values. Called by the get() function
/**
* Resets the query builder values. Called by the get() function
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:3394
protected resetWrite() Resets the query builder "write" values.
/**
* Resets the query builder "write" values.
*
* Called by the insert() update() insertBatch() updateBatch() and delete() functions
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:3425
protected hasOperator(string $str): bool Tests whether the string has an SQL operator
/**
* Tests whether the string has an SQL operator
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:3442
/**
* Returns the SQL string operator
*
* @return array|false|string
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:3455
protected setBind(string $key, $value = null, bool $escape = true): string Stores a bind value after ensuring that it's unique. While it might be nicer ...
/**
* Stores a bind value after ensuring that it's unique.
* While it might be nicer to have named keys for our binds array
* with PHP 7+ we get a huge memory/performance gain with indexed
* arrays instead, so lets take advantage of that here.
*
* @param mixed $value
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:3523
protected cleanClone(): $this Returns a clone of a Base Builder with reset query builder values.
/**
* Returns a clone of a Base Builder with reset query builder values.
*
* @return $this
*
* @deprecated
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:3555
protected isSubquery($value): bool
/**
* @param mixed $value
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:3563
/**
* @param BaseBuilder|Closure(BaseBuilder): BaseBuilder $builder
* @param bool $wrapped Wrap the subquery in brackets
* @param string $alias Subquery alias
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:3573
public when($condition, callable $callback, ?callable $defaultCallback = null): self Only runs the query when $condition evaluates to true
/**
* Only runs the query when $condition evaluates to true
*
* @template TWhen of mixed
*
* @phpstan-param TWhen $condition
* @phpstan-param callable(self, TWhen): mixed $callback
* @phpstan-param (callable(self): mixed)|null $defaultCallback
* @param array|bool|float|int|object|resource|string|null $condition
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Traits/ConditionalTrait.php:30
public whenNot($condition, callable $callback, ?callable $defaultCallback = null): self Only runs the query when $condition evaluates to false
/**
* Only runs the query when $condition evaluates to false
*
* @template TWhenNot of mixed
*
* @phpstan-param TWhenNot $condition
* @phpstan-param callable(self, TWhenNot): mixed $callback
* @phpstan-param (callable(self): mixed)|null $defaultCallback
* @param array|bool|float|int|object|resource|string|null $condition
*
* @return $this
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Traits/ConditionalTrait.php:53
private CodeIgniter\Database\BaseBuilder::setAlias(string $alias): CodeIgniter\Database\BaseBuilder Set table alias for dataset pseudo table.
/**
* Set table alias for dataset pseudo table.
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:2049
private CodeIgniter\Database\BaseBuilder::getOperatorFromWhereKey(string $whereKey): false|list<string> Returns the SQL string operator from where key
/**
* Returns the SQL string operator from where key
*
* @return false|list<string>
*/
Inherited from CodeIgniter\Database\BaseBuilder
Defined in <ROOT>/vendor/codeigniter4/framework/system/Database/BaseBuilder.php:3489
protected tempData -> array (0)
protected escape -> array (0)
private builderMethodsNotAvailable -> array (3)
0 => string (17) "getCompiledInsert"
1 => string (17) "getCompiledSelect"
2 => string (17) "getCompiledUpdate"
protected hashPassword(array $data): array
Defined in <ROOT>/admin/src/Users/Models/UserModel.php:46
protected setInsertValidationRules(array $data): array Set validation rules for inserts.
/**
* Set validation rules for inserts.
*/
Defined in <ROOT>/admin/src/Users/Models/UserModel.php:68
protected setUpdateValidationRules(array $data): array Set validation rules for updates (ignore unique check for current record).
/**
* Set validation rules for updates (ignore unique check for current record).
*/
Defined in <ROOT>/admin/src/Users/Models/UserModel.php:93
public __construct(?CodeIgniter\Database\ConnectionInterface $db = null, ?CodeIgniter\Validation\ValidationInterface $validation = null)
new \Nguchiro\Users\Models\UserModel()
Inherited from CodeIgniter\Model
Defined in <ROOT>/vendor/codeigniter4/framework/system/Model.php:150
public setTable(string $table): $this Specify the table associated with a model
$value->setTable()
/**
* Specify the table associated with a model
*
* @param string $table Table
*
* @return $this
*/
Inherited from CodeIgniter\Model
Defined in <ROOT>/vendor/codeigniter4/framework/system/Model.php:169
protected doFind(bool $singleton, $id = null): array|object|null The resulting row of data, or null. Fetches the row(s) of database from $this->table with a primary key matching ...
/**
* Fetches the row(s) of database from $this->table with a primary key
* matching $id.
* This method works only with dbCalls.
*
* @param bool $singleton Single or multiple results
* @param array|int|string|null $id One primary key or an array of primary keys
*
* @return array|object|null The resulting row of data, or null.
* @phpstan-return ($singleton is true ? row_array|null|object : list<row_array|object>)
*/
Inherited from CodeIgniter\Model
Defined in <ROOT>/vendor/codeigniter4/framework/system/Model.php:187
protected doFindColumn(string $columnName): array|null The resulting row of data, or null if no data found. Fetches the column of database from $this->table. This method works only with...
/**
* Fetches the column of database from $this->table.
* This method works only with dbCalls.
*
* @param string $columnName Column Name
*
* @return array|null The resulting row of data, or null if no data found.
* @phpstan-return list<row_array>|null
*/
Inherited from CodeIgniter\Model
Defined in <ROOT>/vendor/codeigniter4/framework/system/Model.php:250
protected doFindAll(?int $limit = null, int $offset = 0): array Works with the current Query Builder instance to return all results, while op...
/**
* Works with the current Query Builder instance to return
* all results, while optionally limiting them.
* This method works only with dbCalls.
*
* @param int|null $limit Limit
* @param int $offset Offset
*
* @return array
* @phpstan-return list<row_array|object>
*/
Inherited from CodeIgniter\Model
Defined in <ROOT>/vendor/codeigniter4/framework/system/Model.php:266
protected doFirst(): array|object|null Returns the first row of the result set. Will take any previous Query Builder...
/**
* Returns the first row of the result set. Will take any previous
* Query Builder calls into account when determining the result set.
* This method works only with dbCalls.
*
* @return array|object|null
* @phpstan-return row_array|object|null
*/
Inherited from CodeIgniter\Model
Defined in <ROOT>/vendor/codeigniter4/framework/system/Model.php:308
protected doInsert(array $row): bool Inserts data into the current table. This method works only with dbCalls.
/**
* Inserts data into the current table.
* This method works only with dbCalls.
*
* @param array $row Row data
* @phpstan-param row_array $row
*
* @return bool
*/
Inherited from CodeIgniter\Model
Defined in <ROOT>/vendor/codeigniter4/framework/system/Model.php:350
protected doInsertBatch(?array $set = null, ?bool $escape = null, int $batchSize = 100, bool $testing = false): bool|int Number of rows inserted or FALSE on failure Compiles batch insert strings and runs the queries, validating each row prior...
/**
* Compiles batch insert strings and runs the queries, validating each row prior.
* This method works only with dbCalls.
*
* @param array|null $set An associative array of insert values
* @param bool|null $escape Whether to escape values
* @param int $batchSize The size of the batch to run
* @param bool $testing True means only number of records is returned, false will execute the query
*
* @return bool|int Number of rows inserted or FALSE on failure
*/
Inherited from CodeIgniter\Model
Defined in <ROOT>/vendor/codeigniter4/framework/system/Model.php:416
protected doUpdate($id = null, $row = null): bool Updates a single record in $this->table. This method works only with dbCalls.
/**
* Updates a single record in $this->table.
* This method works only with dbCalls.
*
* @param array|int|string|null $id
* @param array|null $row Row data
* @phpstan-param row_array|null $row
*/
Inherited from CodeIgniter\Model
Defined in <ROOT>/vendor/codeigniter4/framework/system/Model.php:439
protected doUpdateBatch(?array $set = null, ?string $index = null, int $batchSize = 100, bool $returnSQL = false): false|int|list<string> Number of rows affected or FALSE on failure, SQL array when testMode Compiles an update string and runs the query This method works only with dbCa...
/**
* Compiles an update string and runs the query
* This method works only with dbCalls.
*
* @param array|null $set An associative array of update values
* @param string|null $index The where key
* @param int $batchSize The size of the batch to run
* @param bool $returnSQL True means SQL is returned, false will execute the query
*
* @return false|int|list<string> Number of rows affected or FALSE on failure, SQL array when testMode
*
* @throws DatabaseException
*/
Inherited from CodeIgniter\Model
Defined in <ROOT>/vendor/codeigniter4/framework/system/Model.php:477
protected doDelete($id = null, bool $purge = false): bool|string SQL string when testMode Deletes a single record from $this->table where $id matches the table's prima...
/**
* Deletes a single record from $this->table where $id matches
* the table's primaryKey
* This method works only with dbCalls.
*
* @param array|int|string|null $id The rows primary key(s)
* @param bool $purge Allows overriding the soft deletes setting.
*
* @return bool|string SQL string when testMode
*
* @throws DatabaseException
*/
Inherited from CodeIgniter\Model
Defined in <ROOT>/vendor/codeigniter4/framework/system/Model.php:494
protected doPurgeDeleted(): bool|string Returns a SQL string if in test mode. Permanently deletes all rows that have been marked as deleted through soft de...
/**
* Permanently deletes all rows that have been marked as deleted
* through soft deletes (deleted = 1)
* This method works only with dbCalls.
*
* @return bool|string Returns a SQL string if in test mode.
*/
Inherited from CodeIgniter\Model
Defined in <ROOT>/vendor/codeigniter4/framework/system/Model.php:531
protected doOnlyDeleted(): void Works with the find* methods to return only the rows that have been deleted. ...
/**
* Works with the find* methods to return only the rows that
* have been deleted.
* This method works only with dbCalls.
*
* @return void
*/
Inherited from CodeIgniter\Model
Defined in <ROOT>/vendor/codeigniter4/framework/system/Model.php:545
protected doReplace(?array $row = null, bool $returnSQL = false): BaseResult|false|Query|string Compiles a replace into string and runs the query This method works only with...
/**
* Compiles a replace into string and runs the query
* This method works only with dbCalls.
*
* @param array|null $row Data
* @phpstan-param row_array|null $row
* @param bool $returnSQL Set to true to return Query String
*
* @return BaseResult|false|Query|string
*/
Inherited from CodeIgniter\Model
Defined in <ROOT>/vendor/codeigniter4/framework/system/Model.php:560
protected doErrors(): array<string, string> Grabs the last error(s) that occurred from the Database connection. The retur...
/**
* Grabs the last error(s) that occurred from the Database connection.
* The return array should be in the following format:
* ['source' => 'message']
* This method works only with dbCalls.
*
* @return array<string, string>
*/
Inherited from CodeIgniter\Model
Defined in <ROOT>/vendor/codeigniter4/framework/system/Model.php:573
public getIdValue($row): array|int|string|null Returns the id value for the data array or object
$value->getIdValue()
/**
* Returns the id value for the data array or object
*
* @param array|object $row Row data
* @phpstan-param row_array|object $row
*
* @return array|int|string|null
*/
Inherited from CodeIgniter\Model
Defined in <ROOT>/vendor/codeigniter4/framework/system/Model.php:593
public chunk(int $size, Closure $userFunc) Loops over records in batches, allowing you to operate on them. Works with $t...
$value->chunk()
/**
* Loops over records in batches, allowing you to operate on them.
* Works with $this->builder to get the Compiled select to
* determine the rows to operate on.
* This method works only with dbCalls.
*/
Inherited from CodeIgniter\Model
Defined in <ROOT>/vendor/codeigniter4/framework/system/Model.php:629
public countAllResults(bool $reset = true, bool $test = false): int|string Override countAllResults to account for soft deleted accounts.
$value->countAllResults()
/**
* Override countAllResults to account for soft deleted accounts.
*
* @return int|string
*/
Inherited from CodeIgniter\Model
Defined in <ROOT>/vendor/codeigniter4/framework/system/Model.php:663
public builder(?string $table = null): BaseBuilder Provides a shared instance of the Query Builder.
$value->builder()
/**
* Provides a shared instance of the Query Builder.
*
* @param non-empty-string|null $table
*
* @return BaseBuilder
*
* @throws ModelException
*/
Inherited from CodeIgniter\Model
Defined in <ROOT>/vendor/codeigniter4/framework/system/Model.php:688
public set($key, $value = '', ?bool $escape = null): $this Captures the builder's set() method so that we can validate the data here. Th...
$value->set()
/**
* Captures the builder's set() method so that we can validate the
* data here. This allows it to be used with any of the other
* builder methods and still get validated data, like replace.
*
* @param array|object|string $key Field name, or an array of field/value pairs, or an object
* @param bool|float|int|object|string|null $value Field value, if $key is a single field
* @param bool|null $escape Whether to escape values
*
* @return $this
*/
Inherited from CodeIgniter\Model
Defined in <ROOT>/vendor/codeigniter4/framework/system/Model.php:735
protected shouldUpdate($row): bool This method is called on save to determine if entry have to be updated If thi...
/**
* This method is called on save to determine if entry have to be updated
* If this method return false insert operation will be executed
*
* @param array|object $row Data
*/
Inherited from CodeIgniter\Model
Defined in <ROOT>/vendor/codeigniter4/framework/system/Model.php:758
public insert($row = null, bool $returnID = true): bool|int|string Inserts data into the database. If an object is provided, it will attempt to ...
$value->insert()
/**
* Inserts data into the database. If an object is provided,
* it will attempt to convert it to an array.
*
* @param array|object|null $row
* @phpstan-param row_array|object|null $row
* @param bool $returnID Whether insert ID should be returned or not.
*
* @return bool|int|string
* @phpstan-return ($returnID is true ? int|string|false : bool)
*
* @throws ReflectionException
*/
Inherited from CodeIgniter\Model
Defined in <ROOT>/vendor/codeigniter4/framework/system/Model.php:786
protected doProtectFieldsForInsert(array $row): array Ensures that only the fields that are allowed to be inserted are in the data ...
/**
* Ensures that only the fields that are allowed to be inserted are in
* the data array.
*
* @used-by insert() to protect against mass assignment vulnerabilities.
* @used-by insertBatch() to protect against mass assignment vulnerabilities.
*
* @param array $row Row data
* @phpstan-param row_array $row
*
* @throws DataException
*/
Inherited from CodeIgniter\Model
Defined in <ROOT>/vendor/codeigniter4/framework/system/Model.php:815
public update($id = null, $row = null): bool Updates a single record in the database. If an object is provided, it will at...
$value->update()
/**
* Updates a single record in the database. If an object is provided,
* it will attempt to convert it into an array.
*
* @param array|int|string|null $id
* @param array|object|null $row
* @phpstan-param row_array|object|null $row
*
* @throws ReflectionException
*/
Inherited from CodeIgniter\Model
Defined in <ROOT>/vendor/codeigniter4/framework/system/Model.php:849
protected objectToRawArray($object, bool $onlyChanged = true, bool $recursive = false): array Takes a class and returns an array of its public and protected properties as ...
/**
* Takes a class and returns an array of its public and protected
* properties as an array with raw values.
*
* @param object $object Object
* @param bool $recursive If true, inner entities will be cast as array as well
*
* @return array<string, mixed> Array with raw values.
*
* @throws ReflectionException
*/
Inherited from CodeIgniter\Model
Defined in <ROOT>/vendor/codeigniter4/framework/system/Model.php:877
public __get(string $name): array|BaseBuilder|bool|float|int|object|string|null Provides/instantiates the builder/db connection and model's table/primary key...
/**
* Provides/instantiates the builder/db connection and model's table/primary key names and return type.
*
* @param string $name Name
*
* @return array|BaseBuilder|bool|float|int|object|string|null
*/
Inherited from CodeIgniter\Model
Defined in <ROOT>/vendor/codeigniter4/framework/system/Model.php:889
public __isset(string $name): bool Checks for the existence of properties across this model, builder, and db con...
/**
* Checks for the existence of properties across this model, builder, and db connection.
*
* @param string $name Name
*/
Inherited from CodeIgniter\Model
Defined in <ROOT>/vendor/codeigniter4/framework/system/Model.php:903
public __call(string $name, array $params): $this|array|BaseBuilder|bool|float|int|object|string|null Provides direct access to method in the builder (if available) and the databa...
/**
* Provides direct access to method in the builder (if available)
* and the database connection.
*
* @return $this|array|BaseBuilder|bool|float|int|object|string|null
*/
Inherited from CodeIgniter\Model
Defined in <ROOT>/vendor/codeigniter4/framework/system/Model.php:918
/**
* Creates DataConverter instance.
*/
Inherited from CodeIgniter\BaseModel
Defined in <ROOT>/vendor/codeigniter4/framework/system/BaseModel.php:376
protected useCasts(): bool Are casts used?
/**
* Are casts used?
*/
Inherited from CodeIgniter\BaseModel
Defined in <ROOT>/vendor/codeigniter4/framework/system/BaseModel.php:390
protected initialize(): void Initializes the instance with any additional steps. Optionally implemented by...
/**
* Initializes the instance with any additional steps.
* Optionally implemented by child classes.
*
* @return void
*/
Inherited from CodeIgniter\BaseModel
Defined in <ROOT>/vendor/codeigniter4/framework/system/BaseModel.php:401
public find($id = null): array|object|null The resulting row of data, or null. Fetches the row of database.
$value->find()
/**
* Fetches the row of database.
*
* @param array|int|string|null $id One primary key or an array of primary keys
*
* @return array|object|null The resulting row of data, or null.
* @phpstan-return ($id is int|string ? row_array|object|null : list<row_array|object>)
*/
Inherited from CodeIgniter\BaseModel
Defined in <ROOT>/vendor/codeigniter4/framework/system/BaseModel.php:590
public findColumn(string $columnName): array|null The resulting row of data, or null if no data found. Fetches the column of database.
$value->findColumn()
/**
* Fetches the column of database.
*
* @param string $columnName Column Name
*
* @return array|null The resulting row of data, or null if no data found.
*
* @throws DataException
*/
Inherited from CodeIgniter\BaseModel
Defined in <ROOT>/vendor/codeigniter4/framework/system/BaseModel.php:634
public findAll(?int $limit = null, int $offset = 0): array Fetches all results, while optionally limiting them.
$value->findAll()
/**
* Fetches all results, while optionally limiting them.
*
* @param int $limit Limit
* @param int $offset Offset
*
* @return array
*/
Inherited from CodeIgniter\BaseModel
Defined in <ROOT>/vendor/codeigniter4/framework/system/BaseModel.php:653
public first(): array|object|null Returns the first row of the result set.
$value->first()
/**
* Returns the first row of the result set.
*
* @return array|object|null
*/
Inherited from CodeIgniter\BaseModel
Defined in <ROOT>/vendor/codeigniter4/framework/system/BaseModel.php:698
public save($row): bool A convenience method that will attempt to determine whether the data should b...
$value->save()
/**
* A convenience method that will attempt to determine whether the
* data should be inserted or updated. Will work with either
* an array or object. When using with custom class objects,
* you must ensure that the class will provide access to the class
* variables, even if through a magic method.
*
* @param array|object $row Row data
* @phpstan-param row_array|object $row
*
* @throws ReflectionException
*/
Inherited from CodeIgniter\BaseModel
Defined in <ROOT>/vendor/codeigniter4/framework/system/BaseModel.php:741
public getInsertID(): int|string Returns last insert ID or 0.
$value->getInsertID()
/**
* Returns last insert ID or 0.
*
* @return int|string
*/
Inherited from CodeIgniter\BaseModel
Defined in <ROOT>/vendor/codeigniter4/framework/system/BaseModel.php:779
protected setCreatedField(array $row, $date): array Set datetime to created field.
/**
* Set datetime to created field.
*
* @phpstan-param row_array $row
* @param int|string $date timestamp or datetime string
*/
Inherited from CodeIgniter\BaseModel
Defined in <ROOT>/vendor/codeigniter4/framework/system/BaseModel.php:869
protected setUpdatedField(array $row, $date): array Set datetime to updated field.
/**
* Set datetime to updated field.
*
* @phpstan-param row_array $row
* @param int|string $date timestamp or datetime string
*/
Inherited from CodeIgniter\BaseModel
Defined in <ROOT>/vendor/codeigniter4/framework/system/BaseModel.php:884
public insertBatch(?array $set = null, ?bool $escape = null, int $batchSize = 100, bool $testing = false): bool|int Number of rows inserted or FALSE on failure Compiles batch insert runs the queries, validating each row prior.
$value->insertBatch()
/**
* Compiles batch insert runs the queries, validating each row prior.
*
* @param list<array|object>|null $set an associative array of insert values
* @phpstan-param list<row_array|object>|null $set
* @param bool|null $escape Whether to escape values
* @param int $batchSize The size of the batch to run
* @param bool $testing True means only number of records is returned, false will execute the query
*
* @return bool|int Number of rows inserted or FALSE on failure
*
* @throws ReflectionException
*/
Inherited from CodeIgniter\BaseModel
Defined in <ROOT>/vendor/codeigniter4/framework/system/BaseModel.php:906
public updateBatch(?array $set = null, ?string $index = null, int $batchSize = 100, bool $returnSQL = false): false|int|list<string> Number of rows affected or FALSE on failure, SQL array when testMode Compiles an update and runs the query.
$value->updateBatch()
/**
* Compiles an update and runs the query.
*
* @param list<array|object>|null $set an associative array of insert values
* @phpstan-param list<row_array|object>|null $set
* @param string|null $index The where key
* @param int $batchSize The size of the batch to run
* @param bool $returnSQL True means SQL is returned, false will execute the query
*
* @return false|int|list<string> Number of rows affected or FALSE on failure, SQL array when testMode
*
* @throws DatabaseException
* @throws ReflectionException
*/
Inherited from CodeIgniter\BaseModel
Defined in <ROOT>/vendor/codeigniter4/framework/system/BaseModel.php:1053
public delete($id = null, bool $purge = false): BaseResult|bool Deletes a single record from the database where $id matches.
$value->delete()
/**
* Deletes a single record from the database where $id matches.
*
* @param array|int|string|null $id The rows primary key(s)
* @param bool $purge Allows overriding the soft deletes setting.
*
* @return BaseResult|bool
*
* @throws DatabaseException
*/
Inherited from CodeIgniter\BaseModel
Defined in <ROOT>/vendor/codeigniter4/framework/system/BaseModel.php:1134
public purgeDeleted(): bool|string Returns a string if in test mode. Permanently deletes all rows that have been marked as deleted through soft de...
$value->purgeDeleted()
/**
* Permanently deletes all rows that have been marked as deleted
* through soft deletes (deleted = 1).
*
* @return bool|string Returns a string if in test mode.
*/
Inherited from CodeIgniter\BaseModel
Defined in <ROOT>/vendor/codeigniter4/framework/system/BaseModel.php:1175
public withDeleted(bool $val = true): $this Sets $useSoftDeletes value so that we can temporarily override the soft delet...
$value->withDeleted()
/**
* Sets $useSoftDeletes value so that we can temporarily override
* the soft deletes settings. Can be used for all find* methods.
*
* @param bool $val Value
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in <ROOT>/vendor/codeigniter4/framework/system/BaseModel.php:1192
public onlyDeleted(): $this Works with the find* methods to return only the rows that have been deleted.
$value->onlyDeleted()
/**
* Works with the find* methods to return only the rows that
* have been deleted.
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in <ROOT>/vendor/codeigniter4/framework/system/BaseModel.php:1205
public replace(?array $row = null, bool $returnSQL = false): BaseResult|false|Query|string Compiles a replace and runs the query.
$value->replace()
/**
* Compiles a replace and runs the query.
*
* @param array|null $row Row data
* @phpstan-param row_array|null $row
* @param bool $returnSQL Set to true to return Query String
*
* @return BaseResult|false|Query|string
*/
Inherited from CodeIgniter\BaseModel
Defined in <ROOT>/vendor/codeigniter4/framework/system/BaseModel.php:1222
public errors(bool $forceDB = false): array<string, string> Grabs the last error(s) that occurred. If data was validated, it will first c...
$value->errors()
/**
* Grabs the last error(s) that occurred. If data was validated,
* it will first check for errors there, otherwise will try to
* grab the last error from the Database connection.
*
* The return array should be in the following format:
* ['source' => 'message']
*
* @param bool $forceDB Always grab the db error, not validation
*
* @return array<string, string>
*/
Inherited from CodeIgniter\BaseModel
Defined in <ROOT>/vendor/codeigniter4/framework/system/BaseModel.php:1246
public paginate(?int $perPage = null, string $group = 'default', ?int $page = null, int $segment = 0): array|null Works with Pager to get the size and offset parameters. Expects a GET variabl...
$value->paginate()
/**
* Works with Pager to get the size and offset parameters.
* Expects a GET variable (?page=2) that specifies the page of results
* to display.
*
* @param int|null $perPage Items per page
* @param string $group Will be used by the pagination library to identify a unique pagination set.
* @param int|null $page Optional page number (useful when the page number is provided in different way)
* @param int $segment Optional URI segment number (if page number is provided by URI segment)
*
* @return array|null
*/
Inherited from CodeIgniter\BaseModel
Defined in <ROOT>/vendor/codeigniter4/framework/system/BaseModel.php:1272
public setAllowedFields(array $allowedFields): $this It could be used when you have to change default or override current allowed ...
$value->setAllowedFields()
/**
* It could be used when you have to change default or override current allowed fields.
*
* @param array $allowedFields Array with names of fields
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in <ROOT>/vendor/codeigniter4/framework/system/BaseModel.php:1297
public protect(bool $protect = true): $this Sets whether or not we should whitelist data set during updates or inserts ag...
$value->protect()
/**
* Sets whether or not we should whitelist data set during
* updates or inserts against $this->availableFields.
*
* @param bool $protect Value
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in <ROOT>/vendor/codeigniter4/framework/system/BaseModel.php:1312
protected doProtectFields(array $row): array Ensures that only the fields that are allowed to be updated are in the data a...
/**
* Ensures that only the fields that are allowed to be updated are
* in the data array.
*
* @used-by update() to protect against mass assignment vulnerabilities.
* @used-by updateBatch() to protect against mass assignment vulnerabilities.
*
* @param array $row Row data
* @phpstan-param row_array $row
*
* @throws DataException
*/
Inherited from CodeIgniter\BaseModel
Defined in <ROOT>/vendor/codeigniter4/framework/system/BaseModel.php:1331
protected setDate(?int $userData = null): int|string Sets the date or current date if null value is passed.
/**
* Sets the date or current date if null value is passed.
*
* @param int|null $userData An optional PHP timestamp to be converted.
*
* @return int|string
*
* @throws ModelException
*/
Inherited from CodeIgniter\BaseModel
Defined in <ROOT>/vendor/codeigniter4/framework/system/BaseModel.php:1376
protected intToDate(int $value): int|string A utility function to allow child models to use the type of date/time format ...
/**
* A utility function to allow child models to use the type of
* date/time format that they prefer. This is primarily used for
* setting created_at, updated_at and deleted_at values, but can be
* used by inheriting classes.
*
* The available time formats are:
* - 'int' - Stores the date as an integer timestamp
* - 'datetime' - Stores the data in the SQL datetime format
* - 'date' - Stores the date (only) in the SQL date format.
*
* @param int $value value
*
* @return int|string
*
* @throws ModelException
*/
Inherited from CodeIgniter\BaseModel
Defined in <ROOT>/vendor/codeigniter4/framework/system/BaseModel.php:1400
protected timeToDate(CodeIgniter\I18n\Time $value): int|string Converts Time value to string using $this->dateFormat.
/**
* Converts Time value to string using $this->dateFormat.
*
* The available time formats are:
* - 'int' - Stores the date as an integer timestamp
* - 'datetime' - Stores the data in the SQL datetime format
* - 'date' - Stores the date (only) in the SQL date format.
*
* @param Time $value value
*
* @return int|string
*/
Inherited from CodeIgniter\BaseModel
Defined in <ROOT>/vendor/codeigniter4/framework/system/BaseModel.php:1422
public skipValidation(bool $skip = true): $this Set the value of the skipValidation flag.
$value->skipValidation()
/**
* Set the value of the skipValidation flag.
*
* @param bool $skip Value
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in <ROOT>/vendor/codeigniter4/framework/system/BaseModel.php:1439
public setValidationMessages(array $validationMessages): $this Allows to set (and reset) validation messages. It could be used when you have...
$value->setValidationMessages()
/**
* Allows to set (and reset) validation messages.
* It could be used when you have to change default or override current validate messages.
*
* @param array $validationMessages Value
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in <ROOT>/vendor/codeigniter4/framework/system/BaseModel.php:1454
public setValidationMessage(string $field, array $fieldMessages): $this Allows to set field wise validation message. It could be used when you have t...
$value->setValidationMessage()
/**
* Allows to set field wise validation message.
* It could be used when you have to change default or override current validate messages.
*
* @param string $field Field Name
* @param array $fieldMessages Validation messages
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in <ROOT>/vendor/codeigniter4/framework/system/BaseModel.php:1470
public setValidationRules(array $validationRules): $this Allows to set (and reset) validation rules. It could be used when you have to...
$value->setValidationRules()
/**
* Allows to set (and reset) validation rules.
* It could be used when you have to change default or override current validate rules.
*
* @param array<string, array<string, array<string, string>|string>|string> $validationRules Value
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in <ROOT>/vendor/codeigniter4/framework/system/BaseModel.php:1485
public setValidationRule(string $field, $fieldRules): $this Allows to set field wise validation rules. It could be used when you have to ...
$value->setValidationRule()
/**
* Allows to set field wise validation rules.
* It could be used when you have to change default or override current validate rules.
*
* @param string $field Field Name
* @param array|string $fieldRules Validation rules
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in <ROOT>/vendor/codeigniter4/framework/system/BaseModel.php:1501
public cleanRules(bool $choice = false): $this Should validation rules be removed before saving? Most handy when doing updates.
$value->cleanRules()
/**
* Should validation rules be removed before saving?
* Most handy when doing updates.
*
* @param bool $choice Value
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in <ROOT>/vendor/codeigniter4/framework/system/BaseModel.php:1529
public validate($row): bool Validate the row data against the validation rules (or the validation group) ...
$value->validate()
/**
* Validate the row data against the validation rules (or the validation group)
* specified in the class property, $validationRules.
*
* @param array|object $row Row data
* @phpstan-param row_array|object $row
*/
Inherited from CodeIgniter\BaseModel
Defined in <ROOT>/vendor/codeigniter4/framework/system/BaseModel.php:1543
public getValidationRules(array $options = array()): array Returns the model's defined validation rules so that they can be used elsewhe...
$value->getValidationRules()
/**
* Returns the model's defined validation rules so that they
* can be used elsewhere, if needed.
*
* @param array $options Options
*/
Inherited from CodeIgniter\BaseModel
Defined in <ROOT>/vendor/codeigniter4/framework/system/BaseModel.php:1585
protected ensureValidation(): void
Inherited from CodeIgniter\BaseModel
Defined in <ROOT>/vendor/codeigniter4/framework/system/BaseModel.php:1608
public getValidationMessages(): array Returns the model's validation messages, so they can be used elsewhere, if ne...
$value->getValidationMessages()
/**
* Returns the model's validation messages, so they
* can be used elsewhere, if needed.
*/
Inherited from CodeIgniter\BaseModel
Defined in <ROOT>/vendor/codeigniter4/framework/system/BaseModel.php:1619
protected cleanValidationRules(array $rules, ?array $row = null): array Removes any rules that apply to fields that have not been set currently so th...
/**
* Removes any rules that apply to fields that have not been set
* currently so that rules don't block updating when only updating
* a partial row.
*
* @param array $rules Array containing field name and rule
* @param array $row Row data (@TODO Remove null in param type)
* @phpstan-param row_array $row
*/
Inherited from CodeIgniter\BaseModel
Defined in <ROOT>/vendor/codeigniter4/framework/system/BaseModel.php:1633
public allowCallbacks(bool $val = true): $this Sets $tempAllowCallbacks value so that we can temporarily override the settin...
$value->allowCallbacks()
/**
* Sets $tempAllowCallbacks value so that we can temporarily override
* the setting. Resets after the next method that uses triggers.
*
* @param bool $val value
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in <ROOT>/vendor/codeigniter4/framework/system/BaseModel.php:1656
protected trigger(string $event, array $eventData): array A simple event trigger for Model Events that allows additional data manipulat...
/**
* A simple event trigger for Model Events that allows additional
* data manipulation within the model. Specifically intended for
* usage by child models this can be used to format data,
* save/load related classes, etc.
*
* It is the responsibility of the callback methods to return
* the data itself.
*
* Each $eventData array MUST have a 'data' key with the relevant
* data for callback methods (like an array of key/value pairs to insert
* or update, an array of results, etc.)
*
* If callbacks are not allowed then returns $eventData immediately.
*
* @param string $event Event
* @param array $eventData Event Data
*
* @return array
*
* @throws DataException
*/
Inherited from CodeIgniter\BaseModel
Defined in <ROOT>/vendor/codeigniter4/framework/system/BaseModel.php:1685
public asArray(): $this Sets the return type of the results to be as an associative array.
$value->asArray()
/**
* Sets the return type of the results to be as an associative array.
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in <ROOT>/vendor/codeigniter4/framework/system/BaseModel.php:1708
public asObject(string $class = 'object'): $this Sets the return type to be of the specified type of object. Defaults to a sim...
$value->asObject()
/**
* Sets the return type to be of the specified type of object.
* Defaults to a simple object, but can be any class that has
* class vars with the same name as the collection columns,
* or at least allows them to be created.
*
* @param 'object'|class-string $class Class Name
*
* @return $this
*/
Inherited from CodeIgniter\BaseModel
Defined in <ROOT>/vendor/codeigniter4/framework/system/BaseModel.php:1725
protected objectToArray($object, bool $onlyChanged = true, bool $recursive = false): array Takes a class and returns an array of its public and protected properties as ...
/**
* Takes a class and returns an array of its public and protected
* properties as an array suitable for use in creates and updates.
* This method uses objectToRawArray() internally and does conversion
* to string on all Time instances
*
* @param object $object Object
* @param bool $onlyChanged Only Changed Property
* @param bool $recursive If true, inner entities will be cast as array as well
*
* @return array<string, mixed>
*
* @throws ReflectionException
*/
Inherited from CodeIgniter\BaseModel
Defined in <ROOT>/vendor/codeigniter4/framework/system/BaseModel.php:1746
protected timeToString(array $properties): array Convert any Time instances to appropriate $dateFormat.
/**
* Convert any Time instances to appropriate $dateFormat.
*
* @param array<string, mixed> $properties
*
* @return array<string, mixed>
*/
Inherited from CodeIgniter\BaseModel
Defined in <ROOT>/vendor/codeigniter4/framework/system/BaseModel.php:1761
protected transformDataToArray($row, string $type): array Transform data to array.
/**
* Transform data to array.
*
* @param array|object|null $row Row data
* @phpstan-param row_array|object|null $row
* @param string $type Type of data (insert|update)
*
* @throws DataException
* @throws InvalidArgumentException
* @throws ReflectionException
*
* @used-by insert()
* @used-by update()
*/
Inherited from CodeIgniter\BaseModel
Defined in <ROOT>/vendor/codeigniter4/framework/system/BaseModel.php:1823
public allowEmptyInserts(bool $value = true): self Sets $allowEmptyInserts.
$value->allowEmptyInserts()
/**
* Sets $allowEmptyInserts.
*/
Inherited from CodeIgniter\BaseModel
Defined in <ROOT>/vendor/codeigniter4/framework/system/BaseModel.php:1925
protected convertToReturnType(array $row, string $returnType): object|array Converts database data array to return type value.
/**
* Converts database data array to return type value.
*
* @param array<string, mixed> $row Raw data from database
* @param 'array'|'object'|class-string $returnType
*/
Inherited from CodeIgniter\BaseModel
Defined in <ROOT>/vendor/codeigniter4/framework/system/BaseModel.php:1938
private CodeIgniter\Model::checkBuilderMethod(string $name): void Checks the Builder method name that should not be used in the Model.
/**
* Checks the Builder method name that should not be used in the Model.
*/
Inherited from CodeIgniter\Model
Defined in <ROOT>/vendor/codeigniter4/framework/system/Model.php:943
sideblog
$value array (4)
Table (4)
Contents (4)
blog_id
title
tag
slug
description
more_sections
discription_mage
bodyimage
category
country
altone
alttwo
created_at
updated_at
deleted_at
datetime
0
60
Why Visit Mikumi
WildLife
why-visit-mikumi
<p> There are several reasons to visit Mikumi National Park in Tanzania:</UTF-8
null
1680525733_b6eaf225cba1b97013ee.webp
1680525733_f3de502e95fed02d73c5.webp
null
null
Visiting mikumi
Visiting Mikumi
2023-04-03 08:42:13
2023-04-03 08:42:13
2023-04-03 08:42:13
2023-04-03 08:42:13
1
95
why Serengeti National park has kopjes
History
why-serengeti-national-park-has-kopjes
<p>Serengeti National Park is home to numerous kopjes, which are large rockUTF-8
null
1681283660_6d78a83ed0752577b8b9.webp
1681283659_113541608542f497a137.webp
null
null
Serengeti kopje
Serengeti kopje
2023-04-12 03:14:20
2023-04-12 03:14:20
2023-04-12 03:14:20
2023-04-12 03:14:20
2
77
Why is Tanzanite found only in Tanzania
History
why-is-tanzanite-found-only-in-tanzania
<p> Tanzanite is found only in Tanzania because the geological conditions UTF-8
null
1680679488_1a2c6ee4969a3dcf126b.webp
1680679488_cd83e18fa5ec64070071.webp
null
null
Tanzanite gemstone
Tanzanite gemstone
2023-04-05 03:24:48
2023-04-05 03:24:48
2023-04-05 03:24:48
2023-04-05 03:24:48
3
29
Why is Serengeti so expensive
Miscelanious
why-is-serengeti-so-expensive
<p> The Serengeti is a world-renowned national park that is home to an abuUTF-8
null
1680269884_b6b68ecce6d2286df368.webp
1680269884_4d8f1f429d398fabf0a2.webp
null
null
Serengeti great wildebeest migartion
why serengeti si so expensive
2023-03-31 09:38:05
2023-03-31 09:38:05
2023-03-31 09:38:05
2023-03-31 09:38:05
0 => array (16)
$value[0]
blog_id => string (2) "60"
$value[0]['blog_id']
title => string (16) "Why Visit Mikumi"
$value[0]['title']
tag => string (8) "WildLife"
$value[0]['tag']
slug => string (16) "why-visit-mikumi"
$value[0]['slug']
description => string (1675) "<p> There are several reasons to visit Mikumi National Park in Tanzania:</p>...
$value[0]['description']
<p> There are several reasons to visit Mikumi National Park in Tanzania:</p><ol><li><p>Wildlife: Mikumi National Park is home to a diverse range of wildlife, including elephants, lions, giraffes, zebras, wildebeests, and more. The park is also a sanctuary for over 400 species of birds, making it a great destination for birdwatching.</p></li><li><p>Scenery: The park's landscape is stunning, with vast plains, rolling hills, and the Uluguru Mountains in the background. There are several viewpoints in the park that offer stunning panoramic views of the surrounding scenery.</p></li><li><p>Accessibility: Mikumi National Park is easily accessible from Dar es Salaam, Tanzania's largest city, and is only a few hours' drive away. This makes it a convenient option for visitors who want to go on a safari but are short on time.</p></li><li><p>Affordable: Compared to other national parks in Tanzania, Mikumi is relatively affordable, making it a great option for budget-conscious travelers. The park also has several campsites and lodges that cater to different budgets.</p></li><li><p>Cultural tourism: Mikumi National Park is located in an area with several tribes, including the Maasai and the Wapogoro, who have a rich cultural heritage. Visitors can learn about their customs, traditions, and way of life through cultural tourism programs, which offer an opportunity to interact with the local communities.</p></li></ol><p>Overall, Mikumi National Park is a great destination for those interested in wildlife, nature, and culture. Whether you are an experienced safari-goer or a first-time visitor, Mikumi offers a unique and memorable safari experience</p><p> <br></p>
description => string (307) "<p>Serengeti National Park is home to numerous kopjes, which are large rock ...
$value[1]['description']
<p>Serengeti National Park is home to numerous kopjes, which are large rock formations that rise above the surrounding landscape. These kopjes are believed to have been formed over millions of years through a combination of geological processes, including erosion, weathering, and volcanic activity.<br></p>
description => string (1464) "<p> Tanzanite is found only in Tanzania because the geological conditions ne...
$value[2]['description']
<p> Tanzanite is found only in Tanzania because the geological conditions necessary for its formation are unique to this region. Tanzanite is a blue or violet-blue variety of the mineral zoisite, and its color is due to the presence of vanadium and other trace elements.</p><p>Tanzanite has formed about 585 million years ago during the Pan-African orogeny, which was a period of intense tectonic activity that resulted in the formation of the East African Rift System. The East African Rift System is a geological feature that extends from Mozambique in the south to Ethiopia in the north, and it is characterized by a series of deep, steep-sided valleys and volcanoes.</p><p>Tanzanite was formed in the high temperatures and pressures that existed during this period of tectonic activity. The geological conditions that created tanzanite are very specific, and they have not been found in any other location in the world.</p><p>The Mererani Hills in northern Tanzania are the only known source of tanzanite. The hills are situated near Mount Kilimanjaro and are part of the larger Lelatema Mountains. Tanzanite was discovered in the Mererani Hills in 1967, and since then, it has been the focus of extensive mining activity.</p><p>In summary, tanzanite is found only in Tanzania because the specific geological conditions necessary for its formation are unique to this region, and these conditions have not been found anywhere else in the world</p><p> <br></p>
description => string (1596) "<p> The Serengeti is a world-renowned national park that is home to an abund...
$value[3]['description']
<p> The Serengeti is a world-renowned national park that is home to an abundance of wildlife, including the famous wildebeest migration. The high cost of visiting the Serengeti is due to several factors:</p><ol><li><p>Conservation fees: The Tanzanian government charges conservation fees for entry into the Serengeti, which helps to fund conservation efforts and support local communities. These fees can be expensive, particularly for international visitors.</p></li><li><p>Park fees: In addition to conservation fees, visitors to the Serengeti must also pay park fees. These fees cover the cost of park maintenance, staffing, and infrastructure.</p></li><li><p>Transportation costs: Since the Serengeti is located in a remote area of Tanzania, transportation costs can be high. Visitors must either fly or drive to the Serengeti, and both options can be costly.</p></li><li><p>Accommodation costs: There are a variety of accommodation options in Serengeti, from budget camping to luxury lodges. However, even budget options can be expensive due to the remote location and limited availability of accommodations.</p></li><li><p>Demand: The Serengeti is one of the most popular national parks in the world, and as such, demand for safaris and accommodations can be high. This can drive up prices, particularly during peak tourist season.</p></li></ol><p>Despite the high cost, many visitors to the Serengeti feel that the experience is well worth the expense, as it offers a once-in-a-lifetime opportunity to see some of the world's most iconic wildlife in their natural habitat</p><p> <br></p>
description => string (1940) "<p> <br></p><p>If you're planning to enjoy a jungle safari in Tanzania, here...
$value[0]['description']
<p> <br></p><p>If you're planning to enjoy a jungle safari in Tanzania, here are some tips to help you make the most of your experience:</p><ol><li><p>Choose a reputable tour operator: Look for a tour operator with experienced guides, good reviews, and a strong safety record. Make sure they have experience in organizing jungle safaris in Tanzania.</p></li><li><p>Dress appropriately: Wear lightweight, breathable clothing that covers your arms and legs to protect against insects and scratches from plants. Also, bring comfortable shoes suitable for walking on uneven terrain.</p></li><li><p>Protect yourself from insects: Use insect repellent and consider wearing clothes treated with permethrin. Also, consider bringing a mosquito net for sleeping.</p></li><li><p>Stay hydrated: Bring plenty of water and drink regularly to stay hydrated in a hot and humid environment.</p></li><li><p>Listen to your guide: Your guide has the experience and knowledge to keep you safe, so listen carefully to their instructions and follow them at all times.</p></li><li><p>Be respectful of the environment: Avoid littering and stay on designated paths. Do not disturb wildlife or plants, and always follow your guide's instructions on environmental conservation.</p></li><li><p>Bring necessary medication: If you have any medical conditions or require medication, bring enough for the duration of your trip.</p></li><li><p>Keep your camera ready: Be prepared to capture unforgettable moments on your safari by having your camera or phone ready.</p></li><li><p>Look out for wildlife: Tanzania's jungles are home to a diverse array of wildlife, including primates, big cats, and elephants. Stay alert and keep an eye out for wildlife, but avoid approaching or disturbing them.</p></li></ol><p><br></p><p>By following these tips, you can enjoy your jungle safari in Tanzania while staying safe and making the most of the unique experience</p><p> <br></p>
description => string (1687) "<p> Tanzania is a great destination for walking safaris, with a variety of n...
$value[1]['description']
<p> Tanzania is a great destination for walking safaris, with a variety of national parks and reserves offering unique opportunities to explore the wilderness on foot. Some popular locations for walking safaris in Tanzania include:</p><ol><li><p>Serengeti National Park: Known for its vast savannahs and incredible wildlife, the Serengeti offers guided walking safaris that allow you to get up close and personal with the wildlife.</p></li><li><p>Ngorongoro Conservation Area: Home to the famous Ngorongoro Crater, this area offers guided nature walks around the crater rim and walking safaris in nearby Olmoti and Empakaai craters.</p></li><li><p>Tarangire National Park: This park is known for its large elephant herds and scenic baobab trees. Guided walking safaris here provide the opportunity to see wildlife up close and learn about the park's ecosystem.</p></li><li><p>Lake Manyara National Park: This park is home to tree-climbing lions, large elephant herds, and a variety of other wildlife. Guided walking safaris here offer a unique perspective on the park's wildlife and landscape.</p></li><li><p>Selous Game Reserve: The largest game reserve in Tanzania, Selous offers multi-day walking safaris that allow you to explore the park's diverse landscape and wildlife, including elephants, lions, and crocodiles.</p></li></ol><p>It's important to note that walking safaris in Tanzania are only allowed in certain areas and must be accompanied by a licensed guide. It's recommended to book your walking safari with a reputable tour operator who can provide the necessary permits, equipment, and guides, as well as ensure your safety and comfort during the safari</p><p> <br></p>
description => string (2054) "<p> A walking safari from Ngorongoro Highlands to Lake Natron is an incredib...
$value[2]['description']
<p> A walking safari from Ngorongoro Highlands to Lake Natron is an incredible way to explore the diverse landscapes and wildlife of Tanzania. The journey from Ngorongoro Highlands to Lake Natron takes you through some of the most breathtaking scenery in the region and offers the opportunity to see a wide range of wildlife and birdlife along the way.</p><p>Here are some things to know about a walking safari from Ngorongoro Highlands to Lake Natron:</p><ol><li><p>Distance: The walking safari from Ngorongoro Highlands to Lake Natron covers a distance of approximately 80-100 km, depending on the specific route taken. It usually takes around 4-6 days to complete the journey.</p></li><li><p>Terrain: The terrain along the walking safari route can be challenging, with steep hills, rocky paths, and river crossings. However, the effort is worth it for the spectacular scenery and wildlife sightings.</p></li><li><p>Wildlife viewing: The walking safari route passes through several different habitats, including grasslands, woodlands, and mountains, which offer a range of wildlife viewing opportunities. Some of the animals that can be seen along the way include wildebeest, zebras, giraffes, elephants, and predators such as lions and leopards.</p></li><li><p>Accommodation: There are a number of campsites and lodges along the walking safari route that offer basic accommodation. Most campsites have tents and basic facilities such as shared bathrooms and showers. Some lodges offer more comfortable accommodation with private rooms and en-suite bathrooms.</p></li><li><p>Lake Natron: The endpoint of the walking safari is Lake Natron, a stunning salt lake that is home to a large population of flamingos. The lake is also surrounded by stunning landscapes, including the active volcano, Ol Doinyo Lengai.</p></li></ol><p>Overall, a walking safari from Ngorongoro Highlands to Lake Natron is a challenging but rewarding experience that offers the opportunity to see some of Tanzania's most stunning landscapes and wildlife up close</p><p> <br></p>
description => string (1105) "<p> Thank you for the clarification. The Muivaro Coffee Tour is a popular to...
$value[3]['description']
<p> Thank you for the clarification. The Muivaro Coffee Tour is a popular tourist attraction located near Arusha, Tanzania. It is a guided tour that takes visitors through a coffee farm to learn about the process of coffee production, from the planting of the coffee trees to the roasting of the beans.</p><p>During the tour, visitors can see the coffee plants up close and learn about the different varieties of coffee grown in the region. They can also participate in the coffee picking and processing process, and learn about the various methods used to roast and grind the beans to create the perfect cup of coffee.</p><p>In addition to the coffee tour, visitors can also learn about the local culture and traditions of the Chagga people who live in the region, and enjoy a traditional meal made from local ingredients.</p><p>Overall, the Muivaro Coffee Tour is a unique and informative experience that offers visitors a chance to learn about the history and culture of coffee production in Tanzania, as well as to enjoy the beautiful scenery and warm hospitality of the local people</p><p> <br></p>
description => string (1863) "<p> There are several ways to book a safari in Tanzania. Here are some steps...
$value[4]['description']
<p> There are several ways to book a safari in Tanzania. Here are some steps you can follow:</p><ol><li><p>Choose a reputable safari operator: Do some research to find a safari operator that has a good reputation and positive reviews. Look for companies that are licensed by the Tanzania Association of Tour Operators (TATO) or the Tanzania Tourist Board (TTB).</p></li><li><p>Decide on your itinerary: Tanzania offers a variety of safari experiences, so decide on which parks and activities you want to include in your itinerary. Popular parks include Serengeti National Park, Ngorongoro Conservation Area, Tarangire National Park, and Manyara National Park.</p></li><li><p>Determine your budget: Safaris in Tanzania can range from budget to luxury, so determine how much you are willing to spend and what level of comfort and service you are looking for.</p></li><li><p>Contact the safari operator: Once you have chosen a safari operator and determined your itinerary and budget, contact them to start the booking process. They will be able to provide you with more information on available tours, prices, and accommodations.</p></li><li><p>Book your tour: Once you have decided on your safari itinerary and received a quote from the safari operator, you can confirm your booking by paying a deposit or full payment. Make sure to read the terms and conditions of the booking carefully and ask any questions you may have before making a payment.</p></li><li><p>Prepare for your trip: Once your safari is booked, make sure to prepare for your trip by obtaining any necessary visas or vaccinations, packing appropriate clothing and gear, and familiarizing yourself with the local customs and culture.</p></li></ol><p>Overall, booking a safari in Tanzania requires some planning and research, but it can be a rewarding and unforgettable experience</p><p> <br></p>
altone => string (26) "Book Your Tanzania safari "
$value[4]['altone']
alttwo => string (33) "Book your Tanzania luxury safari "
$value[4]['alttwo']
created_at => string (19) "2023-03-30 11:58:38"
$value[4]['created_at']
updated_at => string (19) "2023-03-30 11:58:38"
$value[4]['updated_at']
deleted_at => string (19) "2023-03-30 11:58:38"
$value[4]['deleted_at']
datetime => string (19) "2023-03-30 11:58:38"
$value[4]['datetime']
5 => array (16)
$value[5]
blog_id => string (2) "84"
$value[5]['blog_id']
title => string (25) "Tanzania Travel insurance"
$value[5]['title']
tag => string (8) "Locality"
$value[5]['tag']
slug => string (25) "tanzania-travel-insurance"
$value[5]['slug']
description => string (1708) "<p> Travel insurance is highly recommended when traveling to Tanzania. It ca...
$value[5]['description']
<p> Travel insurance is highly recommended when traveling to Tanzania. It can provide you with coverage for a range of unexpected situations, including medical emergencies, trip cancellations or interruptions, lost or stolen baggage, and more. Here are some things to consider when choosing a travel insurance policy for your trip to Tanzania:</p><ol><li><p>Medical Coverage: Make sure your policy covers emergency medical expenses, including hospitalization, doctor visits, and emergency medical evacuation.</p></li><li><p>Trip Cancellation/Interruption Coverage: Look for a policy that covers trip cancellations or interruptions due to unforeseen events, such as illness, injury, or a natural disaster.</p></li><li><p>Baggage Coverage: Check if your policy covers lost or stolen baggage, including valuables such as cameras, laptops, or jewelry.</p></li><li><p>Adventure Activities Coverage: If you plan to participate in adventure activities such as safari or mountain climbing, make sure your policy covers these activities.</p></li><li><p>COVID-19 Coverage: Check if your policy provides coverage for COVID-19-related medical expenses or trip cancellations due to COVID-19-related reasons.</p></li><li><p>Policy Limits: Make sure to check the policy limits for each type of coverage, including deductibles, coverage limits, and maximum payouts.</p></li><li><p>Reputation and Reliability: Choose a reputable insurance provider with a history of reliable service and good customer reviews.</p></li></ol><p>Remember to carefully review the terms and conditions of your policy before purchasing it to ensure that it meets your needs and provides adequate coverage for your trip to Tanzania</p><p> <br></p>
description => string (1527) "<p> Tanzania is generally a safe country to travel to, with a low incidence ...
$value[6]['description']
<p> Tanzania is generally a safe country to travel to, with a low incidence of violent crime. However, like any country, there are some safety considerations that travelers should keep in mind to ensure a safe and enjoyable trip:</p><ol><li><p>Avoid walking alone at night, especially in urban areas: Petty theft and muggings can occur, especially in busy areas.</p></li><li><p>Be cautious of pickpockets and bag snatchers: Keep your valuables close to you and avoid carrying large sums of cash.</p></li><li><p>Use reputable tour operators: When booking a safari or other adventure activities, make sure to use a reputable tour operator with experienced guides.</p></li><li><p>Be aware of wildlife: When on safari or hiking in nature reserves, keep a safe distance from wildlife and follow the instructions of your guide.</p></li><li><p>Respect local customs and traditions: Tanzania is a conservative country, and visitors should dress modestly and be respectful of local customs and traditions.</p></li><li><p>Drink bottled water: Tap water in Tanzania is not always safe to drink, so make sure to drink bottled water or purified water.</p></li><li><p>Get vaccinated: Make sure to consult with your healthcare provider before traveling to Tanzania and get any necessary vaccinations.</p></li><li><p>Be prepared for the weather: Tanzania can be hot and humid, so make sure to bring appropriate clothing and sunscreen. In mountainous areas, temperatures can be cooler, so bring warm clothing as well</p></li></ol><p> <br></p>
description => string (2794) "<p> Tanzanite is a beautiful blue or violet-blue gemstone that was first dis...
$value[7]['description']
<p> Tanzanite is a beautiful blue or violet-blue gemstone that was first discovered in the Mererani Hills of northern Tanzania in 1967. It is a relatively new gemstone compared to many other popular gemstones, and it is prized for its vivid color and rarity.</p><p>Tanzanite is a variety of mineral zoisite, and its color is due to the presence of vanadium and other trace elements. It is typically found in small sizes, and larger stones are considered quite rare and valuable.</p><p>Tanzanite is commonly used in jewelry, particularly in rings, earrings, and pendants. It is a relatively soft stone, with a hardness of 6.5-7 on the Mohs scale, so it is important to take care when wearing tanzanite jewelry to avoid scratching or damaging the stone.</p><p>Tanzanite is also known for its pleochroism, which means it can display different colors when viewed from different angles. This property can make tanzanite particularly captivating and unique.</p><p>Due to its rarity and beautiful color, tanzanite can be quite expensive, especially for larger stones or those with exceptional color and clarity. As with any gemstone purchase, it is important to buy from a reputable dealer and to have the stone properly appraised and certified.</p><p> </p><p><b><span style="font-size: var(--bs-body-font-size); text-align: var(--bs-body-text-align);">Here are some additional interesting facts about tanzanite:</span><br></b></p><ol><li><p>Tanzanite is only found in one place in the world - the Mererani Hills of northern Tanzania. This makes it one of the rarest gemstones on earth.</p></li><li><p>Tanzanite is named after the country of Tanzania, where it was first discovered.</p></li><li><p>Tanzanite was initially not very popular when it was first discovered in the 1960s, but it gained popularity after Tiffany & Co. began promoting it in the 1970s.</p></li><li><p>Tanzanite is a relatively new addition to the list of birthstones, having been added as an alternate birthstone for December in 2002.</p></li><li><p>Tanzanite is believed by some to have healing properties, including enhancing intuition, promoting communication, and improving spiritual awareness.</p></li><li><p>The largest faceted tanzanite on record weighs over 242 carats and is named the "Queen of Kilimanjaro."</p></li><li><p>Tanzanite's color can be enhanced through heat treatment, a process that can turn brownish tanzanite into a vivid blue or violet-blue that is highly prized.</p></li><li><p>The popularity of tanzanite has led to concerns about the sustainability of the mining industry in Tanzania and the welfare of the local communities involved in the industry. As a result, efforts have been made to improve working conditions and environmental practices in tanzanite mining.</p></li></ol><p> <br></p>